[U-Boot-Users] [PATCH] Add support for Generic PHY in macb

Add support for Generic PHY in macb.
Signed-off-by: michael trimarchi@gandalf.sssup.it
--- drivers/net/macb.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 9c98338..2a6fc5d 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -330,8 +330,12 @@ static int macb_phy_init(struct macb_device *macb) /* Check if the PHY is up to snuff... */ phy_id = macb_mdio_read(macb, MII_PHYSID1); if (phy_id == 0xffff) { +#if defined (CONFIG_GENERIC_PHY) + printf("%s: Using the Generic PHY\n", netdev->name); +#else printf("%s: No PHY present\n", netdev->name); return 0; +#endif }
status = macb_mdio_read(macb, MII_BMSR); --

On Fri, 22 Feb 2008 12:41:17 +0100 michael trimarchi@gandalf.sssup.it wrote:
Add support for Generic PHY in macb.
Signed-off-by: michael trimarchi@gandalf.sssup.it
What's a "generic PHY"?
hskinnemoen@dhcp-252-066:~/git/u-boot/master$ grep -r GENERIC_PHY include/configs hskinnemoen@dhcp-252-066:~/git/u-boot/master$
if (phy_id == 0xffff) {
+#if defined (CONFIG_GENERIC_PHY)
printf("%s: Using the Generic PHY\n", netdev->name);
+#else printf("%s: No PHY present\n", netdev->name); return 0; +#endif
You mean a PHY that isn't actually hooked up?
Haavard
participants (2)
-
Haavard Skinnemoen
-
michael