All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <david.s.daney@gmail.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: Peter 'p2' De Schrijver <p2@debian.org>,
	Jan Rovins <janr@adax.com>,
	linux-mips@linux-mips.org
Subject: Re: linux 2.6.33 on movidis x16
Date: Fri, 19 Mar 2010 16:00:43 -0700	[thread overview]
Message-ID: <4BA4021B.4010905@gmail.com> (raw)
In-Reply-To: <4BA27048.2010707@caviumnetworks.com>

[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]

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@adax.com>  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


[-- Attachment #2: movidis.diff --]
[-- Type: text/plain, Size: 1853 bytes --]

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... */

  parent reply	other threads:[~2010-03-19 23:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 14:11 linux 2.6.33 on movidis x16 Peter 'p2' De Schrijver
2010-03-15 22:27 ` Jan Rovins
2010-03-18 18:17   ` Peter 'p2' De Schrijver
2010-03-18 18:26     ` David Daney
2010-03-18 18:59       ` Jan Rovins
2010-03-19 17:52         ` Peter 'p2' De Schrijver
2010-03-19 20:27           ` Jan Rovins
2010-03-19 22:03             ` David Daney
2010-03-19 22:38               ` Jan Rovins
2010-03-19 23:00       ` David Daney [this message]
2010-03-21 16:00         ` Peter 'p2' De Schrijver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BA4021B.4010905@gmail.com \
    --to=david.s.daney@gmail.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=janr@adax.com \
    --cc=linux-mips@linux-mips.org \
    --cc=p2@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.