From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Matthias_Wei=DFer?= Date: Mon, 04 Jul 2011 07:56:48 +0200 Subject: [U-Boot] [PATCH 1/5] imx: Add get_tbclk() function for imx25 In-Reply-To: <4E0C9883.7010102@denx.de> References: <1309427865-17531-1-git-send-email-weisserm@arcor.de> <1309427865-17531-2-git-send-email-weisserm@arcor.de> <4E0C9883.7010102@denx.de> Message-ID: <4E115620.5060708@arcor.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano Am 30.06.2011 17:38, schrieb Stefano Babic: > On 06/30/2011 11:57 AM, Matthias Weisser wrote: >> Need this function for autoboot keyd >> > > Hi Matthias, > >> +/* >> + * This function is derived from PowerPC code (timebase clock frequency). >> + * On ARM it returns the number of timer ticks per second. >> + */ >> +ulong get_tbclk(void) >> +{ >> + ulong tbclk; >> + >> + tbclk = CONFIG_MX25_CLK32; >> + return tbclk; >> +} > > Which is the advantage to add this function instead using directly > CONFIG_MX25_CLK32 in the caller ? It is not me so clear.. The caller is in common code (see common/main.c line 76 -> 97). I think if I add CONFIG_MX25_CLK32 there whis will break a couple of boards which I don't want to. ;-) Also, we will have all this stuff cleaned up when the timer redesign comes in. Regards, Matthias