opnsense-src/sys/dev/mmc/host
Bjoern A. Zeeb 0f8a8416a4 dwmmc: cleanup cmd and locking, consistency between mmc and mmccam
In general sprinkle locking assertions and harmonized KASSERTs
throughout the upper part of the driver to document expectations.

In dwmmc_cmd_done() "cmd" should be set correctly and be used for
both MMCCAM and classic mmc rather than special-casing mmccam.
In dwmmc_next_operation() place variable declarations on the top
for both cases before the first debug and lock assertion calls;
then factor out common parts at the end and put both cases in the
same order.
By calling dwmmc_next_operation() directly from both dwmmc_request()
in the mmc case, and dwmmc_cam_request() in the mmccase (rather than)
chaining calls in the latter, we avoid unlocking the sc in the mmccam
case and have a consistent call path from both; also removing the
mmccam #ifdef from dwmmc_request() brings more clarity.
In dwmmc_next_operation() enhance the panic/error messages with
some extra information and assert that we come in with a cam pinfo
on CAM_ACTIVE_INDEX.

MFC after:      3 days
Reviewed by:	manu
Differential Revision: https://reviews.freebsd.org/D51628
2025-07-31 17:37:54 +00:00
..
dwmmc.c dwmmc: cleanup cmd and locking, consistency between mmc and mmccam 2025-07-31 17:37:54 +00:00
dwmmc_altera.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
dwmmc_hisi.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
dwmmc_reg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dwmmc_rockchip.c Disable HS200 on rockchip_dwmmc in attach 2025-03-18 13:01:21 -04:00
dwmmc_samsung.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
dwmmc_starfive.c jh7110: enable MMC driver 2024-05-07 13:02:57 -03:00
dwmmc_var.h regulator: Move regulator code in dev/regulator 2024-01-10 19:20:32 +01:00