kontron-pitx-imx8m: fix board_mmc_getcd()
PATCH 1/1 kontron-pitx-imx8m: fix board_mmc_getcd()
The function wrongly will return the card detection status of the SD card (USDHC2) for the eMMC (USDHC1). Thus booting from eMMC without an inserted SD card will fail.
Signed-off-by Heiko Thiery <[email protected]>
--- board/kontron/pitx_imx8m/spl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
board/kontron/pitx_imx8m/spl.c +3 -4
@@ -76,17 +76,16 @@ static struct i2c_pads_info i2c_pad_info1 = {int board_mmc_getcd (struct mmc *mmc) {struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; -int ret =0 ;switch (cfg->esdhc_base) {case USDHC1_BASE_ADDR :/* the eMMC does not have a CD pin */ - ret =1 ; +return 1 ;case USDHC2_BASE_ADDR : - ret = !gpio_get_value (USDHC2_CD_GPIO ); +return !gpio_get_value (USDHC2_CD_GPIO ); } -return ret; +return 0 ; }
Signature · 1 line
2.30.2
PATCH 1/1 kontron-pitx-imx8m: fix board_mmc_getcd()
Quoted 4 lines
The function wrongly will return the card detection status of the SD card (USDHC2) for the eMMC (USDHC1). Thus booting from eMMC without an inserted SD card will fail.
Signed-off-by Heiko Thiery <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================