diff options
-rw-r--r-- | arch/sh/boards/se/770x/setup.c | 49 | ||||
-rw-r--r-- | include/asm-sh/se.h | 15 |
2 files changed, 64 insertions, 0 deletions
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c index 318bc8a3969c..25767cc3a50d 100644 --- a/arch/sh/boards/se/770x/setup.c +++ b/arch/sh/boards/se/770x/setup.c | |||
@@ -115,9 +115,58 @@ static struct platform_device heartbeat_device = { | |||
115 | .resource = heartbeat_resources, | 115 | .resource = heartbeat_resources, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | /* SH771X Ethernet driver */ | ||
119 | static struct resource sh_eth0_resources[] = { | ||
120 | [0] = { | ||
121 | .start = SH_ETH0_BASE, | ||
122 | .end = SH_ETH0_BASE + 0x1B8, | ||
123 | .flags = IORESOURCE_MEM, | ||
124 | }, | ||
125 | [1] = { | ||
126 | .start = SH_ETH0_IRQ, | ||
127 | .end = SH_ETH0_IRQ, | ||
128 | .flags = IORESOURCE_IRQ, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | static struct platform_device sh_eth0_device = { | ||
133 | .name = "sh-eth", | ||
134 | .id = 0, | ||
135 | .dev = { | ||
136 | .platform_data = PHY_ID, | ||
137 | }, | ||
138 | .num_resources = ARRAY_SIZE(sh_eth0_resources), | ||
139 | .resource = sh_eth0_resources, | ||
140 | }; | ||
141 | |||
142 | static struct resource sh_eth1_resources[] = { | ||
143 | [0] = { | ||
144 | .start = SH_ETH1_BASE, | ||
145 | .end = SH_ETH1_BASE + 0x1B8, | ||
146 | .flags = IORESOURCE_MEM, | ||
147 | }, | ||
148 | [1] = { | ||
149 | .start = SH_ETH1_IRQ, | ||
150 | .end = SH_ETH1_IRQ, | ||
151 | .flags = IORESOURCE_IRQ, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | static struct platform_device sh_eth1_device = { | ||
156 | .name = "sh-eth", | ||
157 | .id = 1, | ||
158 | .dev = { | ||
159 | .platform_data = PHY_ID, | ||
160 | }, | ||
161 | .num_resources = ARRAY_SIZE(sh_eth1_resources), | ||
162 | .resource = sh_eth1_resources, | ||
163 | }; | ||
164 | |||
118 | static struct platform_device *se_devices[] __initdata = { | 165 | static struct platform_device *se_devices[] __initdata = { |
119 | &heartbeat_device, | 166 | &heartbeat_device, |
120 | &cf_ide_device, | 167 | &cf_ide_device, |
168 | &sh_eth0_device, | ||
169 | &sh_eth1_device, | ||
121 | }; | 170 | }; |
122 | 171 | ||
123 | static int __init se_devices_setup(void) | 172 | static int __init se_devices_setup(void) |
diff --git a/include/asm-sh/se.h b/include/asm-sh/se.h index bd2596c014a9..0e2f720b9664 100644 --- a/include/asm-sh/se.h +++ b/include/asm-sh/se.h | |||
@@ -76,6 +76,21 @@ | |||
76 | #define IRQ_CFCARD 7 | 76 | #define IRQ_CFCARD 7 |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | /* SH Ether support (SH7710/SH7712) */ | ||
80 | /* Base address */ | ||
81 | #define SH_ETH0_BASE 0xA7000000 | ||
82 | #define SH_ETH1_BASE 0xA7000400 | ||
83 | /* PHY ID */ | ||
84 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) | ||
85 | # define PHY_ID 0x00 | ||
86 | #elif defined(CONFIG_CPU_SUBTYPE_SH7712) | ||
87 | # define PHY_ID 0x01 | ||
88 | #endif | ||
89 | /* Ether IRQ */ | ||
90 | #define SH_ETH0_IRQ 80 | ||
91 | #define SH_ETH1_IRQ 81 | ||
92 | #define SH_TSU_IRQ 82 | ||
93 | |||
79 | #define __IO_PREFIX se | 94 | #define __IO_PREFIX se |
80 | #include <asm/io_generic.h> | 95 | #include <asm/io_generic.h> |
81 | 96 | ||