Skip to content
Snippets Groups Projects
Commit a6776876 authored by Nicola Sparnacci's avatar Nicola Sparnacci
Browse files

[SANTINO] Fix usdhc index in the board file

parent 413e18fd
No related branches found
No related tags found
No related merge requests found
......@@ -170,7 +170,6 @@ 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 USDHC2_BASE_ADDR:
ret = !gpio_get_value(USDHC2_CD_GPIO);
......@@ -184,26 +183,28 @@ int board_mmc_getcd(struct mmc *mmc)
int board_mmc_init( struct bd_info *bis ) {
struct src *psrc = (struct src *)SRC_BASE_ADDR;
unsigned reg_noshift = readl(&psrc->sbmr1);
unsigned reg = readl(&psrc->sbmr1) >> 11;
/*
* Upon reading BOOT_CFG register the following map is done:
* Bit 11 and 12 of BOOT_CFG register can determine the current
* mmc port
* 0x2 SD3
* 0x1 SD2
* 0x3 SD4
*/
int ret = 0;
int index = 0;
switch (reg & 0x3) {
case 2:
case 0x1:
index = 0;
break;
case 0x3:
index = 1;
break;
case 3:
index = 0;
default:
break;
}
printf("%s: %d\n", __func__, __LINE__);
print_boot_device( );
imx_iomux_v3_setup_multiple_pads( usdhc_list_spl[index].pad,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment