Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191885
b: refs/heads/master
c: 947fb57
h: refs/heads/master
i:
  191883: 3f05621
v: v3
  • Loading branch information
Marek Vasut authored and Eric Miao committed May 11, 2010
1 parent ba01b63 commit 765f314
Show file tree
Hide file tree
Showing 3 changed files with 53 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: 3d98f8816adafce2933599902fd9a5c0ccedd822
refs/heads/master: 947fb57e3a6be2920423de42a503eea08b0c0763
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-pxa/include/mach/vpac270.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@
#define GPIO16_VPAC270_CF_RESET 16

#define GPIO41_VPAC270_UDC_DETECT 41

#define GPIO114_VPAC270_ETH_IRQ 114

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

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -117,6 +118,9 @@ static unsigned long vpac270_pin_config[] __initdata = {

/* UDC */
GPIO41_GPIO,

/* Ethernet */
GPIO114_GPIO, /* IRQ */
};

/******************************************************************************
Expand Down Expand Up @@ -308,6 +312,50 @@ static void __init vpac270_udc_init(void)
static inline void vpac270_udc_init(void) {}
#endif

/******************************************************************************
* Ethernet
******************************************************************************/
#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
static struct resource vpac270_dm9000_resources[] = {
[0] = {
.start = PXA_CS2_PHYS + 0x300,
.end = PXA_CS2_PHYS + 0x303,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = PXA_CS2_PHYS + 0x304,
.end = PXA_CS2_PHYS + 0x343,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ),
.end = IRQ_GPIO(GPIO114_VPAC270_ETH_IRQ),
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
},
};

static struct dm9000_plat_data vpac270_dm9000_platdata = {
.flags = DM9000_PLATF_32BITONLY,
};

static struct platform_device vpac270_dm9000_device = {
.name = "dm9000",
.id = -1,
.num_resources = ARRAY_SIZE(vpac270_dm9000_resources),
.resource = vpac270_dm9000_resources,
.dev = {
.platform_data = &vpac270_dm9000_platdata,
}
};

static void __init vpac270_eth_init(void)
{
platform_device_register(&vpac270_dm9000_device);
}
#else
static inline void vpac270_eth_init(void) {}
#endif

/******************************************************************************
* Framebuffer
******************************************************************************/
Expand Down Expand Up @@ -390,6 +438,7 @@ static void __init vpac270_init(void)
vpac270_keys_init();
vpac270_uhc_init();
vpac270_udc_init();
vpac270_eth_init();
}

MACHINE_START(VPAC270, "Voipac PXA270")
Expand Down

0 comments on commit 765f314

Please sign in to comment.