From mboxrd@z Thu Jan 1 00:00:00 1970 From: ivanchuklist ivanchu Date: Mon, 15 Dec 2008 13:07:13 +0100 Subject: [U-Boot] DE2 board with MMC interface (PIO based) and FAT support enabled Message-ID: <51a313240812150407xc75ec0vf7e14720277bbb47@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.