All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albin Tonnerre <albin.tonnerre@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] at91sam9g45ekes SDHC/MMC
Date: Mon, 15 Mar 2010 21:10:21 +0100	[thread overview]
Message-ID: <20100315201021.GC14032@pc-ran3241> (raw)
In-Reply-To: <dfbc12091003151251k3e8d004aoae4b1c8573f05438@mail.gmail.com>

On Mon, 15 Mar 2010 15:51 -0400, Henry S?cart wrote :
> Hi,

Hi Henry,

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

Maybe you're not. The at91sam9m10g45 has 2 MMC ports, and the atmel_mci driver
only uses one, defined using MMCI_BASE. Now if you look at the end of the third
patch:

diff --git a/include/asm-arm/arch-at91/memory-map.h b/include/asm-arm/arch-at91/memory-map.h
index f605f37..de0aba7 100644
--- a/include/asm-arm/arch-at91/memory-map.h
+++ b/include/asm-arm/arch-at91/memory-map.h
@@ -32,4 +32,10 @@
 #define USART3_BASE (AT91_BASE_SYS + AT91_DBGU)
 #define SPI0_BASE	AT91_BASE_SPI
 
+#ifndef CONFIG_AT91_MCI1
+#define MMCI_BASE AT91_BASE_MCI0
+#else
+#define MMCI_BASE AT91_BASE_MCI1
+#endif
+

So maybe the issue is that it's trying to read on the wrong port. Could you try
to add #define CONFIG_AT91_MCI1 in your board config, recompile and see if that
works better?

Thanks,
-- 
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2010-03-15 20:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-15 19:51 [U-Boot] at91sam9g45ekes SDHC/MMC Henry Súcart
2010-03-15 20:10 ` Albin Tonnerre [this message]
2010-03-15 21:40   ` Henry Súcart
2010-03-15 22:15     ` Albin Tonnerre
2010-03-16 12:30       ` Henry Súcart
2010-03-16 20:36         ` Albin Tonnerre
2010-03-16 22:08           ` Henry Súcart
2010-03-17 19:23             ` Henry Súcart
2010-04-06  9:57 ` Ulf Samuelsson
2010-04-12 13:55   ` Henry Súcart
2010-04-23  0:51     ` Rob Emanuele
2010-04-23  6:24       ` Samuelsson, Ulf
2010-04-23 21:58       ` Andy Fleming
2010-04-23 23:21         ` Albin Tonnerre
2010-04-24  1:18           ` Andy Fleming
2010-04-28 20:17             ` Robert Emanuele
2010-05-03 14:45               ` Henry Súcart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100315201021.GC14032@pc-ran3241 \
    --to=albin.tonnerre@free-electrons.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.