提交 cc155c6f 编写于 作者: R Russell King 提交者: Eric Miao

[ARM] pxa: allow platforms to control which uarts are registered

For some platforms, it is inappropriate to register all PXA UARTs.
In some cases, the UARTs may not be used, and in others we may want
to avoid registering the UARTs to allow other drivers (eg, FICP) to
make use of the UART.

In addition, a while back there was a request to be able to pass
platform data to the UART driver.

This patch enables all of this by providing functions platforms can
call to register each individual UART.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: NMike Rapoport <mike@compulab.co.il>
Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
上级 7c6ccbf0
...@@ -306,6 +306,10 @@ static void __init balloon3_init(void) ...@@ -306,6 +306,10 @@ static void __init balloon3_init(void)
*/ */
ARB_CNTRL = ARB_CORE_PARK | 0x234; ARB_CNTRL = ARB_CORE_PARK | 0x234;
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
if (balloon3_has(BALLOON3_FEATURE_AUDIO)) if (balloon3_has(BALLOON3_FEATURE_AUDIO))
pxa_set_ac97_info(NULL); pxa_set_ac97_info(NULL);
......
...@@ -453,6 +453,10 @@ static inline void cmx2xx_init_ac97(void) {} ...@@ -453,6 +453,10 @@ static inline void cmx2xx_init_ac97(void) {}
static void __init cmx2xx_init(void) static void __init cmx2xx_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
cmx2xx_pm_init(); cmx2xx_pm_init();
if (cpu_is_pxa25x()) if (cpu_is_pxa25x())
......
...@@ -438,6 +438,10 @@ static void __init cm_x300_init(void) ...@@ -438,6 +438,10 @@ static void __init cm_x300_init(void)
/* board-processor specific GPIO initialization */ /* board-processor specific GPIO initialization */
pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_mfp_cfg)); pxa3xx_mfp_config(ARRAY_AND_SIZE(cm_x300_mfp_cfg));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
cm_x300_init_dm9000(); cm_x300_init_dm9000();
cm_x300_init_lcd(); cm_x300_init_lcd();
cm_x300_init_ohci(); cm_x300_init_ohci();
......
...@@ -130,6 +130,9 @@ static struct platform_device *colibri_pxa270_devices[] __initdata = { ...@@ -130,6 +130,9 @@ static struct platform_device *colibri_pxa270_devices[] __initdata = {
static void __init colibri_pxa270_init(void) static void __init colibri_pxa270_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_add_devices(ARRAY_AND_SIZE(colibri_pxa270_devices)); platform_add_devices(ARRAY_AND_SIZE(colibri_pxa270_devices));
} }
......
...@@ -170,6 +170,10 @@ static inline void colibri_pxa310_init_ac97(void) {} ...@@ -170,6 +170,10 @@ static inline void colibri_pxa310_init_ac97(void) {}
void __init colibri_pxa300_init(void) void __init colibri_pxa300_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
colibri_pxa300_init_eth(); colibri_pxa300_init_eth();
colibri_pxa300_init_ohci(); colibri_pxa300_init_ohci();
colibri_pxa3xx_init_nand(); colibri_pxa3xx_init_nand();
......
...@@ -199,6 +199,10 @@ static void __init colibri_pxa320_init_uart(void) ...@@ -199,6 +199,10 @@ static void __init colibri_pxa320_init_uart(void)
void __init colibri_pxa320_init(void) void __init colibri_pxa320_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
colibri_pxa320_init_eth(); colibri_pxa320_init_eth();
colibri_pxa320_init_ohci(); colibri_pxa320_init_ohci();
colibri_pxa3xx_init_nand(); colibri_pxa3xx_init_nand();
......
...@@ -671,6 +671,10 @@ static void __init corgi_init(void) ...@@ -671,6 +671,10 @@ static void __init corgi_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
corgi_init_spi(); corgi_init_spi();
pxa_set_udc_info(&udc_info); pxa_set_udc_info(&udc_info);
......
...@@ -268,6 +268,9 @@ static void __init csb726_init(void) ...@@ -268,6 +268,9 @@ static void __init csb726_init(void)
/* MSC2 = 0x06697ff4; *//* none/SM501 */ /* MSC2 = 0x06697ff4; *//* none/SM501 */
MSC2 = (MSC2 & ~0xffff) | 0x7ff4; /* SM501 */ MSC2 = (MSC2 & ~0xffff) | 0x7ff4; /* SM501 */
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
pxa27x_set_i2c_power_info(NULL); pxa27x_set_i2c_power_info(NULL);
pxa_set_mci_info(&csb726_mci); pxa_set_mci_info(&csb726_mci);
......
...@@ -167,13 +167,18 @@ static struct resource pxa_resource_ffuart[] = { ...@@ -167,13 +167,18 @@ static struct resource pxa_resource_ffuart[] = {
} }
}; };
struct platform_device pxa_device_ffuart= { struct platform_device pxa_device_ffuart = {
.name = "pxa2xx-uart", .name = "pxa2xx-uart",
.id = 0, .id = 0,
.resource = pxa_resource_ffuart, .resource = pxa_resource_ffuart,
.num_resources = ARRAY_SIZE(pxa_resource_ffuart), .num_resources = ARRAY_SIZE(pxa_resource_ffuart),
}; };
void __init pxa_set_ffuart_info(void *info)
{
pxa_register_device(&pxa_device_ffuart, info);
}
static struct resource pxa_resource_btuart[] = { static struct resource pxa_resource_btuart[] = {
{ {
.start = 0x40200000, .start = 0x40200000,
...@@ -193,6 +198,11 @@ struct platform_device pxa_device_btuart = { ...@@ -193,6 +198,11 @@ struct platform_device pxa_device_btuart = {
.num_resources = ARRAY_SIZE(pxa_resource_btuart), .num_resources = ARRAY_SIZE(pxa_resource_btuart),
}; };
void __init pxa_set_btuart_info(void *info)
{
pxa_register_device(&pxa_device_btuart, info);
}
static struct resource pxa_resource_stuart[] = { static struct resource pxa_resource_stuart[] = {
{ {
.start = 0x40700000, .start = 0x40700000,
...@@ -212,6 +222,11 @@ struct platform_device pxa_device_stuart = { ...@@ -212,6 +222,11 @@ struct platform_device pxa_device_stuart = {
.num_resources = ARRAY_SIZE(pxa_resource_stuart), .num_resources = ARRAY_SIZE(pxa_resource_stuart),
}; };
void __init pxa_set_stuart_info(void *info)
{
pxa_register_device(&pxa_device_stuart, info);
}
static struct resource pxa_resource_hwuart[] = { static struct resource pxa_resource_hwuart[] = {
{ {
.start = 0x41600000, .start = 0x41600000,
...@@ -231,6 +246,14 @@ struct platform_device pxa_device_hwuart = { ...@@ -231,6 +246,14 @@ struct platform_device pxa_device_hwuart = {
.num_resources = ARRAY_SIZE(pxa_resource_hwuart), .num_resources = ARRAY_SIZE(pxa_resource_hwuart),
}; };
void __init pxa_set_hwuart_info(void *info)
{
if (cpu_is_pxa255())
pxa_register_device(&pxa_device_hwuart, info);
else
pr_info("UART: Ignoring attempt to register HWUART on non-PXA255 hardware");
}
static struct resource pxai2c_resources[] = { static struct resource pxai2c_resources[] = {
{ {
.start = 0x40301680, .start = 0x40301680,
......
...@@ -55,6 +55,9 @@ static struct platform_device *devices[] __initdata = { ...@@ -55,6 +55,9 @@ static struct platform_device *devices[] __initdata = {
static void __init e330_init(void) static void __init e330_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
eseries_register_clks(); eseries_register_clks();
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
......
...@@ -56,6 +56,9 @@ static struct platform_device *devices[] __initdata = { ...@@ -56,6 +56,9 @@ static struct platform_device *devices[] __initdata = {
static void __init e350_init(void) static void __init e350_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
eseries_register_clks(); eseries_register_clks();
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
......
...@@ -130,6 +130,9 @@ static struct platform_device *devices[] __initdata = { ...@@ -130,6 +130,9 @@ static struct platform_device *devices[] __initdata = {
static void __init e400_init(void) static void __init e400_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
/* Fixme - e400 may have a switched clock */ /* Fixme - e400 may have a switched clock */
eseries_register_clks(); eseries_register_clks();
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
......
...@@ -192,6 +192,9 @@ static struct platform_device *devices[] __initdata = { ...@@ -192,6 +192,9 @@ static struct platform_device *devices[] __initdata = {
static void __init e740_init(void) static void __init e740_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
eseries_register_clks(); eseries_register_clks();
clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name, clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name,
"UDCCLK", &pxa25x_device_udc.dev), "UDCCLK", &pxa25x_device_udc.dev),
......
...@@ -194,6 +194,9 @@ static struct platform_device *devices[] __initdata = { ...@@ -194,6 +194,9 @@ 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));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name, clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
"GPIO11_CLK", NULL), "GPIO11_CLK", NULL),
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
......
...@@ -195,6 +195,9 @@ static struct platform_device *devices[] __initdata = { ...@@ -195,6 +195,9 @@ static struct platform_device *devices[] __initdata = {
static void __init e800_init(void) static void __init e800_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name, clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
"GPIO11_CLK", NULL), "GPIO11_CLK", NULL),
eseries_get_tmio_gpios(); eseries_get_tmio_gpios();
......
...@@ -1286,6 +1286,10 @@ static void __init em_x270_init(void) ...@@ -1286,6 +1286,10 @@ static void __init em_x270_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(common_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
#ifdef CONFIG_PM #ifdef CONFIG_PM
pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP); pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP);
#endif #endif
......
...@@ -693,6 +693,10 @@ static void __init a780_init(void) ...@@ -693,6 +693,10 @@ static void __init a780_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config));
pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
set_pxa_fb_info(&ezx_fb_info_1); set_pxa_fb_info(&ezx_fb_info_1);
...@@ -754,6 +758,10 @@ static void __init e680_init(void) ...@@ -754,6 +758,10 @@ static void __init e680_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config));
pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info));
...@@ -816,6 +824,10 @@ static void __init a1200_init(void) ...@@ -816,6 +824,10 @@ static void __init a1200_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info));
...@@ -874,6 +886,10 @@ static void __init a910_init(void) ...@@ -874,6 +886,10 @@ static void __init a910_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
set_pxa_fb_info(&ezx_fb_info_2); set_pxa_fb_info(&ezx_fb_info_2);
...@@ -935,6 +951,10 @@ static void __init e6_init(void) ...@@ -935,6 +951,10 @@ static void __init e6_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info));
...@@ -971,6 +991,10 @@ static void __init e2_init(void) ...@@ -971,6 +991,10 @@ static void __init e2_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config));
pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_i2c_info(NULL); pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info));
......
...@@ -67,3 +67,8 @@ extern struct sysdev_class pxa_irq_sysclass; ...@@ -67,3 +67,8 @@ extern struct sysdev_class pxa_irq_sysclass;
extern struct sysdev_class pxa_gpio_sysclass; extern struct sysdev_class pxa_gpio_sysclass;
extern struct sysdev_class pxa2xx_mfp_sysclass; extern struct sysdev_class pxa2xx_mfp_sysclass;
extern struct sysdev_class pxa3xx_mfp_sysclass; extern struct sysdev_class pxa3xx_mfp_sysclass;
void __init pxa_set_ffuart_info(void *info);
void __init pxa_set_btuart_info(void *info);
void __init pxa_set_stuart_info(void *info);
void __init pxa_set_hwuart_info(void *info);
...@@ -211,6 +211,11 @@ static void __init gumstix_init(void) ...@@ -211,6 +211,11 @@ static void __init gumstix_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_hwuart_info(NULL);
gumstix_bluetooth_init(); gumstix_bluetooth_init();
gumstix_udc_init(); gumstix_udc_init();
gumstix_mmc_init(); gumstix_mmc_init();
......
...@@ -193,6 +193,9 @@ static void __init h5000_init(void) ...@@ -193,6 +193,9 @@ static void __init h5000_init(void)
fix_msc(); fix_msc();
pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_udc_info(&h5000_udc_mach_info); pxa_set_udc_info(&h5000_udc_mach_info);
platform_add_devices(ARRAY_AND_SIZE(devices)); platform_add_devices(ARRAY_AND_SIZE(devices));
} }
......
...@@ -150,6 +150,9 @@ static void __init himalaya_lcd_init(void) ...@@ -150,6 +150,9 @@ static void __init himalaya_lcd_init(void)
static void __init himalaya_init(void) static void __init himalaya_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
himalaya_lcd_init(); himalaya_lcd_init();
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -849,6 +849,10 @@ static void __init hx4700_init(void) ...@@ -849,6 +849,10 @@ static void __init hx4700_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios)); hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
pxa_set_ficp_info(&ficp_info); pxa_set_ficp_info(&ficp_info);
......
...@@ -179,6 +179,9 @@ static void __init idp_init(void) ...@@ -179,6 +179,9 @@ static void __init idp_init(void)
printk("idp_init()\n"); printk("idp_init()\n");
pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(idp_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_device_register(&smc91x_device); platform_device_register(&smc91x_device);
//platform_device_register(&mst_audio_device); //platform_device_register(&mst_audio_device);
......
...@@ -554,8 +554,12 @@ static struct i2c_pxa_platform_data i2c_pdata = { ...@@ -554,8 +554,12 @@ static struct i2c_pxa_platform_data i2c_pdata = {
static void __init imote2_init(void) static void __init imote2_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
/* SPI chip select directions - all other directions should /* SPI chip select directions - all other directions should
* be handled by drivers.*/ * be handled by drivers.*/
gpio_direction_output(37, 0); gpio_direction_output(37, 0);
......
...@@ -413,6 +413,10 @@ static void __init littleton_init(void) ...@@ -413,6 +413,10 @@ static void __init littleton_init(void)
/* initialize MFP configurations */ /* initialize MFP configurations */
pxa3xx_mfp_config(ARRAY_AND_SIZE(littleton_mfp_cfg)); pxa3xx_mfp_config(ARRAY_AND_SIZE(littleton_mfp_cfg));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
/* /*
* Note: we depend bootloader set the correct * Note: we depend bootloader set the correct
* value to MSC register for SMC91x. * value to MSC register for SMC91x.
......
...@@ -455,6 +455,10 @@ static void __init lpd270_init(void) ...@@ -455,6 +455,10 @@ static void __init lpd270_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(lpd270_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(lpd270_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
lpd270_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4; lpd270_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4;
lpd270_flash_data[1].width = 4; lpd270_flash_data[1].width = 4;
......
...@@ -518,6 +518,10 @@ static void __init lubbock_init(void) ...@@ -518,6 +518,10 @@ static void __init lubbock_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
pxa_set_udc_info(&udc_info); pxa_set_udc_info(&udc_info);
set_pxa_fb_info(&sharp_lm8v31); set_pxa_fb_info(&sharp_lm8v31);
......
...@@ -742,6 +742,10 @@ static void __init magician_init(void) ...@@ -742,6 +742,10 @@ static void __init magician_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(magician_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_add_devices(ARRAY_AND_SIZE(devices)); platform_add_devices(ARRAY_AND_SIZE(devices));
err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN"); err = gpio_request(GPIO83_MAGICIAN_nIR_EN, "nIR_EN");
......
...@@ -576,6 +576,10 @@ static void __init mainstone_init(void) ...@@ -576,6 +576,10 @@ static void __init mainstone_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(mainstone_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(mainstone_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
mst_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4; mst_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4;
mst_flash_data[1].width = 4; mst_flash_data[1].width = 4;
......
...@@ -798,6 +798,9 @@ static void __init mioa701_machine_init(void) ...@@ -798,6 +798,9 @@ static void __init mioa701_machine_init(void)
UP2OCR = UP2OCR_HXOE; UP2OCR = UP2OCR_HXOE;
pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
mio_gpio_request(ARRAY_AND_SIZE(global_gpios)); mio_gpio_request(ARRAY_AND_SIZE(global_gpios));
bootstrap_init(); bootstrap_init();
set_pxa_fb_info(&mioa701_pxafb_info); set_pxa_fb_info(&mioa701_pxafb_info);
......
...@@ -84,6 +84,9 @@ static struct platform_device *devices[] __initdata = { ...@@ -84,6 +84,9 @@ static struct platform_device *devices[] __initdata = {
static void __init mp900c_init(void) static void __init mp900c_init(void)
{ {
printk(KERN_INFO "MobilePro 900/C machine init\n"); printk(KERN_INFO "MobilePro 900/C machine init\n");
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
} }
......
...@@ -530,6 +530,10 @@ static void __init palmld_init(void) ...@@ -530,6 +530,10 @@ static void __init palmld_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
palmld_pm_init(); palmld_pm_init();
set_pxa_fb_info(&palmld_lcd_screen); set_pxa_fb_info(&palmld_lcd_screen);
pxa_set_mci_info(&palmld_mci_platform_data); pxa_set_mci_info(&palmld_mci_platform_data);
......
...@@ -419,6 +419,10 @@ static void __init palmt5_init(void) ...@@ -419,6 +419,10 @@ static void __init palmt5_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
palmt5_pm_init(); palmt5_pm_init();
set_pxa_fb_info(&palmt5_lcd_screen); set_pxa_fb_info(&palmt5_lcd_screen);
pxa_set_mci_info(&palmt5_mci_platform_data); pxa_set_mci_info(&palmt5_mci_platform_data);
......
...@@ -416,6 +416,11 @@ static void __init palmtc_init(void) ...@@ -416,6 +416,11 @@ static void __init palmtc_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtc_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_hwuart_info(NULL);
set_pxa_fb_info(&palmtc_lcd_screen); set_pxa_fb_info(&palmtc_lcd_screen);
pxa_set_mci_info(&palmtc_mci_platform_data); pxa_set_mci_info(&palmtc_mci_platform_data);
pxa_set_udc_info(&palmtc_udc_info); pxa_set_udc_info(&palmtc_udc_info);
......
...@@ -373,6 +373,10 @@ static void __init palmte2_init(void) ...@@ -373,6 +373,10 @@ static void __init palmte2_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmte2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(palmte2_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
set_pxa_fb_info(&palmte2_lcd_screen); set_pxa_fb_info(&palmte2_lcd_screen);
pxa_set_mci_info(&palmte2_mci_platform_data); pxa_set_mci_info(&palmte2_mci_platform_data);
palmte2_udc_init(); palmte2_udc_init();
......
...@@ -653,6 +653,10 @@ static void __init treo_lcd_power_init(void) ...@@ -653,6 +653,10 @@ static void __init treo_lcd_power_init(void)
static void __init treo_init(void) static void __init treo_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
treo_pm_init(); treo_pm_init();
pxa2xx_mfp_config(ARRAY_AND_SIZE(treo_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(treo_pin_config));
treo_lcd_power_init(); treo_lcd_power_init();
......
...@@ -570,6 +570,10 @@ static void __init palmtx_init(void) ...@@ -570,6 +570,10 @@ static void __init palmtx_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
palmtx_pm_init(); palmtx_pm_init();
set_pxa_fb_info(&palmtx_lcd_screen); set_pxa_fb_info(&palmtx_lcd_screen);
pxa_set_mci_info(&palmtx_mci_platform_data); pxa_set_mci_info(&palmtx_mci_platform_data);
......
...@@ -491,6 +491,10 @@ static void __init palmz72_init(void) ...@@ -491,6 +491,10 @@ static void __init palmz72_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmz72_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(palmz72_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
set_pxa_fb_info(&palmz72_lcd_screen); set_pxa_fb_info(&palmz72_lcd_screen);
pxa_set_mci_info(&palmz72_mci_platform_data); pxa_set_mci_info(&palmz72_mci_platform_data);
palmz72_udc_init(); palmz72_udc_init();
......
...@@ -227,6 +227,10 @@ static void __init pcm027_init(void) ...@@ -227,6 +227,10 @@ static void __init pcm027_init(void)
pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config)); pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
/* at last call the baseboard to initialize itself */ /* at last call the baseboard to initialize itself */
......
...@@ -449,6 +449,10 @@ static void __init poodle_init(void) ...@@ -449,6 +449,10 @@ static void __init poodle_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(poodle_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(poodle_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_scoop_config = &poodle_pcmcia_config; platform_scoop_config = &poodle_pcmcia_config;
ret = platform_add_devices(devices, ARRAY_SIZE(devices)); ret = platform_add_devices(devices, ARRAY_SIZE(devices));
......
...@@ -322,9 +322,6 @@ void __init pxa26x_init_irq(void) ...@@ -322,9 +322,6 @@ void __init pxa26x_init_irq(void)
static struct platform_device *pxa25x_devices[] __initdata = { static struct platform_device *pxa25x_devices[] __initdata = {
&pxa25x_device_udc, &pxa25x_device_udc,
&pxa_device_ffuart,
&pxa_device_btuart,
&pxa_device_stuart,
&pxa_device_i2s, &pxa_device_i2s,
&sa1100_device_rtc, &sa1100_device_rtc,
&pxa25x_device_ssp, &pxa25x_device_ssp,
...@@ -372,10 +369,8 @@ static int __init pxa25x_init(void) ...@@ -372,10 +369,8 @@ static int __init pxa25x_init(void)
} }
/* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */
if (cpu_is_pxa255()) { if (cpu_is_pxa255())
clks_register(&pxa25x_hwuart_clkreg, 1); clks_register(&pxa25x_hwuart_clkreg, 1);
ret = platform_device_register(&pxa_device_hwuart);
}
return ret; return ret;
} }
......
...@@ -364,9 +364,6 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) ...@@ -364,9 +364,6 @@ void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&pxa27x_device_udc, &pxa27x_device_udc,
&pxa_device_ffuart,
&pxa_device_btuart,
&pxa_device_stuart,
&pxa_device_i2s, &pxa_device_i2s,
&sa1100_device_rtc, &sa1100_device_rtc,
&pxa_device_rtc, &pxa_device_rtc,
......
...@@ -555,9 +555,6 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) ...@@ -555,9 +555,6 @@ void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
static struct platform_device *devices[] __initdata = { static struct platform_device *devices[] __initdata = {
&pxa27x_device_udc, &pxa27x_device_udc,
&pxa_device_ffuart,
&pxa_device_btuart,
&pxa_device_stuart,
&pxa_device_i2s, &pxa_device_i2s,
&sa1100_device_rtc, &sa1100_device_rtc,
&pxa_device_rtc, &pxa_device_rtc,
......
...@@ -583,6 +583,10 @@ static void __init saar_init(void) ...@@ -583,6 +583,10 @@ static void __init saar_init(void)
/* initialize MFP configurations */ /* initialize MFP configurations */
pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg)); pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_device_register(&smc91x_device); platform_device_register(&smc91x_device);
saar_init_onenand(); saar_init_onenand();
......
...@@ -768,6 +768,10 @@ static void __init common_init(void) ...@@ -768,6 +768,10 @@ static void __init common_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
spitz_init_spi(); spitz_init_spi();
platform_add_devices(devices, ARRAY_SIZE(devices)); platform_add_devices(devices, ARRAY_SIZE(devices));
......
...@@ -760,6 +760,10 @@ static void __init stargate2_init(void) ...@@ -760,6 +760,10 @@ static void __init stargate2_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
/* spi chip selects */ /* spi chip selects */
gpio_direction_output(37, 0); gpio_direction_output(37, 0);
gpio_direction_output(24, 0); gpio_direction_output(24, 0);
......
...@@ -477,6 +477,10 @@ static void __init tavorevb_init(void) ...@@ -477,6 +477,10 @@ static void __init tavorevb_init(void)
/* initialize MFP configurations */ /* initialize MFP configurations */
pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg)); pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
platform_device_register(&smc91x_device); platform_device_register(&smc91x_device);
tavorevb_init_lcd(); tavorevb_init_lcd();
......
...@@ -825,6 +825,11 @@ static void __init tosa_init(void) ...@@ -825,6 +825,11 @@ static void __init tosa_init(void)
int dummy; int dummy;
pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
gpio_set_wake(MFP_PIN_GPIO1, 1); gpio_set_wake(MFP_PIN_GPIO1, 1);
/* We can't pass to gpio-keys since it will drop the Reset altfunc */ /* We can't pass to gpio-keys since it will drop the Reset altfunc */
......
...@@ -524,6 +524,10 @@ static void __init trizeps4_init(void) ...@@ -524,6 +524,10 @@ static void __init trizeps4_init(void)
ARRAY_SIZE(trizeps4_devices)); ARRAY_SIZE(trizeps4_devices));
} }
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
if (0) /* dont know how to determine LCD */ if (0) /* dont know how to determine LCD */
set_pxa_fb_info(&sharp_lcd); set_pxa_fb_info(&sharp_lcd);
else else
......
...@@ -908,6 +908,10 @@ static void __init viper_init(void) ...@@ -908,6 +908,10 @@ static void __init viper_init(void)
pxa2xx_mfp_config(ARRAY_AND_SIZE(viper_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(viper_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
/* Wake-up serial console */ /* Wake-up serial console */
viper_init_serial_gpio(); viper_init_serial_gpio();
......
...@@ -165,6 +165,11 @@ static void __init xcep_init(void) ...@@ -165,6 +165,11 @@ static void __init xcep_init(void)
{ {
pxa2xx_mfp_config(ARRAY_AND_SIZE(xcep_pin_config)); pxa2xx_mfp_config(ARRAY_AND_SIZE(xcep_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
pxa_set_hwuart_info(NULL);
/* See Intel XScale Developer's Guide for details */ /* See Intel XScale Developer's Guide for details */
/* Set RDF and RDN to appropriate values (chip select 3 (smc91x)) */ /* Set RDF and RDN to appropriate values (chip select 3 (smc91x)) */
MSC1 = (MSC1 & 0xffff) | 0xD5540000; MSC1 = (MSC1 & 0xffff) | 0xD5540000;
......
...@@ -444,6 +444,10 @@ static inline void zylonite_init_ohci(void) {} ...@@ -444,6 +444,10 @@ static inline void zylonite_init_ohci(void) {}
static void __init zylonite_init(void) static void __init zylonite_init(void)
{ {
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
/* board-processor specific initialization */ /* board-processor specific initialization */
zylonite_pxa300_init(); zylonite_pxa300_init();
zylonite_pxa320_init(); zylonite_pxa320_init();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册