diff options
Diffstat (limited to 'arch/mips/cavium-octeon/octeon-platform.c')
-rw-r--r-- | arch/mips/cavium-octeon/octeon-platform.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c index 66cabc2e64c8..0938df10a71c 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c | |||
@@ -168,68 +168,6 @@ out: | |||
168 | } | 168 | } |
169 | device_initcall(octeon_rng_device_init); | 169 | device_initcall(octeon_rng_device_init); |
170 | 170 | ||
171 | /* Octeon mgmt port Ethernet interface. */ | ||
172 | static int __init octeon_mgmt_device_init(void) | ||
173 | { | ||
174 | struct platform_device *pd; | ||
175 | int ret = 0; | ||
176 | int port, num_ports; | ||
177 | |||
178 | struct resource mgmt_port_resource = { | ||
179 | .flags = IORESOURCE_IRQ, | ||
180 | .start = -1, | ||
181 | .end = -1 | ||
182 | }; | ||
183 | |||
184 | if (!OCTEON_IS_MODEL(OCTEON_CN56XX) && !OCTEON_IS_MODEL(OCTEON_CN52XX)) | ||
185 | return 0; | ||
186 | |||
187 | if (OCTEON_IS_MODEL(OCTEON_CN56XX)) | ||
188 | num_ports = 1; | ||
189 | else | ||
190 | num_ports = 2; | ||
191 | |||
192 | for (port = 0; port < num_ports; port++) { | ||
193 | pd = platform_device_alloc("octeon_mgmt", port); | ||
194 | if (!pd) { | ||
195 | ret = -ENOMEM; | ||
196 | goto out; | ||
197 | } | ||
198 | /* No DMA restrictions */ | ||
199 | pd->dev.coherent_dma_mask = DMA_BIT_MASK(64); | ||
200 | pd->dev.dma_mask = &pd->dev.coherent_dma_mask; | ||
201 | |||
202 | switch (port) { | ||
203 | case 0: | ||
204 | mgmt_port_resource.start = OCTEON_IRQ_MII0; | ||
205 | break; | ||
206 | case 1: | ||
207 | mgmt_port_resource.start = OCTEON_IRQ_MII1; | ||
208 | break; | ||
209 | default: | ||
210 | BUG(); | ||
211 | } | ||
212 | mgmt_port_resource.end = mgmt_port_resource.start; | ||
213 | |||
214 | ret = platform_device_add_resources(pd, &mgmt_port_resource, 1); | ||
215 | |||
216 | if (ret) | ||
217 | goto fail; | ||
218 | |||
219 | ret = platform_device_add(pd); | ||
220 | if (ret) | ||
221 | goto fail; | ||
222 | } | ||
223 | return ret; | ||
224 | fail: | ||
225 | platform_device_put(pd); | ||
226 | |||
227 | out: | ||
228 | return ret; | ||
229 | |||
230 | } | ||
231 | device_initcall(octeon_mgmt_device_init); | ||
232 | |||
233 | #ifdef CONFIG_USB | 171 | #ifdef CONFIG_USB |
234 | 172 | ||
235 | static int __init octeon_ehci_device_init(void) | 173 | static int __init octeon_ehci_device_init(void) |