All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Schwingen <michael@schwingen.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/13] IXP NPE: add support for fixed-speed MII ports
Date: Mon,  3 Jan 2011 14:45:37 +0100	[thread overview]
Message-ID: <1294062338-21084-13-git-send-email-michael@schwingen.org> (raw)
In-Reply-To: <1294062338-21084-1-git-send-email-michael@schwingen.org>

add support for MII ports that lack a PHY with standard PHY registers

Signed-off-by: Michael Schwingen <michael@schwingen.org>
---
 arch/arm/cpu/ixp/npe/npe.c |   18 +++++++++++++++++-
 include/configs/actux2.h   |    5 +++++
 include/configs/actux3.h   |    5 +++++
 3 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 9d1090e..87f4600 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -359,6 +359,21 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
 	debug("%s: 1\n", __FUNCTION__);
 
+#ifdef CONFIG_MII_NPE0_FIXEDLINK
+	if (0 == p_npe->eth_id) {
+		speed = CONFIG_MII_NPE0_SPEED;
+		duplex = CONFIG_MII_NPE0_FULLDUPLEX ? FULL : HALF;
+	}
+	else
+#endif
+#ifdef CONFIG_MII_NPE1_FIXEDLINK
+	if (1 == p_npe->eth_id) {
+		speed = CONFIG_MII_NPE1_SPEED;
+		duplex = CONFIG_MII_NPE1_FULLDUPLEX ? FULL : HALF;
+	}
+	else
+#endif
+	{
 	miiphy_read (dev->name, p_npe->phy_no, PHY_BMSR, &reg_short);
 
 	/*
@@ -388,7 +403,8 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
 	speed = miiphy_speed (dev->name, p_npe->phy_no);
 	duplex = miiphy_duplex (dev->name, p_npe->phy_no);
-
+	}
+	
 	if (p_npe->print_speed) {
 		p_npe->print_speed = 0;
 		printf ("ENET Speed is %d Mbps - %s duplex connection\n",
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index 4ba3ce0..fc0af32 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -152,6 +152,11 @@
 #define	CONFIG_PHY_ADDR			0x00
 /* MII PHY management */
 #define CONFIG_MII			1
+/* fixed-speed switch without standard PHY registers on MII */
+#define CONFIG_MII_NPE0_FIXEDLINK       1
+#define CONFIG_MII_NPE0_SPEED           100
+#define CONFIG_MII_NPE0_FULLDUPLEX      1
+
 /* Number of ethernet rx buffers & descriptors */
 #define CONFIG_SYS_RX_ETH_BUFFER		16
 #define CONFIG_RESET_PHY_R		1
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index 4b9b496..01b5d12 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -152,6 +152,11 @@
 #define	CONFIG_PHY_ADDR			0x10
 /* MII PHY management */
 #define CONFIG_MII			1
+/* fixed-speed switch without standard PHY registers on MII */
+#define CONFIG_MII_NPE0_FIXEDLINK       1
+#define CONFIG_MII_NPE0_SPEED           100
+#define CONFIG_MII_NPE0_FULLDUPLEX      1
+
 /* Number of ethernet rx buffers & descriptors */
 #define CONFIG_SYS_RX_ETH_BUFFER		16
 #define CONFIG_RESET_PHY_R		1
-- 
1.7.2.3

  parent reply	other threads:[~2011-01-03 13:45 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 13:45 [U-Boot] IXP42x patch series - 2nd attempt Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 01/13] add XScale sub architecture (IXP/PXA) to board list Michael Schwingen
2011-01-25 20:38   ` Wolfgang Denk
2011-01-25 23:39     ` Michael Schwingen
2011-01-26  7:30       ` Wolfgang Denk
2011-04-07 13:29         ` Marek Vasut
2011-04-07 14:58           ` Wolfgang Denk
2011-04-07 16:41             ` Marek Vasut
2011-05-20 23:49             ` Marek Vasut
2011-05-19 15:48         ` Marek Vasut
2011-01-03 13:45 ` [U-Boot] [PATCH 02/13] add support for IXP42x Rev. B1 and newer Michael Schwingen
2011-01-25 20:39   ` Wolfgang Denk
2011-01-03 13:45 ` [U-Boot] [PATCH 03/13] trigger hardware watchdog in IXP42x serial driver Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 04/13] Fix IXP code to work after relocation was added Michael Schwingen
2011-01-25 20:42   ` Wolfgang Denk
2011-01-03 13:45 ` [U-Boot] [PATCH 05/13] fix "depend" target in npe directory Michael Schwingen
2011-01-25 20:42   ` Wolfgang Denk
2011-01-26 23:22     ` Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 06/13] add wildcard to sections (for -ffunction-sections/-fdata-sections) Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 07/13] update/fix AcTux1 board Michael Schwingen
2011-01-25 20:44   ` Wolfgang Denk
2011-01-25 23:37     ` Michael Schwingen
2011-01-26  7:26       ` Wolfgang Denk
2011-01-29 15:57     ` Michael Schwingen
2011-01-31 19:01       ` Scott Wood
2011-01-31 19:20         ` Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 08/13] update/fix AcTux2 board Michael Schwingen
2011-01-25 20:46   ` Wolfgang Denk
2011-01-26  9:34     ` Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 09/13] update/fix AcTux3 board Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 10/13] update/fix AcTux4 board Michael Schwingen
2011-01-03 13:45 ` [U-Boot] [PATCH 11/13] update/fix some more IXP42x boards (only compile tested) Michael Schwingen
2011-01-25 20:47   ` Wolfgang Denk
2011-01-25 23:43     ` Michael Schwingen
2011-01-26  7:34       ` Wolfgang Denk
2011-01-03 13:45 ` Michael Schwingen [this message]
2011-01-25 20:48   ` [U-Boot] [PATCH 12/13] IXP NPE: add support for fixed-speed MII ports Wolfgang Denk
2011-01-03 13:45 ` [U-Boot] [PATCH 13/13] add dvlhost (dLAN 200 AV Wireless G) board Michael Schwingen
2011-01-25 20:36   ` Wolfgang Denk
2011-01-25 23: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=1294062338-21084-13-git-send-email-michael@schwingen.org \
    --to=michael@schwingen.org \
    --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 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.