diff options
Diffstat (limited to 'arch/arm/mach-pxa/vpac270.c')
-rw-r--r-- | arch/arm/mach-pxa/vpac270.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 0a9647b1916d..6575b8f352c9 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/dm9000.h> | 24 | #include <linux/dm9000.h> |
25 | #include <linux/ucb1400.h> | 25 | #include <linux/ucb1400.h> |
26 | #include <linux/ata_platform.h> | ||
26 | 27 | ||
27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
@@ -138,6 +139,10 @@ static unsigned long vpac270_pin_config[] __initdata = { | |||
138 | /* I2C */ | 139 | /* I2C */ |
139 | GPIO117_I2C_SCL, | 140 | GPIO117_I2C_SCL, |
140 | GPIO118_I2C_SDA, | 141 | GPIO118_I2C_SDA, |
142 | |||
143 | /* IDE */ | ||
144 | GPIO36_GPIO, /* IDE IRQ */ | ||
145 | GPIO80_DREQ_1, | ||
141 | }; | 146 | }; |
142 | 147 | ||
143 | /****************************************************************************** | 148 | /****************************************************************************** |
@@ -487,6 +492,50 @@ static inline void vpac270_lcd_init(void) {} | |||
487 | #endif | 492 | #endif |
488 | 493 | ||
489 | /****************************************************************************** | 494 | /****************************************************************************** |
495 | * PATA IDE | ||
496 | ******************************************************************************/ | ||
497 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | ||
498 | static struct pata_platform_info vpac270_pata_pdata = { | ||
499 | .ioport_shift = 1, | ||
500 | .irq_flags = IRQF_TRIGGER_RISING, | ||
501 | }; | ||
502 | |||
503 | static struct resource vpac270_ide_resources[] = { | ||
504 | [0] = { /* I/O Base address */ | ||
505 | .start = PXA_CS3_PHYS + 0x120, | ||
506 | .end = PXA_CS3_PHYS + 0x13f, | ||
507 | .flags = IORESOURCE_MEM | ||
508 | }, | ||
509 | [1] = { /* CTL Base address */ | ||
510 | .start = PXA_CS3_PHYS + 0x15c, | ||
511 | .end = PXA_CS3_PHYS + 0x15f, | ||
512 | .flags = IORESOURCE_MEM | ||
513 | }, | ||
514 | [2] = { /* IDE IRQ pin */ | ||
515 | .start = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ), | ||
516 | .end = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ), | ||
517 | .flags = IORESOURCE_IRQ | ||
518 | } | ||
519 | }; | ||
520 | |||
521 | static struct platform_device vpac270_ide_device = { | ||
522 | .name = "pata_platform", | ||
523 | .num_resources = ARRAY_SIZE(vpac270_ide_resources), | ||
524 | .resource = vpac270_ide_resources, | ||
525 | .dev = { | ||
526 | .platform_data = &vpac270_pata_pdata, | ||
527 | } | ||
528 | }; | ||
529 | |||
530 | static void __init vpac270_ide_init(void) | ||
531 | { | ||
532 | platform_device_register(&vpac270_ide_device); | ||
533 | } | ||
534 | #else | ||
535 | static inline void vpac270_ide_init(void) {} | ||
536 | #endif | ||
537 | |||
538 | /****************************************************************************** | ||
490 | * Machine init | 539 | * Machine init |
491 | ******************************************************************************/ | 540 | ******************************************************************************/ |
492 | static void __init vpac270_init(void) | 541 | static void __init vpac270_init(void) |
@@ -507,6 +556,7 @@ static void __init vpac270_init(void) | |||
507 | vpac270_eth_init(); | 556 | vpac270_eth_init(); |
508 | vpac270_ts_init(); | 557 | vpac270_ts_init(); |
509 | vpac270_rtc_init(); | 558 | vpac270_rtc_init(); |
559 | vpac270_ide_init(); | ||
510 | } | 560 | } |
511 | 561 | ||
512 | MACHINE_START(VPAC270, "Voipac PXA270") | 562 | MACHINE_START(VPAC270, "Voipac PXA270") |