Page MenuHomeFreeBSD

ofw: Add a ofw_firmware driver
ClosedPublic

Authored by manu on Dec 6 2022, 11:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 10:22 AM
Unknown Object (File)
Tue, Apr 9, 3:19 PM
Unknown Object (File)
Sun, Mar 31, 2:11 PM
Unknown Object (File)
Mar 10 2024, 9:38 PM
Unknown Object (File)
Feb 7 2024, 10:38 AM
Unknown Object (File)
Dec 20 2023, 7:42 AM
Unknown Object (File)
Dec 12 2023, 6:25 AM
Unknown Object (File)
Nov 21 2023, 6:21 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.