From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pantelis Antoniou Date: Mon, 26 Apr 2004 09:33:44 +0300 Subject: [U-Boot-Users] dynamic setting of CONFIG_SYS_CLK_FREQ In-Reply-To: <20040425140342.28300C109F@atlas.denx.de> References: <20040425140342.28300C109F@atlas.denx.de> Message-ID: <408CAD48.4020004@intracom.gr> 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: >In message <6A9BF178-9496-11D8-9316-000393DBC2E8@motorola.com> you wrote: > >>I realized that sys_clk is not defined, I was going to add it for 85xx >>since none of the other defines in gd currently represent the value. >> > >Do we really need this value? Please keep "gd" free from redundand >values, i. e. from data which can be derived/calculated easily from >other variables. > > >>The other option would be to have a function return the proper >>frequency (as suggested earlier in the thread). Any suggestions as to >>which option would be preferred? >> > >The function approach sounds cleaner to me. > > >Best regards, > >Wolfgang Denk > > IMHO the gd data are pretty much useless in a complicated environment. For example when you have multiple network interfaces you have no information which network interface was used to obtain the configuration, which was it's ethernet address etc. For me the gd is usefull only for the simple case of most boards with one network interface, fixed clock etc. For anything more complicated is better to parse the environment variables. Some information however is only available in the gd, for example the clocks. Why don't we just add the missing information to the environment variables? Regards Pantelis