aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2012-07-05 12:12:39 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-07-23 08:54:53 -0400
commit2fd46f47be0f96be700053d6caa8dcb14453a520 (patch)
treefecfa052b1de9164ebdc3294a5689f2b90bae732 /arch
parentf353a218de6393fb43a5e81c3adbe1aac1a871ab (diff)
netdev: mdio-octeon.c: Convert to use device tree.
Get the MDIO bus controller addresses from the device tree, small clean up in use of devm_* Remove, now unused, platform device setup code. Signed-off-by: David Daney <david.daney@cavium.com> Acked-by: David S. Miller <davem@davemloft.net> Cc: linux-mips@linux-mips.org Cc: devicetree-discuss@lists.ozlabs.org Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/3938/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/cavium-octeon/octeon-platform.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index f62a40f424ca..66cabc2e64c8 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -168,36 +168,6 @@ out:
168} 168}
169device_initcall(octeon_rng_device_init); 169device_initcall(octeon_rng_device_init);
170 170
171/* Octeon SMI/MDIO interface. */
172static int __init octeon_mdiobus_device_init(void)
173{
174 struct platform_device *pd;
175 int ret = 0;
176
177 if (octeon_is_simulation())
178 return 0; /* No mdio in the simulator. */
179
180 /* The bus number is the platform_device id. */
181 pd = platform_device_alloc("mdio-octeon", 0);
182 if (!pd) {
183 ret = -ENOMEM;
184 goto out;
185 }
186
187 ret = platform_device_add(pd);
188 if (ret)
189 goto fail;
190
191 return ret;
192fail:
193 platform_device_put(pd);
194
195out:
196 return ret;
197
198}
199device_initcall(octeon_mdiobus_device_init);
200
201/* Octeon mgmt port Ethernet interface. */ 171/* Octeon mgmt port Ethernet interface. */
202static int __init octeon_mgmt_device_init(void) 172static int __init octeon_mgmt_device_init(void)
203{ 173{