[PATCH] mci: am654-sdhci: correctly configure SLOTTYPE_EMBEDDED

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Nov 28 02:40:39 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>
---
 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 0b79394c529b..4ceea226f717 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