mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Renaud Barbier <Renaud.Barbier@ametek.com>
To: Sascha Hauer <sha@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: RE: [PATCH 2/2] ARM: Layerscape: Add LS1021A IOT board support
Date: Fri, 17 Feb 2023 13:44:25 +0000	[thread overview]
Message-ID: <BL0PR07MB5665182C6ACFFFB3B4AB456AECA19@BL0PR07MB5665.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20230217093619.GP10447@pengutronix.de>

> 
> A phy is registered in phy_register_device(). The call to register_device() in
> that function will end up in mdio_bus_match(). You could add some
> debugging there to see which phy ids are matched against each other.
> 
> An idea is that the at803x driver is not yet registered by the time
> phy_device_connect() is called, but I don't see how this could happen.
> 
For some reason mdio_bus_match is not called.
So if I understand the sequence correctly 

First phy_register is called and assign genphy to all phys

phy_register_device id = 0x0, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY
phy_register_device id = 0x4dd074, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY
phy_register_device id = 0x4dd074, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY

I see no call being made to  mdio_bus_match


Then I see that the Atheros PHY driver is registered:
register generic for: Generic PHY, id = 0xffffffff, config_init = 0xbbe143b8
register specific for: Atheros 8031 ethernet, id = 0x4dd074, config_init = 0xbbe15f38


And eventually phy connect  who uses the generic driver 

Is not it the problem that the Atheros driver should be loaded first.

ret = register_device(&phydev->dev);
          if (ret)
                  return ret;

          if (phydev->bus)
                  phydev->bus->phy_map[phydev->addr] = phydev;

          phydev->registered = 1;

          if (phydev->dev.driver)
                  return 0;

          phydev->dev.driver = &genphy_driver.drv;

Would not the line above  overwrite the Atheros driver anyway?



  reply	other threads:[~2023-02-17 13:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 13:26 Renaud Barbier
2023-02-10 12:23 ` Sascha Hauer
2023-02-16 11:54   ` Renaud Barbier
2023-02-16 12:54     ` Sascha Hauer
2023-02-16 13:56       ` Renaud Barbier
2023-02-17  9:36         ` Sascha Hauer
2023-02-17 13:44           ` Renaud Barbier [this message]
2023-02-17 14:51             ` Sascha Hauer
2023-02-17 18:06               ` Renaud Barbier
2023-02-21 10:31                 ` Sascha Hauer
2023-02-17 15:22           ` Renaud Barbier
2023-02-16 13:58       ` Renaud Barbier
2023-03-13 14:43 Renaud Barbier

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=BL0PR07MB5665182C6ACFFFB3B4AB456AECA19@BL0PR07MB5665.namprd07.prod.outlook.com \
    --to=renaud.barbier@ametek.com \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.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