[U-Boot] at91sam9g45ekes SDHC/MMC

Samuelsson, Ulf ulf.samuelsson at atmel.com
Fri Apr 23 08:24:19 CEST 2010


Fix the problem, send me the patch, and I change my source ;-)
/Ulf

> -----Ursprungligt meddelande-----
> Från: rje at crystalfontz.com [mailto:rje at crystalfontz.com] För Rob
> Emanuele
> Skickat: den 23 april 2010 02:52
> Till: Henry Súcart
> Kopia: Samuelsson, Ulf; u-boot at lists.denx.de
> Ämne: Re: [U-Boot] at91sam9g45ekes SDHC/MMC
> 
> Hi Henry & U-Boot Community,
> 
> I've been experiencing the same errors and frustration you have.
> 
> So I've been looking at this code and these patch sets for a day or
> two now.  I've done that in conjunction with reading the SD card spec:
> http://www.sdcard.org/developers/tech/sdcard/pls/
> 
> I've come to the conclusion that this code as it stands will not work
> with any card that conforms to the SD Physical Layer Simplified
> Specification Version 2.0.  This includes all SDHC cards and some
> non-HC cards that conform to version 2.0.  I have a few 1GB cards that
> work just fine with the atmel_mci.c code on a 'G45 as it was in rev
> 95c44ec485b46ffb43dbdaa299f1491a500fdadf .
> 
> If your SD card is newer, you'll see in the for loop in "sd_init_card"
> in atmel_mci.c time out.  In the 2.0 spec, you need to perform a CMD8
> (SEND_IF_COND) first to see if your card is a 2.0 card.  In CMD8 you
> tell the card the voltages you support and if you support HC cards.
> Once you send it the right data there, then ACMD41 will not have its
> BUSY bit set.  That's all well and good, but additionally the CSD
> register is in a new format and that needs updating before any of this
> will work.
> 
> In another post, I will be more talk of the mmc/sd code and taking it
> forward.
> 
> Rob
> 
> 
> On Mon, Apr 12, 2010 at 6:55 AM, Henry Súcart <henry.sucart at gmail.com>
> wrote:
> > Hi Ulf,
> >
> > Thanks for the reply. I applied your patches but I still can't get it
> to
> > read the SD card
> >
> > Without the SD card:
> > U-Boot> mmc init 0
> > mmc: command 55 failed (status: 0x0c100025)
> > mmc: command 1 failed (status: 0x0c100025)
> > No MMC card found
> >
> > With the SD card:
> > U-Boot> mmc init 0
> > mmc: command 1 failed (status: 0x0c100025)
> > No MMC card found
> >
> >
> >
> > I'm not sure what's going on.
> > On Tue, Apr 6, 2010 at 5:57 AM, Ulf Samuelsson
> <ulf.samuelsson at atmel.com>wrote:
> >
> >> Henry Súcart skrev:
> >> > Hi,
> >> >
> >> > I've been trying to get an SD card working with an at91sam9g45ek-
> es
> >> board. I
> >> > read a couple of threads in the archive and ended up doing this:
> >> >
> >>
> >> I have booted the AT91SAM9G45EKES (Actually the AT91SAM9M10EKES,
> >> but it is almost the same) from SD-Card for the last month.
> >> The patchset for 2009.11 is available for testing in my private git
> >> branch on www.openembedded.org: origin/ulf/linux-2.6.30-20100317
> >>
> >> I came to the conclusion that the atmel MCI driver (written for the
> big
> >> endian AVR32) has significant byte sex problems.
> >>
> >> BR
> >> Ulf Samuelsson.
> >>
> >>
> >> > I applied these patches:
> >> >
> >> > http://lists.denx.de/pipermail/u-boot/2009-August/059595.html
> >> > http://lists.denx.de/pipermail/u-boot/2009-September/060053.html
> >> > http://lists.denx.de/pipermail/u-boot/2009-September/060243.html
> >> >
> >> > Added these #define's to include/configs/at91sam9m10g45ek.h:
> >> >
> >> > #define CONFIG_CMD_EXT2   1
> >> > #define CONFIG_CMD_FAT     1
> >> > #define CONFIG_CMD_MMC   1
> >> > #define CONFIG_MMC            1
> >> > #define CONFIG_ATMEL_MCI  1
> >> >
> >> > Finally, I added this to the board init function:
> >> >
> >> > #ifdef CONFIG_ATMEL_MCI
> >> > at91_mci0_hw_init(0, 4);
> >> > #endif
> >> >
> >> > When I try it out this is what I get:
> >> > U-Boot> mmc init 0
> >> > mmc: clock 150000 too low; setting CLKDIV to 255
> >> > mmc: command 1 failed (status: 0x0c100025)
> >> > No MMC card found
> >> >
> >> > Am I doing something wrong? Any help is appreciated,
> >> >
> >> > Henry
> >> >
> >> >
> >> >
> >> > ------------------------------------------------------------------
> ------
> >> >
> >> > _______________________________________________
> >> > U-Boot mailing list
> >> > U-Boot at lists.denx.de
> >> > http://lists.denx.de/mailman/listinfo/u-boot
> >>
> >>
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
> >
> >


More information about the U-Boot mailing list