diff options
author | Magnus Damm <damm@opensource.se> | 2011-12-13 11:36:51 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-01-08 20:18:33 -0500 |
commit | db5eb994d3e84f3b008f03e589602f7f639f318c (patch) | |
tree | 55d2159565b70f6cc72f04ea16a4c36f4dc2cf47 /arch/arm/mach-shmobile/board-marzen.c | |
parent | 14f691c139bd372c8b254650db6b3956e6473665 (diff) |
ARM: mach-shmobile: Marzen LAN89218 support
Add LAN89218 support to the r8a7779 Marzen board.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-marzen.c')
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index 7fcd5e10c31d..a72c650047bc 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/gpio.h> | 28 | #include <linux/gpio.h> |
29 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
30 | #include <linux/smsc911x.h> | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <mach/r8a7779.h> | 32 | #include <mach/r8a7779.h> |
32 | #include <mach/common.h> | 33 | #include <mach/common.h> |
@@ -37,7 +38,38 @@ | |||
37 | #include <asm/hardware/gic.h> | 38 | #include <asm/hardware/gic.h> |
38 | #include <asm/traps.h> | 39 | #include <asm/traps.h> |
39 | 40 | ||
41 | /* SMSC LAN89218 */ | ||
42 | static struct resource smsc911x_resources[] = { | ||
43 | [0] = { | ||
44 | .start = 0x18000000, /* ExCS0 */ | ||
45 | .end = 0x180000ff, /* A1->A7 */ | ||
46 | .flags = IORESOURCE_MEM, | ||
47 | }, | ||
48 | [1] = { | ||
49 | .start = gic_spi(28), /* IRQ 1 */ | ||
50 | .flags = IORESOURCE_IRQ, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | static struct smsc911x_platform_config smsc911x_platdata = { | ||
55 | .flags = SMSC911X_USE_32BIT, /* 32-bit SW on 16-bit HW bus */ | ||
56 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
57 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
58 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
59 | }; | ||
60 | |||
61 | static struct platform_device eth_device = { | ||
62 | .name = "smsc911x", | ||
63 | .id = 0, | ||
64 | .dev = { | ||
65 | .platform_data = &smsc911x_platdata, | ||
66 | }, | ||
67 | .resource = smsc911x_resources, | ||
68 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
69 | }; | ||
70 | |||
40 | static struct platform_device *marzen_devices[] __initdata = { | 71 | static struct platform_device *marzen_devices[] __initdata = { |
72 | ð_device, | ||
41 | }; | 73 | }; |
42 | 74 | ||
43 | static struct map_desc marzen_io_desc[] __initdata = { | 75 | static struct map_desc marzen_io_desc[] __initdata = { |
@@ -95,6 +127,10 @@ static void __init marzen_init(void) | |||
95 | gpio_request(GPIO_FN_TX4, NULL); | 127 | gpio_request(GPIO_FN_TX4, NULL); |
96 | gpio_request(GPIO_FN_RX4, NULL); | 128 | gpio_request(GPIO_FN_RX4, NULL); |
97 | 129 | ||
130 | /* LAN89218 */ | ||
131 | gpio_request(GPIO_FN_EX_CS0, NULL); /* nCS */ | ||
132 | gpio_request(GPIO_FN_IRQ1_B, NULL); /* IRQ + PME */ | ||
133 | |||
98 | r8a7779_add_standard_devices(); | 134 | r8a7779_add_standard_devices(); |
99 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 135 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
100 | } | 136 | } |