Re: [U-Boot] [PATCH v2] AT91: Add SD/MMC controller support & [PATCH v3]

Hi Albin,
Someone encoutered the same issue: http://lists.denx.de/pipermail/u-boot/2009-September/059684.html This is because the patch is based on a change that was part of another patch that added support to a new >board. You can work around this easily: in at91sam9260_devices.c, simply replace
#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)
with
#if defined(CONFIG_HAS_DATAFLASH)
and the patch should then apply cleanly. Please let me know if that still doesn't work.
Yes this patch apply cleanly, but I had problems on my samg20ek to get the mmc working. On the command mmc init, it always say no mmc card foung.
So I tried now to apply your new Patch V3. What is the Base of this patch (I tried again u-boot 2009.08) Is there a better way to download the version with git?
There I have a lot of problems.
patching file cpu/arm926ejs/at91/at91cap9_devices.c patching file cpu/arm926ejs/at91/at91sam9260_devices.c Hunk #1 FAILED at 75. 1 out of 1 hunk FAILED -- saving rejects to file cpu/arm926ejs/at91/at91sam9260_devices.c.rej patching file cpu/arm926ejs/at91/at91sam9261_devices.c patching file cpu/arm926ejs/at91/at91sam9263_devices.c patching file cpu/arm926ejs/at91/at91sam9m10g45_devices.c patching file cpu/arm926ejs/at91/at91sam9rl_devices.c patching file include/asm-arm/arch-at91/at91_common.h patching file include/asm-arm/arch-at91/at91cap9.h Hunk #1 FAILED at 112. 1 out of 1 hunk FAILED -- saving rejects to file include/asm-arm/arch-at91/at91cap9.h.rej patching file include/asm-arm/arch-at91/at91sam9260.h Hunk #1 FAILED at 108. 1 out of 1 hunk FAILED -- saving rejects to file include/asm-arm/arch-at91/at91sam9260.h.rej patching file include/asm-arm/arch-at91/at91sam9261.h Hunk #1 FAILED at 91. 1 out of 1 hunk FAILED -- saving rejects to file include/asm-arm/arch-at91/at91sam9261.h.rej patching file include/asm-arm/arch-at91/at91sam9263.h Hunk #1 FAILED at 111. 1 out of 1 hunk FAILED -- saving rejects to file include/asm-arm/arch-at91/at91sam9263.h.rej patching file include/asm-arm/arch-at91/at91sam9g45.h Hunk #1 FAILED at 118. 1 out of 1 hunk FAILED -- saving rejects to file include/asm-arm/arch-at91/at91sam9g45.h.rej patching file include/asm-arm/arch-at91/at91sam9rl.h Hunk #1 FAILED at 101. 1 out of 1 hunk FAILED -- saving rejects to file include/asm-arm/arch-at91/at91sam9rl.h.rej patching file include/asm-arm/arch-at91/clk.h patching file include/asm-arm/arch-at91/memory-map.h
bye Konrad

On Wed, 09 Sep 2009 09:06 +0200, Konrad Mattheis wrote :
Hi Albin,
Someone encoutered the same issue: http://lists.denx.de/pipermail/u-boot/2009-September/059684.html This is because the patch is based on a change that was part of another patch that added support to a new >board. You can work around this easily: in at91sam9260_devices.c, simply replace
#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)
with
#if defined(CONFIG_HAS_DATAFLASH)
and the patch should then apply cleanly. Please let me know if that still doesn't work.
Yes this patch apply cleanly, but I had problems on my samg20ek to get the mmc working. On the command mmc init, it always say no mmc card foung.
What modifications have you done to your code after applying the patch? Providing the diff would help spotting potential errors
So I tried now to apply your new Patch V3. What is the Base of this patch (I tried again u-boot 2009.08) Is there a better way to download the version with git?
It applies on top of http://lists.denx.de/pipermail/u-boot/2009-September/060053.html The best base to apply those patches is the current master branch of the git repository (git://git.denx.de/u-boot.git)
Regards,

Hi Albin,
so I describe you what I did.
Downloaded u-boot 2009.08
changed:
#if defined(CONFIG_HAS_DATAFLASH)
to:
#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)
applied Patch: http://lists.denx.de/pipermail/u-boot/2009-September/060053.html
then applied Patch V3: from mail
added to:include/config/at91sam9260ek.h
#define CONFIG_CMD_MMC 1 #define CONFIG_MMC 1 #define CONFIG_ATMEL_MCI
compiled and the on the at91sam9g20ek I can start a normal kernel,... but if I write mmc init I get the following error:
mmc: clock 150000 too low; setting CLKDIV to 255 No MMC card found
After this I tried to download git://git.denx.de/u-boot.git and then I could not apply the patches. I always got this message: Reversed (or previously applied) patch detected! Assume -R? [n] Did you already applied the patches to the git repository?
bye Konrad

On Wed, 09 Sep 2009 20:52 +0200, Konrad Mattheis wrote :
Hi Albin,
so I describe you what I did.
Downloaded u-boot 2009.08
changed:
#if defined(CONFIG_HAS_DATAFLASH)
to:
#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI)
applied Patch: http://lists.denx.de/pipermail/u-boot/2009-September/060053.html
then applied Patch V3: from mail
added to:include/config/at91sam9260ek.h
#define CONFIG_CMD_MMC 1 #define CONFIG_MMC 1 #define CONFIG_ATMEL_MCI
compiled and the on the at91sam9g20ek I can start a normal kernel,... but if I write mmc init I get the following error:
Ok, so that's what I thought: you're missing a call to at91_mciX_hw_init in your board init code. This function assigns the correst I/O pins to the MCI controller and takes care of enabling the clock. Please have a look at at91_mciX_hw_init cpu/arm926ejs/at91/at91sam9260_devices.c to see what arguments the function expects.
mmc: clock 150000 too low; setting CLKDIV to 255 No MMC card found
After this I tried to download git://git.denx.de/u-boot.git and then I could not apply the patches. I always got this message: Reversed (or previously applied) patch detected! Assume -R? [n] Did you already applied the patches to the git repository?
The CONFIG_ATMEL_SPI change is in mainline, yes. Other parts of the patch aren't.
Regards,
participants (2)
-
Albin Tonnerre
-
Konrad Mattheis