Commit fa12868e authored by Eric Miao's avatar Eric Miao

Merge branch 'fix' of...

Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git into devel
parents cefdb2a4 1efb7180
...@@ -87,7 +87,7 @@ void clks_register(struct clk_lookup *clks, size_t num) ...@@ -87,7 +87,7 @@ void clks_register(struct clk_lookup *clks, size_t num)
clkdev_add(&clks[i]); clkdev_add(&clks[i]);
} }
int clk_add_alias(char *alias, struct device *alias_dev, char *id, int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
struct device *dev) struct device *dev)
{ {
struct clk *r = clk_get(dev, id); struct clk *r = clk_get(dev, id);
...@@ -96,7 +96,7 @@ int clk_add_alias(char *alias, struct device *alias_dev, char *id, ...@@ -96,7 +96,7 @@ int clk_add_alias(char *alias, struct device *alias_dev, char *id,
if (!r) if (!r)
return -ENODEV; return -ENODEV;
l = clkdev_alloc(r, alias, alias_dev ? dev_name(alias_dev) : NULL); l = clkdev_alloc(r, alias, alias_dev_name);
clk_put(r); clk_put(r);
if (!l) if (!l)
return -ENODEV; return -ENODEV;
......
...@@ -69,6 +69,6 @@ extern void clk_pxa3xx_cken_disable(struct clk *); ...@@ -69,6 +69,6 @@ extern void clk_pxa3xx_cken_disable(struct clk *);
#endif #endif
void clks_register(struct clk_lookup *clks, size_t num); void clks_register(struct clk_lookup *clks, size_t num);
int clk_add_alias(char *alias, struct device *alias_dev, char *id, int clk_add_alias(const char *alias, const char *alias_name, char *id,
struct device *dev); struct device *dev);
...@@ -187,7 +187,7 @@ static void __init e740_init(void) ...@@ -187,7 +187,7 @@ static void __init e740_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
eseries_register_clks(); eseries_register_clks();
clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev, clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name,
"UDCCLK", &pxa25x_device_udc.dev), "UDCCLK", &pxa25x_device_udc.dev),
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
......
...@@ -188,7 +188,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -188,7 +188,7 @@ static struct platform_device *devices[] __initdata = {
static void __init e750_init(void) static void __init e750_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config));
clk_add_alias("CLK_CK3P6MI", &e750_tc6393xb_device.dev, clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
"GPIO11_CLK", NULL), "GPIO11_CLK", NULL),
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
......
...@@ -194,7 +194,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -194,7 +194,7 @@ static struct platform_device *devices[] __initdata = {
static void __init e800_init(void) static void __init e800_init(void)
{ {
clk_add_alias("CLK_CK3P6MI", &e800_tc6393xb_device.dev, clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
"GPIO11_CLK", NULL), "GPIO11_CLK", NULL),
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#endif #endif
/* Chip Select */ /* Chip Select */
#define GPIO1_nCS2 MFP_CFG(GPIO1, AF1)
#define GPIO2_nCS3 MFP_CFG(GPIO2, AF1) #define GPIO2_nCS3 MFP_CFG(GPIO2, AF1)
/* AC97 */ /* AC97 */
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#define GPIO17_2_GPIO MFP_CFG(GPIO17_2, AF0) #define GPIO17_2_GPIO MFP_CFG(GPIO17_2, AF0)
/* Chip Select */ /* Chip Select */
#define GPIO3_nCS2 MFP_CFG(GPIO3, AF1)
#define GPIO4_nCS3 MFP_CFG(GPIO4, AF1) #define GPIO4_nCS3 MFP_CFG(GPIO4, AF1)
/* AC97 */ /* AC97 */
......
...@@ -919,7 +919,7 @@ static void __init tosa_init(void) ...@@ -919,7 +919,7 @@ static void __init tosa_init(void)
pxa2xx_set_spi_info(2, &pxa_ssp_master_info); pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -882,10 +882,21 @@ static void __devinit init_pxafb_overlay(struct pxafb_info *fbi, ...@@ -882,10 +882,21 @@ static void __devinit init_pxafb_overlay(struct pxafb_info *fbi,
init_completion(&ofb->branch_done); init_completion(&ofb->branch_done);
} }
static inline int pxafb_overlay_supported(void)
{
if (cpu_is_pxa27x() || cpu_is_pxa3xx())
return 1;
return 0;
}
static int __devinit pxafb_overlay_init(struct pxafb_info *fbi) static int __devinit pxafb_overlay_init(struct pxafb_info *fbi)
{ {
int i, ret; int i, ret;
if (!pxafb_overlay_supported())
return 0;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
init_pxafb_overlay(fbi, &fbi->overlay[i], i); init_pxafb_overlay(fbi, &fbi->overlay[i], i);
ret = register_framebuffer(&fbi->overlay[i].fb); ret = register_framebuffer(&fbi->overlay[i].fb);
...@@ -908,6 +919,9 @@ static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) ...@@ -908,6 +919,9 @@ static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi)
{ {
int i; int i;
if (!pxafb_overlay_supported())
return;
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
unregister_framebuffer(&fbi->overlay[i].fb); unregister_framebuffer(&fbi->overlay[i].fb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment