public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Schwingen <rincewind@discworld.dascon.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PATCH: add support for MII-connected ethernet switch for IPX42x
Date: Sat, 10 Nov 2007 16:34:48 +0100	[thread overview]
Message-ID: <20071110153448.GA11033@discworld.dascon.de> (raw)

Hi,

the following patch adds support for an ethernet switch that is connected to
the MII port. In that case, there is no PHY with which auto-negotiation can
be done, and the MII port always runs in full-duplex 100MBit/s mode.

Signed-off-by: Michael Schwingen <michael@schwingen.org>

diff --git a/cpu/ixp/npe/npe.c b/cpu/ixp/npe/npe.c
index 7e4af44..88d0183 100644
--- a/cpu/ixp/npe/npe.c
+++ b/cpu/ixp/npe/npe.c
@@ -361,6 +361,10 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
 	debug("%s: 1\n", __FUNCTION__);
 
+#ifdef CONFIG_MII_ETHSWITCH
+	speed = _100BASET;
+	duplex = FULL;
+#else
 	miiphy_read (dev->name, p_npe->phy_no, PHY_BMSR, &reg_short);
 
 	/*
@@ -396,6 +400,7 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 		printf ("ENET Speed is %d Mbps - %s duplex connection\n",
 			(int) speed, (duplex == HALF) ? "HALF" : "FULL");
 	}
+#endif
 
 	npe_alloc_end = npe_alloc_pool + sizeof(npe_alloc_pool);
 	npe_alloc_free = (u8 *)(((unsigned)npe_alloc_pool +

             reply	other threads:[~2007-11-10 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-10 15:34 Michael Schwingen [this message]
2007-12-08 12:40 ` [U-Boot-Users] PATCH: add support for MII-connected ethernet switch for IPX42x Jean-Christophe PLAGNIOL-VILLARD
2007-12-08 22:22   ` Michael Schwingen
2007-12-09  0:44     ` Ben Warren
2007-12-09  9:21       ` Jean-Christophe PLAGNIOL-VILLARD
2007-12-09 16:45         ` Michael Schwingen

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=20071110153448.GA11033@discworld.dascon.de \
    --to=rincewind@discworld.dascon.de \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox