Hello!
I'm trying to get to get the AT91SAM9G45 qualified for my use. Which involves reading an SD card in U-Boot, but am not having much luck with that.
Starting with 2009.08, I've applied the following patches:
http://lists.denx.de/pipermail/u-boot/2 ... 59456.htmlhttp://lists.denx.de/pipermail/u-boot/2 ... 60053.htmlhttp://lists.denx.de/pipermail/u-boot/2 ... 60243.htmlThen added:
Code:
#ifdef CONFIG_ATMEL_MCI
int cpu_mmc_init(bd_t *bis)
{
atmel_mci_init(bis);
}
#endif
to the end of cpu/arm926ejs/at91/cpu.c based on this:
http://lists.denx.de/pipermail/u-boot/2 ... 59457.htmlThen added a call to the initialize function from the board init code in:
board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
Code:
#ifdef CONFIG_ATMEL_MCI
at91_mci0_hw_init(0, 4);
#endif
In the board configuration file, include/configs/at91sam9m10g45ek.h, I added:
Code:
/* SD Card */
#define CONFIG_CMD_EXT2 1
#define CONFIG_CMD_MMC 1
#define CONFIG_MMC 1
#define CONFIG_GENERIC_MMC 1
#define CONFIG_ATMEL_MCI 1
And see things show up at the start of U-Boot:
Code:
DRAM: 128 MB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
Flash: 0 kB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
MMC: ATMEL MCI: 0
Net: macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0xc1e1)
Hit any key to stop autoboot: 0
(I'm not sure about that Unknown FLASH, I originally thought it was the DataFlash, but pulling the chip select jumper didn't make it go away.)
However, executing 'mmc init' and 'mmcinfo' yield no results:
Code:
U-Boot> mmc init
U-Boot> mmcinfo
mmc: clock 150000 too low; setting CLKDIV to 255
mmc: clock 150000 too low; setting CLKDIV to 255
Device: ATMEL MCI
Manufacturer ID: 0
OEM: 0
Name: Tran Speed: 0
Rd Block Len: 1
MMC version 0.0
High Capacity: No
Capacity: 19124448563
Bus Width: 1-bit
I've compared the U-Boot at91sam9m10g45_devices.c and Linux's at91sam9g45_devices.c and they seem to agree with how to configure the MCI device in the chip, and the SD card works under Linux. I'm not sure how to proceed from here.
Thanks,
Dan