Skip to contentSkip to conversation

Add support for Generic PHY in macb

PATCH New michael 2 participants 2 messages Feb 22, 2008 Network drivers

lore
Share & tools
lore

michael

author
#0 lore raw

PATCH 1/1 Add support for Generic PHY in macb

Add support for Generic PHY in macb.

---
 drivers/net/macb.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/net/macb.c +4 -0
index 9c98338..2a6fc5d 100644
@@ -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);

--

#1 lore raw

PATCH 1/1 Add support for Generic PHY in macb

Quoted 3 lines · On Fri, 22 Feb 2008 12:41:17 +0100 michael <[email protected]> wrote:

Add support for Generic PHY in macb.

What's a "generic PHY"?

hskinnemoen at dhcp-252-066:~/git/u-boot/master$ grep -r GENERIC_PHY include/configs hskinnemoen at dhcp-252-066:~/git/u-boot/master$

drivers/net/macb.c static int macb_phy_init(struct macb_device *macb) · line 338

Quoted 7 lines
        if (phy_id == 0xffff) {
drivers/net/macb.c +4 -0
+#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