Page MenuHomeFreeBSD

ofw: Add a ofw_firmware driver
ClosedPublic

Authored by manu on Dec 6 2022, 11:01 AM.
Tags
None
Referenced Files
F98712815: D37612.diff
Fri, Oct 4, 11:07 AM
F98688685: D37612.diff
Fri, Oct 4, 8:52 AM
F98656115: D37612.diff
Fri, Oct 4, 5:55 AM
Unknown Object (File)
Wed, Oct 2, 2:45 AM
Unknown Object (File)
Tue, Oct 1, 11:07 PM
Unknown Object (File)
Mon, Sep 30, 6:36 AM
Unknown Object (File)
Mon, Sep 30, 6:36 AM
Unknown Object (File)
Mon, Sep 30, 6:31 AM
Subscribers

Details

Summary

Some SoCs have an external firmware doing power management, clock
and other stuffs. (Xilinx, ARM Juno etc ...)
The way it is represent in the DTB is usually having a 'firmware' node
under the root node and have some nodes under it with the correct
compatible strings.
The firmware node itself doesn't have any compatible strings.
This driver is simple subclassed from simplebus and attaches at
BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE so early drivers (like clock drivers)
can still have a change to attach early.

Sponsored by: Beckhoff Automation GmbH & Co. KG

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

manu requested review of this revision.Dec 6 2022, 11:01 AM

Seems to work fine on ARM Morello:

ofw_firmware0: <OFW Firmware Group> on ofwbus0
scmi0: <ARM SCMI interface driver> on ofw_firmware0
This revision is now accepted and ready to land.Jun 7 2023, 10:40 AM
bz requested changes to this revision.Jun 7 2023, 7:02 PM
bz added a subscriber: bz.
bz added inline comments.
sys/dev/ofw/ofw_firmware.c
79

Can't we save *di ourselves given it's always constant NULL (and probably the other 3 constant arguments too)?

And that'll simplify ofw_firmware_setup_dinfo() as well.

Given they are static, is there any other usage of them envisioned to keep them as are?

This revision now requires changes to proceed.Jun 7 2023, 7:02 PM
This revision was not accepted when it landed; it landed in state Needs Revision.Aug 8 2023, 1:14 PM
This revision was automatically updated to reflect the committed changes.