[U-Boot] AT91 SD/MMC Patches

Hello. I'm attempting to use the AT91 SD/MMC patches with my AT91SAM9G45-EK-ES devkit to boot a Linux kernel off of an SD card.
Starting with 2009.08, I've applied: http://lists.denx.de/pipermail/u-boot/2009-August/059456.html http://lists.denx.de/pipermail/u-boot/2009-September/060053.html http://lists.denx.de/pipermail/u-boot/2009-September/060243.html
Then I added: #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 per the patch at: http://lists.denx.de/pipermail/u-boot/2009-August/059457.html and things seem to be showing up on boot. "MMC: ATMEL MCI: 0"
In an effort to enable the SD card functionality I added the following to include/configs/at91sam9m10g45ek.h: /* 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
However, once I 'mmc init' and try 'ext2ls mmc 0' all I get is: ** Bad partition - mmc 0:1 **
After adding some debugging information it seemed as though get_partition_info was failing, and print_part failed with: ## Unknown partition table
Per a suggestion from the IRC channel, I verified that I have an MBR on the SD card, instead of just a VBR.
Thanks, Dan

I've made a bit of progress on this with some off-list help by Albin Tonnerre.
On Thu, Sep 24, 2009 at 8:24 PM, Dan Christensen opello@opello.org wrote:
Hello. I'm attempting to use the AT91 SD/MMC patches with my AT91SAM9G45-EK-ES devkit to boot a Linux kernel off of an SD card.
Starting with 2009.08, I've applied: http://lists.denx.de/pipermail/u-boot/2009-August/059456.html http://lists.denx.de/pipermail/u-boot/2009-September/060053.html http://lists.denx.de/pipermail/u-boot/2009-September/060243.html
I am no longer applying the first patch in the list: http://lists.denx.de/pipermail/u-boot/2009-August/059456.html Which means I also do not need the change to cpu/arm926ejs/at91/cpu.c, or CONFIG_GENERIC_MMC in my board config file.
But I ended up needing the following: http://lists.denx.de/pipermail/u-boot/2009-August/059595.html
With those changes, things seem to be going a bit better.
So now, include/configs/at91sam9m10g45ek.h has the following added: /* SD Card */ #define CONFIG_CMD_EXT2 1 #define CONFIG_CMD_MMC 1 #define CONFIG_MMC 1 #define CONFIG_ATMEL_MCI 1
'mmc init' yields: mmc: clock 150000 too low; setting CLKDIV to 255 Manufacturer ID: 1B OEM/Application ID: 534D Product name: SD Product Revision: 1.0 Product Serial Number: 3325210410 Manufacturing Date: 08/03 SD Card detected (RCA 45928) CSD data: 002f0032 f5954169 29dfb6ff fca70900 CSD structure version: 1.0 MMC System Spec version: 0 Card command classes: 5f5 Read block length: 512 Supports partial reads Write block length: 512 Does not support partial writes Supports group WP: 32 Card capacity: 1017643008 bytes File format: 0/0 Write protection: mmc: Using 3145728 cycles data timeout (DTOR=0x73) .mmc1 is available
'ext2ls mmc 1' now fails, and I've added some debugging statements, and the most fruitful of those seems to have been defining DEBUG in fs/ext2/ext2fs.c: U-Boot> ext2ls mmc 1 .## Valid DOS partition found ## ext2fs_mount, len=1987075 pre-malloc pre-superblock .pre-magic pre-ext2fs_read_inode ext2fs read inode 2 ext2fs read 0 group descriptor (blkno 2 blkoff 0) .raise: Signal # 8 caught ext2fs read inode blkno 0 blkoff 0 raise: Signal # 8 caught raise: Signal # 8 caught ext2fs read inode blkno 5 blkoff 0
Without debugging all I saw were the 'raise: Signal # 8 caught' which I'm not sure what means? I found eabi_compat.c where it is printed out, but never found what was raising the signal.
Thanks, Dan
participants (1)
-
Dan Christensen