[U-Boot] need clarification regarding mmc csd structure declaration

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Mon Aug 18 09:35:05 CEST 2008


"Gururaja Hebbar K R" <gururajakr at sanyo.co.in> wrote:
> Hi,
> 
> I need few clarification regarding mmc csd structure declaration. I was taking Atmel mci as reference.
> 
> In ProductManualSDCardv2.2.pdf @ page 34 & ProdManualSDCardv1.9[1].pdf @ page 39, says 
> 
> ...
> ...
> ...
> C_SIZE_MULT  	3 bit width
> ERASE_BLK_EN 	1 bit width
> SECTOR_SIZE 	7 bit width
> WP_GRP_SIZE  	7 bit width
> WP_GRP_ENABLE	1 bit width

This seems to correspond with the SD Memory Card spec v1.01.

> But in mmc.h file inside u-boot-1.3.4\include\asm-avr32\arch-at32ap700x.
> 
> Here, inside structure mmc_csd @ line 
> 
> ...
> ...
> ...
> c_size_mult:3
> sector_size:5
> erase_grp_size:5
> wp_grp_size:5
> wp_grp_enable:1

And this corresponds with the MMC spec.

> So my doubt is, Shouldn't erase_grp_size come before sector size. 

No. But sometimes, erase_grp_size just isn't there at all, and you have
a 1-bit flag right before sector_size instead.

Currently, these values aren't actually used by u-boot, but I guess
ideally, we should either read them correctly or not read them at all.

Haavard



More information about the U-Boot mailing list