aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/spibus/controller/rockchip
Commit message (Collapse)AuthorAgeFilesLines
* rk_spi: Do not change the clock with the driver lock heldEmmanuel Vadot2026-10-201-6/+27
| | | | | | | | | | The clock framework can sleep, it takes the clock topology sx lock. Calling clk_set_freq() and clk_get_freq() from rk_spi_hw_setup() with the driver mutex held triggers a witness warning about a sleepable lock acquired after a non-sleepable one, on the first transfer that raises the clock. Set the clock in a new function that is called before taking the lock, and only keep the register setup under the lock.
* bus_generic_detach: Delete children after detaching themJohn Baldwin2025-01-021-2/+0
| | | | | | | | | | | | | | | | | This provides better semantics as a standalone DEVMETHOD for device_attach as bus drivers should remove child devices they created as part of detach cleanup. The implementation calls bus_detach_children() first to permit child devices an opportunity to veto the detach operation. If that succeeds, device_delete_children() is used to delete the child devices. This requires fixing various drivers that were deleting devices explicitly (via a device_t pointer cached in the softc) after calling bus_generic_detach to stop doing that and just rely on bus_generic_detach to remove child devices. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47959
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-061-1/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-251-1/+1
| | | | Sponsored by: Netflix
* hwreset: Move reset code in dev/hwresetEmmanuel Vadot2024-01-101-1/+1
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: imp Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43192
* clk: Move clock code in dev/clkEmmanuel Vadot2024-01-101-1/+1
| | | | | | | | | | | We've removed kernel option EXT_RESOURCES almost two years ago. While it was ok to have some code under a common 'extres' subdirectory at first, we now have a lot of consumer of it and we made it mandatory so no need to have it under a cryptic name. Reviewed by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D43191
* spibus: Move rockchip driver into the common directoryEmmanuel Vadot2024-01-101-0/+476
No need to keep it under sys/arm64/rockchip It's easier to find which controller we support by looking under one directory. Sponsored by: Beckhoff Automation GmbH & Co. KG