Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177857
b: refs/heads/master
c: 0f7e64a
h: refs/heads/master
i:
  177855: f008faa
v: v3
  • Loading branch information
David Daney authored and Ralf Baechle committed Dec 17, 2009
1 parent fdd5ba5 commit dc68080
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 362e696428590f7d0a5d0971a2d04b0372a761b8
refs/heads/master: 0f7e64a3941fef0a5735da5184f3ccc0d234b580
30 changes: 30 additions & 0 deletions trunk/arch/mips/cavium-octeon/octeon-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,36 @@ static int __init octeon_rng_device_init(void)
}
device_initcall(octeon_rng_device_init);

/* Octeon SMI/MDIO interface. */
static int __init octeon_mdiobus_device_init(void)
{
struct platform_device *pd;
int ret = 0;

if (octeon_is_simulation())
return 0; /* No mdio in the simulator. */

/* The bus number is the platform_device id. */
pd = platform_device_alloc("mdio-octeon", 0);
if (!pd) {
ret = -ENOMEM;
goto out;
}

ret = platform_device_add(pd);
if (ret)
goto fail;

return ret;
fail:
platform_device_put(pd);

out:
return ret;

}
device_initcall(octeon_mdiobus_device_init);

MODULE_AUTHOR("David Daney <ddaney@caviumnetworks.com>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Platform driver for Octeon SOC");

0 comments on commit dc68080

Please sign in to comment.