diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-05-15 10:39:49 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-07-12 14:28:21 +0100 |
commit | 34f3231f435dfb8e6c83271c63461fdd2901dc97 (patch) | |
tree | dd9d3f4fffcc07c68a4cf5ef00c28a954e89f751 /arch/arm/mach-pxa/pxa25x.c | |
parent | 4adb70fc1b9b545ce6221f0cc35a8fa0eab13461 (diff) |
[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 <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pxa25x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 22 |
1 files changed, 21 insertions, 1 deletions
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 <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/platform_device.h> #include <linux/pm.h> #include <asm/hardware.h> @@ -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); |