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
F173234270: D59189.diff
Thu, Sep 24, 1:33 PM
F173234264: D59189.diff
Thu, Sep 24, 1:33 PM
F173234254: D59189.diff
Thu, Sep 24, 1:33 PM
F173139409: D59189.diff
Wed, Sep 23, 9:19 PM
Unknown Object (File)
Mon, Sep 21, 8:41 AM
Unknown Object (File)
Mon, Sep 21, 8:41 AM
Unknown Object (File)
Wed, Sep 16, 3:53 AM
Unknown Object (File)
Tue, Sep 15, 6:57 PM
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