diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2007-05-15 05:39:49 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-07-12 09:28:21 -0400 |
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 @@ | |||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | ||
22 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
23 | 24 | ||
24 | #include <asm/hardware.h> | 25 | #include <asm/hardware.h> |
@@ -136,6 +137,19 @@ void __init pxa25x_init_irq(void) | |||
136 | pxa_init_irq_gpio(85); | 137 | pxa_init_irq_gpio(85); |
137 | } | 138 | } |
138 | 139 | ||
140 | static struct platform_device *pxa25x_devices[] __initdata = { | ||
141 | &pxamci_device, | ||
142 | &pxaudc_device, | ||
143 | &pxafb_device, | ||
144 | &ffuart_device, | ||
145 | &btuart_device, | ||
146 | &stuart_device, | ||
147 | &pxai2c_device, | ||
148 | &pxai2s_device, | ||
149 | &pxaficp_device, | ||
150 | &pxartc_device, | ||
151 | }; | ||
152 | |||
139 | static int __init pxa25x_init(void) | 153 | static int __init pxa25x_init(void) |
140 | { | 154 | { |
141 | int ret = 0; | 155 | int ret = 0; |
@@ -146,8 +160,14 @@ static int __init pxa25x_init(void) | |||
146 | #ifdef CONFIG_PM | 160 | #ifdef CONFIG_PM |
147 | pm_set_ops(&pxa25x_pm_ops); | 161 | pm_set_ops(&pxa25x_pm_ops); |
148 | #endif | 162 | #endif |
163 | ret = platform_add_devices(pxa25x_devices, | ||
164 | ARRAY_SIZE(pxa25x_devices)); | ||
149 | } | 165 | } |
150 | return 0; | 166 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ |
167 | if (cpu_is_pxa25x()) | ||
168 | ret = platform_device_register(&hwuart_device); | ||
169 | |||
170 | return ret; | ||
151 | } | 171 | } |
152 | 172 | ||
153 | subsys_initcall(pxa25x_init); | 173 | subsys_initcall(pxa25x_init); |