]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: dw_mmc-rockchip: Add missing private data for very old controllers
authorHeiko Stuebner <heiko@sntech.de>
Fri, 22 May 2026 18:43:07 +0000 (20:43 +0200)
committerUlf Hansson <ulfh@kernel.org>
Fri, 29 May 2026 12:55:24 +0000 (14:55 +0200)
commit1e9a4850afa0ceb63984fb1a9f3e86d0fc4fd18f
tree894fcc063983ad91ad8d2b95a42376f7f96f6a94
parent99982b743e5ba72bd1f5de0e03e3b96ae70b1e51
mmc: dw_mmc-rockchip: Add missing private data for very old controllers

The really old controllers (rk2928, rk3066, rk3188) do not support UHS
speeds at all, and thus never handled phase data.

For that reason it never had a parse_dt callback and no driver private
data at all.

Commit ff6f0286c896 ("mmc: dw_mmc-rockchip: Add memory clock auto-gating
support") makes the private data sort of mandatory, because the init
function checks whether phases are configured internally or through the
clock controller.

This results in the old SoCs then experiencing NULL-pointer dereferences
when they try to access that private-data struct.

While we could have if (priv) conditionals in all places, it's way less
cluttery to just give the old types their private-data struct.

Fixes: ff6f0286c896 ("mmc: dw_mmc-rockchip: Add memory clock auto-gating support")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
drivers/mmc/host/dw_mmc-rockchip.c