This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How Fast is Your SD Read From U-Boot

At the 2nd stage boot, I'm reading from the SD card into main memory.  It seems to take a long time.

 

mmc init

fatload mmc 1 0x81000000 uimage

 

My uImage is only 2.5M yet it take 4.5 seconds to load.  Is this normal?  I'm using the SD card which came with the board. 

  • Hi Thanh,

    Please refer to this page for DM814x performance:

    http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_04.01.00.06_Feature_Performance_Guide

    Regards,

    Viet

  • >>Reading the 2.3MB uImage from SD card : 2.79 secs

    This is faster than the 4.5 secs for 2.5MB that I get.  The difference might be explained by different class of SD card.  However, it still slow.  I thought even a Class 2 SD could do 2MB per sec?  Are SD reads inherently slower in u-Boot mode?  Are you serially addressing the memory?

  • Thanh,

    You might be using an old Uboot. We had changed the clock frequency in the Uboot at some time which made the MMC work faster in Uboot. The patch for the same is attached.

    Regards,

    Parth

    commit 58e800ece16addc8a9d390f72ac12311ab734679
    Author: Raj, Deepu <deepu.raj@ti.com>
    Date:   Mon Aug 29 12:00:52 2011 +0530
    
        TI81XX : generic_mmc: support for ti81xx clock freq
    
        Modified the clock freq for ti816x and ti814x in the genric
        mmc driver. ti816x uses 48MHz and ti814x uses a 192MHz
        clock freq.
    
        Signed-off-by: Raj, Deepu <deepu.raj@ti.com>
    
    diff --git a/arch/arm/include/asm/arch-ti81xx/mmc.h b/arch/arm/include/asm/arch-ti81xx/mmc.h
    index 196ffdc..f189514 100644
    --- a/arch/arm/include/asm/arch-ti81xx/mmc.h
    +++ b/arch/arm/include/asm/arch-ti81xx/mmc.h
    @@ -69,8 +69,8 @@
     #define SD_CMD8_2_7_3_6_V_RANGE        (0x01 << 8)
    
     /* Clock Configurations and Macros */
    -
     #define MMC_CLOCK_REFERENCE            96
    +
     #define MMC_RELATIVE_CARD_ADDRESS      0x1234
     #define MMC_INIT_SEQ_CLK               (MMC_CLOCK_REFERENCE * 1000 / 80)
     #define MMC_400kHz_CLK                 (MMC_CLOCK_REFERENCE * 1000 / 400)
    diff --git a/arch/arm/include/asm/arch-ti81xx/mmc_host_def.h b/arch/arm/include/asm/arch-ti81xx/mmc_host_def.h
    index 730c61a..0ab6e32 100644
    --- a/arch/arm/include/asm/arch-ti81xx/mmc_host_def.h
    +++ b/arch/arm/include/asm/arch-ti81xx/mmc_host_def.h
    @@ -172,7 +172,11 @@ typedef struct {
     #define MMC_CMD0       INDEX(0)  | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE)
    
     /* Clock Configurations and Macros */
    -#define MMC_CLOCK_REFERENCE    96 /* MHz */
    +#if defined(CONFIG_TI816X)
    +#define MMC_CLOCK_REFERENCE             48
    +#elif defined(CONFIG_TI814X)
    +#define MMC_CLOCK_REFERENCE             192
    +#endif
    
     #define mmc_reg_out(addr, mask, val)\
            writel((readl(addr) & (~(mask))) | ((val) & (mask)), (addr))