
18 Jan
2012
18 Jan
'12
9:22 a.m.
On 18/01/2012 04:08, Jason Hui wrote:
-int board_mmc_getcd(u8 *cd, struct mmc *mmc) +int board_mmc_getcd(struct mmc *mmc) { struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
int ret; if (cfg->esdhc_base == USDHC3_BASE_ADDR) { gpio_direction_input(171); /*GPIO6_11*/
*cd = gpio_get_value(171);
ret = !gpio_get_value(171); } else /* Don't have the CD GPIO pin on board */
*cd = 0;
ret = 0;
^^^^^^1
Apparently, this is wrong for the else statement, since there is no CD for the SD4 on the board, so, we have to tell MMC system that the card is always there, otherwise, we can't use the MMC
Ok - so we have to invert the logic for the else clause.
plug-in that slot. After change to new prototype, we also need convert the ret value for the SD4, and return 1 not 0 to MMC.
Thanks - I send V3 with the required change.
Best regards, Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
=====================================================================