From: Reinhard Meyer Date: Sat, 07 Aug 2010 01:40:48 +0200 Subject: [U-Boot] [PATCH] Fix typo inside atmel_mci driver In-Reply-To: <20100806231740.D86E01524E4@gemini.denx.de> References: <20100806231740.D86E01524E4@gemini.denx.de> Message-ID: <4C5C9D80.5020205@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Claudio Mignanti, > > In message you wrote: > >> The function get_mci_clk_rate is used inside atmel_mci driver >> but never defined. Fix this typo. >> Thats NOT a typo. The current atmel_mci.c is for AVR32 ONLY. > > Well, it is certainly defined in > arch/avr32/include/asm/arch-at32ap700x/clk.h: > > 74 #ifdef AT32AP700x_CHIP_HAS_MMCI > 75 static inline unsigned long get_mci_clk_rate(void) > 76 { > 77 return get_pbb_clk_rate(); > 78 } > 79 #endif > > >> --- a/drivers/mmc/atmel_mci.c >> +++ b/drivers/mmc/atmel_mci.c >> @@ -67,7 +67,7 @@ static void mci_set_mode(unsigned long hz, unsigned >> long blklen) >> unsigned long bus_hz; >> unsigned long clkdiv; >> >> - bus_hz = get_mci_clk_rate(); >> + bus_hz = get_mck_clk_rate(); >> > > Are you sure this patch is working and does not break anything? > It will break on the AVR32 architecture. Besides, the current atmel_mci.c driver WILL NOT work on the AT91SAM9. My patch from 07-Jul-10 fixes all issues and makes it work on AT91SAM9. Reinhard