summaryrefslogtreecommitdiff
path: root/board/st/u8500/mmc.c
diff options
context:
space:
mode:
authorMichael Brandt <Michael.Brandt@stericsson.com>2010-01-07 16:08:03 +0100
committerMichael Brandt <Michael.Brandt@stericsson.com>2010-01-07 16:08:03 +0100
commitd157ec3412960375dee37e7845bb5e6315397d6a (patch)
treef557b605f8d9eaeac8b89ea5eb29308d6271c8aa /board/st/u8500/mmc.c
parent55e1520985c4d0f3fdce2f27873b4231790b8c3d (diff)
PACK3 changes
applied PACK3 changes: * cpu/arm_cortexa9/start.S: reset register changed, but U-Boot reset command still does not work. * config.mk: build address changed to 0x05FC0000 * board/st/u8500/mmc.c: MBR change: descrease 4th partition size (userfs 2) from 0x00c0'0000 to 0x00b9'a000 sectors (6,442,450,944 to 6,228,541,440 bytes). * board\st\u8500\init_mmc.c: modify bootargs to set board_id to HREF or MOP. Is is an extremly ugly solution. It modifies the bootargs env variable directly (bootargs[9] = board_id;), instead of setting a additional environment variable board_id and use it in the bootargs envvar. * board/st/u8500/mmc.c: undocumented clock changes. * board/st/u8500/mmc_utils.c: new routine to switch to 4-bit interface. The switch is done in mmc_read_file(). It would make more sense to do so in mmc_init. * board/st/u8500/u8500.c: clock changes for HSI and I2C. I2C is now clocked by SOC1 PLL and runs with 24 MHz (depends on boot ROM SOC1 initialisation)
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;
}
/****************************************************************************/