From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albin Tonnerre Date: Sun, 4 Oct 2009 14:54:56 +0200 Subject: [U-Boot] AT91 working SD with u-boot In-Reply-To: <4AC47647.2090603@who-ing.de> References: <4AC4589A.9000408@who-ing.de> <4AC46786.2050609@who-ing.de> <4AC47647.2090603@who-ing.de> Message-ID: <20091004125428.GC6569@laptop> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, 01 Oct 2009 11:28 +0200, Sebastian Heutling wrote : > Hi Konrad, > On 10/01/2009 10:33 AM, Konrad Mattheis wrote: > > Hi Sebastian, > > yes I'm using an AT91SAM9G20-EK Rev.c with two SD slots. > > I used slot a but I think you just have to init slot b. > > in PatchV3 you can read: > >> at91_mci0_hw_init(int slot, int bus_width) > >> switch (slot) { > >> case 0: > >> ..... > >> case 1: > > So I think you just have to call at91_mci0_hw_init(1,4) for > > slot b. > No - that is not enough. It just enables the clock for MCI and > configures the pins. But the MCI itself needs to know which slot to > address. > Suppose you want to use both slots at the same time (and the drivers > would support that). > Then you would call: > at91_mci0_hw_init(0, 4) > at91_mci0_hw_init(1, 4) > In order to access both slots the driver (atmel_mci) needs to select > which slot to address. And that is what the SDCSEL field of MCI-SDCR is > for (see also Datasheet of the AT91SAM9G20 35.9.4 (probably at page 607)). But the driver doesn't support for the moment. I might add such support if I have some time (and if that works - has anybody ever tried doing that with Linux?). For now the best way to get it working is to select the correct slot in your board config code. Cheers, -- Albin Tonnerre, Free Electrons Kernel, drivers and embedded Linux development, consulting, training and support. http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature Url : http://lists.denx.de/pipermail/u-boot/attachments/20091004/ac8252e4/attachment.pgp