Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191888
b: refs/heads/master
c: 052345a
h: refs/heads/master
v: v3
  • Loading branch information
Marek Vasut authored and Eric Miao committed May 11, 2010
1 parent b9684ff commit 259f597
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83a4a1022654cbb9dd55fcf7c28807a634db54bc
refs/heads/master: 052345aec01cbd22285771eee6e08486c07d3bcc
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ config MACH_COLIBRI320
config MACH_VPAC270
bool "Voipac PXA270"
select PXA27x
select HAVE_PATA_PLATFORM
help
PXA270 based Single Board Computer.

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-pxa/include/mach/vpac270.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@

#define GPIO114_VPAC270_ETH_IRQ 114

#define GPIO36_VPAC270_IDE_IRQ 36

#endif
50 changes: 50 additions & 0 deletions trunk/arch/arm/mach-pxa/vpac270.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/mtd/physmap.h>
#include <linux/dm9000.h>
#include <linux/ucb1400.h>
#include <linux/ata_platform.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -138,6 +139,10 @@ static unsigned long vpac270_pin_config[] __initdata = {
/* I2C */
GPIO117_I2C_SCL,
GPIO118_I2C_SDA,

/* IDE */
GPIO36_GPIO, /* IDE IRQ */
GPIO80_DREQ_1,
};

/******************************************************************************
Expand Down Expand Up @@ -486,6 +491,50 @@ static void __init vpac270_lcd_init(void)
static inline void vpac270_lcd_init(void) {}
#endif

/******************************************************************************
* PATA IDE
******************************************************************************/
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
static struct pata_platform_info vpac270_pata_pdata = {
.ioport_shift = 1,
.irq_flags = IRQF_TRIGGER_RISING,
};

static struct resource vpac270_ide_resources[] = {
[0] = { /* I/O Base address */
.start = PXA_CS3_PHYS + 0x120,
.end = PXA_CS3_PHYS + 0x13f,
.flags = IORESOURCE_MEM
},
[1] = { /* CTL Base address */
.start = PXA_CS3_PHYS + 0x15c,
.end = PXA_CS3_PHYS + 0x15f,
.flags = IORESOURCE_MEM
},
[2] = { /* IDE IRQ pin */
.start = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ),
.end = gpio_to_irq(GPIO36_VPAC270_IDE_IRQ),
.flags = IORESOURCE_IRQ
}
};

static struct platform_device vpac270_ide_device = {
.name = "pata_platform",
.num_resources = ARRAY_SIZE(vpac270_ide_resources),
.resource = vpac270_ide_resources,
.dev = {
.platform_data = &vpac270_pata_pdata,
}
};

static void __init vpac270_ide_init(void)
{
platform_device_register(&vpac270_ide_device);
}
#else
static inline void vpac270_ide_init(void) {}
#endif

/******************************************************************************
* Machine init
******************************************************************************/
Expand All @@ -507,6 +556,7 @@ static void __init vpac270_init(void)
vpac270_eth_init();
vpac270_ts_init();
vpac270_rtc_init();
vpac270_ide_init();
}

MACHINE_START(VPAC270, "Voipac PXA270")
Expand Down

0 comments on commit 259f597

Please sign in to comment.