From 34f3231f435dfb8e6c83271c63461fdd2901dc97 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 15 May 2007 10:39:49 +0100 Subject: [ARM] pxa: move device registration into CPU-specific file This allows individual CPU support to determine which platform devices should be registered. Also fix a copy-n-paste bug in the I2C power platform device entry. Signed-off-by: Russell King --- arch/arm/mach-pxa/pxa25x.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-pxa/pxa25x.c') diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 13437582342d..72b949bdf658 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -136,6 +137,19 @@ void __init pxa25x_init_irq(void) pxa_init_irq_gpio(85); } +static struct platform_device *pxa25x_devices[] __initdata = { + &pxamci_device, + &pxaudc_device, + &pxafb_device, + &ffuart_device, + &btuart_device, + &stuart_device, + &pxai2c_device, + &pxai2s_device, + &pxaficp_device, + &pxartc_device, +}; + static int __init pxa25x_init(void) { int ret = 0; @@ -146,8 +160,14 @@ static int __init pxa25x_init(void) #ifdef CONFIG_PM pm_set_ops(&pxa25x_pm_ops); #endif + ret = platform_add_devices(pxa25x_devices, + ARRAY_SIZE(pxa25x_devices)); } - return 0; + /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ + if (cpu_is_pxa25x()) + ret = platform_device_register(&hwuart_device); + + return ret; } subsys_initcall(pxa25x_init); -- cgit v1.2.1