On 03/18/2010 11:26 AM, David Daney wrote:
On 03/18/2010 11:17 AM, Peter 'p2' De Schrijver wrote:
On 2010-03-15 18:27:41 (-0400), Jan Rovins<janr@xxxxxxxx> wrote:
Peter 'p2' De Schrijver wrote:
Hi,
We are trying to get linux 2.6.33 to work on the movidis x16 board.
Main thing
missing is the addresses of the PHYs. Does anyone know those ?
Unfortunately I don't have physical access to the board so I can't
just look
for the PHY components being used.
Thanks,
Peter.
Do you mean the Movidis x19 ?
Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
We have 2 of these in our lab. They are running the old 2.6.21.7 from
the CnUsers 1.8.1 tool chain.
They are currently being used by other developers for some application
testing, but I can grab the serial console boot-up messages and send
them to you, if the PHY info is in there.
That would be helpful. Otherwise you could also try running ethtool
on all the
interfaces. That should give you the PHY address as well.
I just found one of these. Current theory is that the PHY addresses
are 0-7
I don't think the PHY numbers are printed anywhere.
Can you try the attached patch?
from the back of the box we have:
---------------------------------------
| eth5 | eth7 | | eth1 | eth3 |
---------------------------------------
| eth4 | eth6 | | eth0 | eth2 |
---------------------------------------
I was able to boot 2.6.34-rc1 to a Debian root nfs mounted via eth1.
I didn't verify that eth4 - eth7 worked.
David Daney
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index 61a4461..dfaaf30 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -87,6 +87,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;
@@ -102,6 +103,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.
@@ -132,17 +137,22 @@ err_register:
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;
}
diff --git a/drivers/staging/octeon/cvmx-helper-board.c b/drivers/staging/octeon/cvmx-helper-board.c
index 3085e38..fb8d3ee 100644
--- a/drivers/staging/octeon/cvmx-helper-board.c
+++ b/drivers/staging/octeon/cvmx-helper-board.c
@@ -153,6 +153,13 @@ int cvmx_helper_board_get_mii_address(int ipd_port)
* through switch.
*/
return -1;
+ case CVMX_BOARD_TYPE_CUST_WSX16:
+ if (ipd_port >= 0 && ipd_port <= 3)
+ return ipd_port;
+ else if (ipd_port >= 16 && ipd_port <= 19)
+ return ipd_port - 16 + 4;
+ else
+ return -1;
}
/* Some unknown board. Somebody forgot to update this function... */