From 33a2e90bf491f13a4546d09a6105582c0ba7f313 Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Fri, 2 Jul 2010 13:47:39 +0200 Subject: Replace MMC/SD driver to fit new framework. IR265772: MMC driver does not detect SDHC cards. IR254201: Restructure MMC/SD driver for U8500 board according to the block device framework in mainline U-Boot. Changes to mmc framework: - Multi Block Read support in mmc framework. - Wrap Multi Block Write/Read to be able to adopt for large transaction. - Removed incorrect check in EXT CSD for high capacity MMC. - Corrected check for high capacity SD cards. - Set MMC buswidth to 8, prio of using 4. Known limitations/bugs in mmc framework: - High capacity MMC, will likely not get the correct density. - High speed is set, whether or not the host supports it or not. board/st/u8500/mmc_utils: IMPORTANT FOR DEVELOPERS: - Removed unessary U-Boot commands which is already supported in cmd_fat. - mmc_read_cmd_file: Read command.txt into bootcmd env from FAT FS in SD card. - write_partition_block: Writes the MBR if it is not already written. board/st/u8500/mmc_host[c.h]: - Implements the entire MMC/SD host driver for the PL180 block. - There is still room for optimization: Increase CLK-speed. Use high-speed for SD cards. Is GPIO setup correctly for both cards an eMMC. EarlyDrop support not fully tested. Dynamically turn on voltage/clocks to SD, not always. More... Note: - Increased read/write performance for eMMC, to around 5.4 MB/s for sequential read/write. Earlier measurements was 3.5 MB/s for read and 2.6 MB/s for write. ST-Ericsson ID: ER265772, CR267996, ER267993 Change-Id: I921102edbde761407ff5ad476d1bb99f5dc7a2ef Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2288 Reviewed-by: Michael BRANDT Tested-by: Michael BRANDT Reviewed-by: Martin LUNDHOLM Tested-by: Martin LUNDHOLM Reviewed-by: Mikael LARSSON Tested-by: Mikael LARSSON --- include/configs/u8500.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include/configs/u8500.h') diff --git a/include/configs/u8500.h b/include/configs/u8500.h index 21c48fe66..4df4b8952 100644 --- a/include/configs/u8500.h +++ b/include/configs/u8500.h @@ -80,6 +80,7 @@ * Devices and file systems */ #define CONFIG_MMC 1 +#define CONFIG_GENERIC_MMC 1 #define CONFIG_DOS_PARTITION 1 /* @@ -126,7 +127,7 @@ "commonargs=setenv bootargs cachepolicy=writealloc noinitrd " \ "init=init " \ "board_id=${board_id} " \ - "logo.${logo} " \ + "logo.${logo} " \ "startup_graphics=${startup_graphics}\0" \ "emmcargs=setenv bootargs ${bootargs} " \ "root=/dev/mmcblk0p2 " \ @@ -135,7 +136,8 @@ "console=${console}\0" \ "emmcboot=echo Booting from eMMC ...; " \ "run commonargs emmcargs addcons memargs;" \ - "emmc_read ${loadaddr} 0x14000000 0x300000; " \ + "write_partition_block;" \ + "mmc read 0 ${loadaddr} 0xA0000 0x4000;" \ "bootm ${loadaddr}\0" \ "cmdfile=mmc init 1;mmc_read_cmd_file;run bootcmd\0" \ "flash=mmc init 1;fatload mmc 1 ${loadaddr} flash.scr;" \ @@ -211,6 +213,7 @@ */ #define MMC_BLOCK_SIZE 512 #define CFG_MMC_BASE 0x80126000 /* MMC base for 8500 */ +#define CONFIG_MMC_DEV_NUM 1 /*----------------------------------------------------------------------- * EMMC related configs @@ -222,7 +225,8 @@ #define CONFIG_CMD_SAVEENV /* CMD_ENV is obsolete but used in env_emmc.c */ #define CONFIG_ENV_IS_IN_EMMC 1 #define CONFIG_ENV_OFFSET_START 0x13F80000 -#define CONFIG_ENV_OFFSET_END 0x13FE0000 +#define CONFIG_ENV_OFFSET_END 0x13FE0000 +#define CONFIG_EMMC_DEV_NUM 0 /*----------------------------------------------------------------------- * USB related configs @@ -242,7 +246,7 @@ * FLASH and environment organization */ -#define CONFIG_SYS_MAX_FLASH_SECT 512 +#define CONFIG_SYS_MAX_FLASH_SECT 512 #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */ /*----------------------------------------------------------------------- -- cgit v1.2.3