Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190510
b: refs/heads/master
c: 6c17812
h: refs/heads/master
v: v3
  • Loading branch information
David Daney authored and Ralf Baechle committed Apr 30, 2010
1 parent f7fe18e commit f623add
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 20f12160607c09e299a3e93c7bf4d75e8801c9b7
refs/heads/master: 6c17812d622a74950e2cd65f368f0518491cca61
10 changes: 10 additions & 0 deletions trunk/drivers/net/phy/mdio-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id,
static int __init octeon_mdiobus_probe(struct platform_device *pdev)
{
struct octeon_mdiobus *bus;
union cvmx_smix_en smi_en;
int i;
int err = -ENOENT;

Expand All @@ -103,6 +104,10 @@ static int __init octeon_mdiobus_probe(struct platform_device *pdev)
if (!bus->mii_bus)
goto err;

smi_en.u64 = 0;
smi_en.s.en = 1;
cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);

/*
* Standard Octeon evaluation boards don't support phy
* interrupts, we need to poll.
Expand Down Expand Up @@ -133,17 +138,22 @@ static int __init octeon_mdiobus_probe(struct platform_device *pdev)

err:
devm_kfree(&pdev->dev, bus);
smi_en.u64 = 0;
cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
return err;
}

static int __exit octeon_mdiobus_remove(struct platform_device *pdev)
{
struct octeon_mdiobus *bus;
union cvmx_smix_en smi_en;

bus = dev_get_drvdata(&pdev->dev);

mdiobus_unregister(bus->mii_bus);
mdiobus_free(bus->mii_bus);
smi_en.u64 = 0;
cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
return 0;
}

Expand Down

0 comments on commit f623add

Please sign in to comment.