Hi,
> I has 2 problems with sdmmc and pxamci.
>
> I got a microSD. My GUMSTIX reports this message with it.
>
> ld0: 1938 MB, 984 cyl, 32 head, 63 sec, 1024 bytes/sect x 1985024 sectors
>
> It is 1024 bytes/sect card. I can't mount, fdisk, and disklabel it.
> This reason is report 'read CRC error'(STAT_CRC_READ_ERROR and MMC_I_DAT_ERR)
> by pxamci.
> I try with following fix. pxamci quit and work. ;-)
>
> sys/arch/arm/xscale/pxa2x0_mci.c:pxamci_attach_sub() ---
> /* Setup max block length */
> if (CPU_IS_PXA270) {
> #if 0
> sc->sc_maxblklen = 2048;
> #else
> sc->sc_maxblklen = 512;
> #endif
> } else {
> sc->sc_maxblklen = 512;
> }
> --- sys/arch/arm/xscale/pxa2x0_mci.c::pxamci_attach_sub()
>
>
> Also I know, Linux's drivers/mmc/card/block.c always set 512bytes.
>
> mmc_blk_alloc()
> {
> :
> /*
> * Both SD and MMC specifications state (although a bit
> * unclearly in the MMC case) that a block size of 512
> * bytes must always be supported by the card.
> */
> md->block_bits = 9;
> :
> }
>
>
> I think that it is necessary to always adjust us to 512 bytes. If this
> is not supported, we cannot have Linux and interchangeability.
> However, I do not know how to set more better it. Does anyone have an
> idea?
How about attached patch?
Regards,
--
NONAKA Kimihiro
Attachment:
sdmmc.diff
Description: Binary data