[PATCH v2025.09.y 29/49] mci: am654-sdhci: correctly configure SLOTTYPE_EMBEDDED

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Dec 19 01:21:05 PST 2025


From: Ahmad Fatoum <a.fatoum at barebox.org>

struct am654_sdhci_plat::non_removable is set no where, so drop it in
favor of struct mci_host::non_removable, which is actually populated by
the MCI core to reflect the non-removable device tree property.

This aligns us with Linux behavior, but hasn't been tested on real
hardware.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
Link: https://lore.barebox.org/20251128104040.1491636-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
(cherry picked from commit 1d04259898e90e58b1ac4277d112d39f10843c13)
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/mci/am654-sdhci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mci/am654-sdhci.c b/drivers/mci/am654-sdhci.c
index 17d3f7627005..bb67c8bf4693 100644
--- a/drivers/mci/am654-sdhci.c
+++ b/drivers/mci/am654-sdhci.c
@@ -156,7 +156,6 @@ struct am654_sdhci_plat {
 	bool fails_without_test_cd;
 
 	struct regmap *base;
-	bool non_removable;
 	u32 otap_del_sel[ARRAY_SIZE(td)];
 	u32 itap_del_sel[ARRAY_SIZE(td)];
 	u32 trm_icp;
@@ -359,7 +358,7 @@ static int am654_sdhci_init(struct mci_host *mci, struct device *dev)
 		regmap_update_bits(plat->base, PHY_CTRL1, IOMUX_ENABLE_MASK, 0);
 
 	/* Set slot type based on SD or eMMC */
-	if (plat->non_removable)
+	if (mci->non_removable)
 		ctl_cfg_2 = SLOTTYPE_EMBEDDED;
 
 	regmap_update_bits(plat->base, CTL_CFG_2, SLOTTYPE_MASK, ctl_cfg_2);
-- 
2.47.3




More information about the barebox mailing list