From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kumar Gala Date: Thu, 22 Apr 2004 12:28:57 -0500 Subject: [U-Boot-Users] dynamic setting of CONFIG_SYS_CLK_FREQ In-Reply-To: <20040422171439.C3EB1C109F@atlas.denx.de> References: <20040422171439.C3EB1C109F@atlas.denx.de> Message-ID: <89194C60-9482-11D8-9316-000393DBC2E8@motorola.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de How bad would it be to do something like: #define CONFIG_SYS_CLK_FREQ (gd->sys_clk) or is this what you meant by 'provide a suitable init fuction' - kumar On Apr 22, 2004, at 12:14 PM, Wolfgang Denk wrote: > In message <66FC73FC-9476-11D8-A48D-000393DBC2E8@motorola.com> you > wrote: >> I was wondering if there where an examples in the current u-boot >> source >> tree in which CONFIG_SYS_CLK_FREQ was determined dynamically. I have >> a > > Not exactly for CONFIG_SYS_CLK_FREQ - but the TQM8xxL boards contain > code to measure the input clock against the (known) 32kHz clock. > >> system in which I can read a config register on the board to let me >> know if the CONFIG_SYS_CLK_FREQ is 66Mhz or 33Mhz. I was hoping to >> have the 16550 uart (and anything else) that needed >> CONFIG_SYS_CLK_FREQ >> grab it from a variable instead. > > If you provide a suitable init fuction which sets the value in the > global data section eraly enough, you can probably shortcut the use > of CONFIG_SYS_CLK_FREQ. > >> This is on an MPC85xx platform system. > > ...or any other. > > > Best regards, > > Wolfgang Denk > > -- > Software Engineering: Embedded and Realtime Systems, Embedded Linux > Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de > "There are three principal ways to lose money: wine, women, and engi- > neers. While the first two are more pleasant, the third is by far the > more certain." - Baron Rothschild, ca. 1800