Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 1024bytes/sect microSD support



Hi! NONAKA-san,


From: NONAKA Kimihiro <nonakap%gmail.com@localhost>
Date: Fri, 27 Nov 2009 21:18:42 +0900

> > 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?

good!  I think your patch keeps compatibility with other OS.
# Also, Oops, Paul's patch not worked.  I misstake to patch that.  ;-)

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index