Page MenuHomeFreeBSD

etherswitch/e6000sw: probe as an FDT device via new mdio_fdt(4) flavour
Needs ReviewPublic

Authored by jhibbits on Wed, Aug 26, 3:02 AM.
Tags
None
Referenced Files
F169997642: D59189.diff
Thu, Sep 3, 5:27 AM
Unknown Object (File)
Wed, Sep 2, 7:58 PM
Unknown Object (File)
Wed, Sep 2, 4:51 PM
Unknown Object (File)
Wed, Sep 2, 10:46 AM
Unknown Object (File)
Wed, Sep 2, 1:33 AM
Unknown Object (File)
Tue, Sep 1, 7:11 PM
Unknown Object (File)
Tue, Sep 1, 1:39 PM
Unknown Object (File)
Tue, Sep 1, 9:17 AM
Subscribers

Details

Reviewers
adrian
Summary

e6000sw's probe was doing far too much: it walked OF_finddevice("/")
looking for a "marvell,mv88e6085" or "marvell,mv88e6190" node
anywhere in the tree, filled in most of the softc, spun up a
throwaway sx lock just to read SWITCH_ID over MDIO,
port-count / phy-base from the ID. Any board with FDT enabled ran
all of that whether or not it had a Marvell switch on a given MDIO
device.

Split the work along the usual newbus boundary:

  • Make e6000sw_probe() the trivial probe that it should be, moving the meat into e600sw_attach() where it belongs.
  • e6000sw_attach() updates the description after it determines the device in setup.
  • e6000sw_identify() skips FDT parents; on hint-only builds it still adds the wildcard child as before.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76183
Build 73066: arc lint + arc unit