opnsense-src/sys/dev/mmc
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
..
host dwmmc: cleanup cmd and locking, consistency between mmc and mmccam 2025-07-31 17:37:54 +00:00
bridge.h mmc: support for SPI bus type 2025-04-09 12:20:54 +01:00
mmc.c mmc: support for SPI bus type 2025-04-09 12:20:54 +01:00
mmc_fdt_helpers.c mmc: Use bus_topo_lock and taskqueue_bus while adding/removing child devices 2025-03-10 13:32:53 -04:00
mmc_fdt_helpers.h regulator: Move regulator code in dev/regulator 2024-01-10 19:20:32 +01:00
mmc_helpers.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mmc_helpers.h regulator: Move regulator code in dev/regulator 2024-01-10 19:20:32 +01:00
mmc_ioctl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mmc_private.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mmc_pwrseq.c clk: Move clock code in dev/clk 2024-01-10 19:20:26 +01:00
mmc_pwrseq_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
mmc_subr.c mmc: support for SPI bus type 2025-04-09 12:20:54 +01:00
mmc_subr.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mmcbr_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
mmcbrvar.h mmc: support for SPI bus type 2025-04-09 12:20:54 +01:00
mmcbus_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
mmcreg.h mmc: support for SPI bus type 2025-04-09 12:20:54 +01:00
mmcsd.c geom_flashmap: Rename the kernel module 2024-10-29 15:11:12 +00:00
mmcspi.c mmc: SPI-mode support for SD cards. 2025-04-09 12:21:05 +01:00
mmcvar.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00