[U-Boot] at91sam9g45ekes SDHC/MMC
Albin Tonnerre
albin.tonnerre at free-electrons.com
Mon Mar 15 21:10:21 CET 2010
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
More information about the U-Boot
mailing list