From: Wolfgang Denk Date: Wed, 14 Nov 2007 21:00:51 +0100 Subject: [U-Boot-Users] [PATCH] fixup the clockfrequency in of if clocks_in_mhz is set In-Reply-To: Your message of "Wed, 14 Nov 2007 18:56:13 +0100." <20071114175613.GA7471@pengutronix.de> Message-ID: <20071114200051.5B8D1247F1@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <20071114175613.GA7471@pengutronix.de> you wrote: > > in attachment a patch which fixes the handling of clocks_in_mhz environment > variable while bringing up a kernel with oftree. I reject this patch. > Some older Kernel awaits the frequencies in mhz unit, which will > be converted if the environment variable clocks_in_mhz is set. > Which is also taken over into of struct while doing ft_setup. This > means that the newer Kernel, which is awaiting frequency in Hz will not > boot if the clocks_in_mhz is set, even if the frequency is correct in > the dts file, since the value in dts file seemed to be completely > ignored here. To work around this, we have to convert the frequency back > in hz before passing it over to of struct if clocks_in_mhz is set. clocks_in_mhz is explicitely a backward compatibilty option only for *very* old (< 2.4.5-pre5) Linux kernels. Nobody in his sane mind should set this variable in a recent system. Also please note that even in non-FDT based systems incorrectly setting this variable will cause the system to hang. So if you have a current, FDT based system, just don't set this variable. It has a well defined meaning, and works as documetned. Your patch would create an (undocumented) special case which is not needed in real life. NAK. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de The human race has one really effective weapon, and that is laughter. - Mark Twain