summaryrefslogtreecommitdiff
path: root/board/st/u8500/mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/st/u8500/mmc.c')
-rw-r--r--[-rwxr-xr-x]board/st/u8500/mmc.c44
1 files changed, 29 insertions, 15 deletions
diff --git a/board/st/u8500/mmc.c b/board/st/u8500/mmc.c
index e80f8315f..98b353a3a 100755..100644
--- a/board/st/u8500/mmc.c
+++ b/board/st/u8500/mmc.c
@@ -820,25 +820,39 @@ t_mmc_error mmc_initializeCards(u8 card_num)
//rca++;
error = MMC_OK; //All cards get intialized
- card_initialized = TRUE;
- /*
- t_mmc[card_num]->mmc_Argument = (u32) 0x03B70100;
- t_mmc[card_num]->mmc_Command =
- APP_SD_SET_BUSWIDTH | RespExpected | LongResponse | CmdPathEnable;
+ card_initialized = TRUE;
+
+ if (card_num != selected_card)
+ {
+ t_mmc[card_num]->mmc_Argument = card_array[card_num].RCA;
+ t_mmc[card_num]->mmc_Command = SEL_DESEL_CARD
+ | RespExpected | CmdPathEnable;
+ error = mmc_cmdresp145error(SEL_DESEL_CARD, card_num);
+
+ if (error != MMC_OK)
+ {
+ printf("SEL_DESEL_CARD ::error=0x%x \n", error);
+ return error;
+ }
+ else
+ selected_card = card_num;
+ }
+
+ t_mmc[card_num]->mmc_Argument = (u32) (0x03B70201);
+ t_mmc[card_num]->mmc_Command =
+ APP_SD_SET_BUSWIDTH | RespExpected | CmdPathEnable;
error = mmc_cmdresp2error(card_num);
- if (error != MMC_OK)
- {
- printf("emmc card init response for CMD6 error \n");
- return error;
- }
- */
+ if (error != MMC_OK)
+ {
+ printf("emmc card init response for CMD6 error \n");
+ return error;
+ }
}
- t_mmc[card_num]->mmc_Power = 0x3; /* PUSHPULL mode after intialization */
- t_mmc[card_num]->mmc_Clock = 0x4100; //(t_mmc0->mmc_Clock & 0xFFFFFF00) | 0x00000002;
-
- return error;
+ t_mmc[card_num]->mmc_Power = 0x3;
+ t_mmc[card_num]->mmc_Clock = 0x7500;
+ return error;
}
/****************************************************************************/