From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Fri, 13 Aug 2010 20:07:42 +0200 Subject: [U-Boot] [PATCH] Fix typo inside atmel_mci driver In-Reply-To: References: <20100806231740.D86E01524E4@gemini.denx.de> <4C5C9D80.5020205@emk-elektronik.de> Message-ID: <4C6589EE.4070306@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 Claudio Mignanti wrote: > 2010/8/7 Reinhard Meyer : >> 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. > > With the proposed patch I successfully use this driver on at91sam9g20! > Probabily they share the same mci controller I don't know, I want only > report this experience. NAK. That will break the driver for AVR32. The correct way is to add get_mci_clk_rate() to clk.h: diff --git a/arch/arm/include/asm/arch-at91/clk.h b/arch/arm/include/asm/arch-at91/clk.h index f642dd9..457e6c9 100644 --- a/arch/arm/include/asm/arch-at91/clk.h +++ b/arch/arm/include/asm/arch-at91/clk.h @@ -59,5 +59,10 @@ static inline unsigned long get_twi_clk_rate(unsigned int dev_id) return get_mck_clk_rate(); } +static inline unsigned long get_mci_clk_rate(void) +{ + return get_mck_clk_rate(); +} + int at91_clock_init(unsigned long main_clock); #endif /* __ASM_ARM_ARCH_CLK_H__ */ On AVR32 there is no MCK and each peripherals' clock can be prescaled individually. Its just that the current AT91 have all clocks the same. Best Regards, Reinhard PS: that driver will soon become obsolete, because a new, mmc framework based driver is in the mold already.