Skip to contentSkip to conversation

DE2 board with MMC interface (PIO based) and FAT support enabled

U-Boot ivanchuklist ivanchu 2 participants 2 messages Dec 15, 2008

lore
Share & tools
lore
#0 lore raw

Hi list,

I'm working with an Altera DE2 board (Nios II processor without MMU). I developed a sd interface implemented with pio cores. In order to compile u-boot correctly i modified the Makefile to match my binutils. I also changed the file common/cmd_mem.c because it has a little problem when it needs to manage the card to copy the data to main memory or from main memory. I can't deduce the direction of data knowing only the address because his address space isn't mapped on the bus like a common flash memory. I added a command named dmcc (cmd_dmmc) to set the desired direction of data, ie to or from mmc, to call correctly to the functions mmc_read and mmc_write.
I have made a device block, filling the structure block_dev_desc_t and defining mmc_get_dev(), to have access to the partition table (FAT). Now u-boot is able to list the files inside the card (fatls mmc 0:0) and it copies them to main memory (fatload mmc 0:0 500000 zimage).
I had to modify the source common/cmd_mmc.c because it has a reference to mmc.h, but it gives problems with the linking process because of double reference between the objects cmd_mmc.o and cmd_mem.o. The solution was to declare extern the function mmc_init.
I also added my board to u-boot package.
I don't know how to post all what i did. I have made the diff files, i could post them but i don't know how the patches are managed. In fact it's not a patch at all, just a little branch.

Regards,
Iv?n Llopard.

#1 lore raw

Dear "ivanchuklist ivanchu",

Quoted 4 lines · In message <[email protected]> you…

I don't know how to post all what i did. I have made the diff files, i could post them but i don't know how the patches are managed. In fact it's not a patch at all, just a little branch.

You probably want to read http://www.denx.de/wiki/U-Boot/CodingStyle
and http://www.denx.de/wiki/U-Boot/Patches

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Why can you only have two doors on a chicken coop? If it had four  it
would be a chicken sedan.