diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2013-08-06 03:50:10 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-08-06 05:18:53 -0400 |
commit | 4901e136aa5c35873701156c4c0af5b3c2c8faee (patch) | |
tree | 31e98ecec538ce042c62c1eea8350be62565422e /arch | |
parent | 9adad788583c735eb14ddd5cca79a4e2ca2d707c (diff) |
ARM: shmobile: lager: enable Ether
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/board-lager.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 3c67b2ad4494..79151532ef04 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/regulator/fixed.h> | 32 | #include <linux/regulator/fixed.h> |
33 | #include <linux/regulator/machine.h> | 33 | #include <linux/regulator/machine.h> |
34 | #include <linux/sh_eth.h> | ||
34 | #include <mach/common.h> | 35 | #include <mach/common.h> |
35 | #include <mach/irqs.h> | 36 | #include <mach/irqs.h> |
36 | #include <mach/r8a7790.h> | 37 | #include <mach/r8a7790.h> |
@@ -91,6 +92,20 @@ static struct resource mmcif1_resources[] = { | |||
91 | DEFINE_RES_IRQ(gic_spi(170)), | 92 | DEFINE_RES_IRQ(gic_spi(170)), |
92 | }; | 93 | }; |
93 | 94 | ||
95 | /* Ether */ | ||
96 | static struct sh_eth_plat_data ether_pdata __initdata = { | ||
97 | .phy = 0x1, | ||
98 | .edmac_endian = EDMAC_LITTLE_ENDIAN, | ||
99 | .register_type = SH_ETH_REG_FAST_RCAR, | ||
100 | .phy_interface = PHY_INTERFACE_MODE_RMII, | ||
101 | .ether_link_active_low = 1, | ||
102 | }; | ||
103 | |||
104 | static struct resource ether_resources[] __initdata = { | ||
105 | DEFINE_RES_MEM(0xee700000, 0x400), | ||
106 | DEFINE_RES_IRQ(gic_spi(162)), | ||
107 | }; | ||
108 | |||
94 | static const struct pinctrl_map lager_pinctrl_map[] = { | 109 | static const struct pinctrl_map lager_pinctrl_map[] = { |
95 | /* SCIF0 (CN19: DEBUG SERIAL0) */ | 110 | /* SCIF0 (CN19: DEBUG SERIAL0) */ |
96 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", | 111 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790", |
@@ -103,6 +118,15 @@ static const struct pinctrl_map lager_pinctrl_map[] = { | |||
103 | "mmc1_data8", "mmc1"), | 118 | "mmc1_data8", "mmc1"), |
104 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", | 119 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790", |
105 | "mmc1_ctrl", "mmc1"), | 120 | "mmc1_ctrl", "mmc1"), |
121 | /* Ether */ | ||
122 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", | ||
123 | "eth_link", "eth"), | ||
124 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", | ||
125 | "eth_mdio", "eth"), | ||
126 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", | ||
127 | "eth_rmii", "eth"), | ||
128 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790", | ||
129 | "intc_irq0", "intc"), | ||
106 | }; | 130 | }; |
107 | 131 | ||
108 | static void __init lager_add_standard_devices(void) | 132 | static void __init lager_add_standard_devices(void) |
@@ -125,6 +149,11 @@ static void __init lager_add_standard_devices(void) | |||
125 | platform_device_register_resndata(&platform_bus, "sh_mmcif", 1, | 149 | platform_device_register_resndata(&platform_bus, "sh_mmcif", 1, |
126 | mmcif1_resources, ARRAY_SIZE(mmcif1_resources), | 150 | mmcif1_resources, ARRAY_SIZE(mmcif1_resources), |
127 | &mmcif1_pdata, sizeof(mmcif1_pdata)); | 151 | &mmcif1_pdata, sizeof(mmcif1_pdata)); |
152 | |||
153 | platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1, | ||
154 | ether_resources, | ||
155 | ARRAY_SIZE(ether_resources), | ||
156 | ðer_pdata, sizeof(ether_pdata)); | ||
128 | } | 157 | } |
129 | 158 | ||
130 | static const char *lager_boards_compat_dt[] __initdata = { | 159 | static const char *lager_boards_compat_dt[] __initdata = { |