aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-11-28 02:01:55 -0500
committerEric Miao <eric.miao@marvell.com>2008-12-02 01:42:40 -0500
commit994642934d99b9a4d5447d628de7c321c4fde5fe (patch)
tree98706a47ad60f3ab6b418ceaeab5edea99db7186
parente8a5ab1f7385fb8f3c55348b7bb372a463c55d09 (diff)
[ARM] pxa: move power I2C device definitions into devices.c
Let's put these devices into a central place even if they are now processor specific, as they might be re-used in later processors. Signed-off-by: Eric Miao <eric.miao@marvell.com>
-rw-r--r--arch/arm/mach-pxa/devices.c42
-rw-r--r--arch/arm/mach-pxa/pxa27x.c20
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c19
3 files changed, 42 insertions, 39 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 4db449258976..55699a216f93 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -261,6 +261,48 @@ void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
261 pxa_register_device(&pxa_device_i2c, info); 261 pxa_register_device(&pxa_device_i2c, info);
262} 262}
263 263
264#ifdef CONFIG_PXA27x
265static struct resource pxa27x_resources_i2c_power[] = {
266 {
267 .start = 0x40f00180,
268 .end = 0x40f001a3,
269 .flags = IORESOURCE_MEM,
270 }, {
271 .start = IRQ_PWRI2C,
272 .end = IRQ_PWRI2C,
273 .flags = IORESOURCE_IRQ,
274 },
275};
276
277struct platform_device pxa27x_device_i2c_power = {
278 .name = "pxa2xx-i2c",
279 .id = 1,
280 .resource = pxa27x_resources_i2c_power,
281 .num_resources = ARRAY_SIZE(pxa27x_resources_i2c_power),
282};
283#endif
284
285#ifdef CONFIG_PXA3xx
286static struct resource pxa3xx_resources_i2c_power[] = {
287 {
288 .start = 0x40f500c0,
289 .end = 0x40f500d3,
290 .flags = IORESOURCE_MEM,
291 }, {
292 .start = IRQ_PWRI2C,
293 .end = IRQ_PWRI2C,
294 .flags = IORESOURCE_IRQ,
295 },
296};
297
298struct platform_device pxa3xx_device_i2c_power = {
299 .name = "pxa2xx-i2c",
300 .id = 1,
301 .resource = pxa3xx_resources_i2c_power,
302 .num_resources = ARRAY_SIZE(pxa3xx_resources_i2c_power),
303};
304#endif
305
264static struct resource pxai2s_resources[] = { 306static struct resource pxai2s_resources[] = {
265 { 307 {
266 .start = 0x40400000, 308 .start = 0x40400000,
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 67592664493d..7c116693185b 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -319,26 +319,6 @@ void __init pxa27x_init_irq(void)
319/* 319/*
320 * device registration specific to PXA27x. 320 * device registration specific to PXA27x.
321 */ 321 */
322
323static struct resource i2c_power_resources[] = {
324 {
325 .start = 0x40f00180,
326 .end = 0x40f001a3,
327 .flags = IORESOURCE_MEM,
328 }, {
329 .start = IRQ_PWRI2C,
330 .end = IRQ_PWRI2C,
331 .flags = IORESOURCE_IRQ,
332 },
333};
334
335struct platform_device pxa27x_device_i2c_power = {
336 .name = "pxa2xx-i2c",
337 .id = 1,
338 .resource = i2c_power_resources,
339 .num_resources = ARRAY_SIZE(i2c_power_resources),
340};
341
342void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) 322void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info)
343{ 323{
344 local_irq_disable(); 324 local_irq_disable();
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index b3cd5d0b0f35..7775f882493b 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -529,25 +529,6 @@ void __init pxa3xx_init_irq(void)
529 * device registration specific to PXA3xx. 529 * device registration specific to PXA3xx.
530 */ 530 */
531 531
532static struct resource i2c_power_resources[] = {
533 {
534 .start = 0x40f500c0,
535 .end = 0x40f500d3,
536 .flags = IORESOURCE_MEM,
537 }, {
538 .start = IRQ_PWRI2C,
539 .end = IRQ_PWRI2C,
540 .flags = IORESOURCE_IRQ,
541 },
542};
543
544struct platform_device pxa3xx_device_i2c_power = {
545 .name = "pxa2xx-i2c",
546 .id = 1,
547 .resource = i2c_power_resources,
548 .num_resources = ARRAY_SIZE(i2c_power_resources),
549};
550
551void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) 532void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info)
552{ 533{
553 pxa3xx_device_i2c_power.dev.platform_data = info; 534 pxa3xx_device_i2c_power.dev.platform_data = info;