aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2010-04-26 15:46:07 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-05-11 11:25:03 -0400
commit052345aec01cbd22285771eee6e08486c07d3bcc (patch)
treedf3b034c4a552f44ddbeffa35c2752f73e4ea370
parent83a4a1022654cbb9dd55fcf7c28807a634db54bc (diff)
[ARM] pxa/vpac270: add ide support
This patch adds support for the on-board IDE channel. I tested this with a CDROM connected over 2.5-3.5 IDE reduction with external power supplied to the CDROM. This was not tested with the Voipac 270-HDD-000 (official Voipac HDD module), but I expect no problems. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-pxa/Kconfig1
-rw-r--r--arch/arm/mach-pxa/include/mach/vpac270.h2
-rw-r--r--arch/arm/mach-pxa/vpac270.c50
3 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index e4a0452e0e2d..3b51741a4810 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -252,6 +252,7 @@ config MACH_COLIBRI320
252config MACH_VPAC270 252config MACH_VPAC270
253 bool "Voipac PXA270" 253 bool "Voipac PXA270"
254 select PXA27x 254 select PXA27x
255 select HAVE_PATA_PLATFORM
255 help 256 help
256 PXA270 based Single Board Computer. 257 PXA270 based Single Board Computer.
257 258
diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/include/mach/vpac270.h
index b90b380ddab9..0d82c47056ef 100644
--- a/arch/arm/mach-pxa/include/mach/vpac270.h
+++ b/arch/arm/mach-pxa/include/mach/vpac270.h
@@ -35,4 +35,6 @@
35 35
36#define GPIO114_VPAC270_ETH_IRQ 114 36#define GPIO114_VPAC270_ETH_IRQ 114
37 37
38#define GPIO36_VPAC270_IDE_IRQ 36
39
38#endif 40#endif
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)
498static struct pata_platform_info vpac270_pata_pdata = {
499 .ioport_shift = 1,
500 .irq_flags = IRQF_TRIGGER_RISING,
501};
502
503static 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
521static 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
530static void __init vpac270_ide_init(void)
531{
532 platform_device_register(&vpac270_ide_device);
533}
534#else
535static inline void vpac270_ide_init(void) {}
536#endif
537
538/******************************************************************************
490 * Machine init 539 * Machine init
491 ******************************************************************************/ 540 ******************************************************************************/
492static void __init vpac270_init(void) 541static 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
512MACHINE_START(VPAC270, "Voipac PXA270") 562MACHINE_START(VPAC270, "Voipac PXA270")