From: Ahmad Fatoum <[email protected]> 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 <[email protected]> Link: https://lore.barebox.org/[email protected] Signed-off-by: Sascha Hauer <[email protected]> (cherry picked from commit 1d04259898e90e58b1ac4277d112d39f10843c13) Signed-off-by: Ahmad Fatoum <[email protected]> --- 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
