[oe-commits] Steffen Sledz : u-boot-2009.03: fix link detection for onboard switch at hipox machine

git version control git at git.openembedded.org
Mon Feb 1 08:37:20 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 7d4856529148f17a73226fee99975ec99f885495
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=7d4856529148f17a73226fee99975ec99f885495

Author: Steffen Sledz <sledz at dresearch.de>
Date:   Mon Feb  1 09:36:37 2010 +0100

u-boot-2009.03: fix link detection for onboard switch at hipox machine

Signed-off-by: Mario Schuknecht <m.schuknecht at dresearch.de>

Acked-by: Steffen Sledz <sledz at dresearch.de>

---

 .../hipox/03-hipox-direct-switch.patch             |   45 ++++++++++++++++++++
 recipes/u-boot/u-boot_2009.03.bb                   |    1 +
 2 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/recipes/u-boot/u-boot-2009.03/hipox/03-hipox-direct-switch.patch b/recipes/u-boot/u-boot-2009.03/hipox/03-hipox-direct-switch.patch
new file mode 100644
index 0000000..3a5ac05
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.03/hipox/03-hipox-direct-switch.patch
@@ -0,0 +1,45 @@
+--- u-boot-2009.03.orig/board/hipox/eth.c	2010-01-29 15:26:12.000000000 +0000
++++ u-boot-2009.03/board/hipox/eth.c	2010-01-29 15:35:01.000000000 +0000
+@@ -1356,8 +1356,11 @@
+ 	}
+ }
+ 
+-int detect_link_speed(void)
++static int detect_link_speed(void)
+ {
++#ifdef CONFIG_HIPOX
++	priv->link_is_1000M = 0;
++#else
+ 	u32 lpa2 = phy_read(priv->phy_id, MII_STAT1000);
+ 
+ 	if (((lpa2 & LPA_1000FULL)) ||
+@@ -1366,18 +1369,26 @@
+ 	} else {
+ 		priv->link_is_1000M = 0;
+ 	}
+-
++#endif
+ 	return 0;
+ }
+ 
+-int is_autoneg_complete(void)
++static int is_autoneg_complete(void)
+ {
++#ifdef CONFIG_HIPOX
++	return 1;
++#else
+     return phy_read(priv->phy_addr, MII_BMSR) & BMSR_ANEGCOMPLETE;
++#endif
+ }
+ 
+-int is_link_ok(void)
++static int is_link_ok(void)
+ {
++#ifdef CONFIG_HIPOX
++	return 1;
++#else
+ 	return phy_read(priv->phy_id, MII_BMSR) & BMSR_LSTATUS;
++#endif
+ }
+ 
+ int eth_init(bd_t *bd)
diff --git a/recipes/u-boot/u-boot_2009.03.bb b/recipes/u-boot/u-boot_2009.03.bb
index a2c0c6f..a70fa6a 100644
--- a/recipes/u-boot/u-boot_2009.03.bb
+++ b/recipes/u-boot/u-boot_2009.03.bb
@@ -9,6 +9,7 @@ SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 "
 SRC_URI_append_hipox = "file://00-hipox.patch;patch=1 \
 	file://01-hipox-fix-gmac-reset.patch;patch=1 \
 	file://02-hipox-enable-mmu.patch;patch=1 \
+	file://03-hipox-direct-switch.patch;patch=1 \
 "
 
 TARGET_LDFLAGS = ""





More information about the Openembedded-commits mailing list