fixup the clockfrequency in of if clocks_in_mhz is set
PATCH 1/1 fixup the clockfrequency in of if clocks_in_mhz is set
Hi,
in attachment a patch which fixes the handling of clocks_in_mhz environment variable while bringing up a kernel with oftree.
cheers
Luotao Fu
Signature · 18 lines
Dipl.-Ing. Luotao Fu | Phone: +49-5121-206917-3 Pengutronix - Linux Solutions for Science and Industry Entwicklungszentrum Nord http://www.pengutronix.de -------------- next part -------------- A non-text attachment was scrubbed... Name: u-boot-of-clockfreq-fixup.diff Type: text/x-diff Size: 1200 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20071114/6d739c5b/attachment.diff -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.denx.de/pipermail/u-boot/attachments/20071114/6d739c5b/attachment.pgp
Wolfgang Denk
NAKPATCH 1/1 fixup the clockfrequency in of if clocks_in_mhz is set
Quoted 3 lines · In message <[email protected]> you wrote:
in attachment a patch which fixes the handling of
clocks_in_mhzenvironment variable while bringing up a kernel with oftree.
I reject this patch.
Quoted 8 lines
Some older Kernel awaits the frequencies in mhz unit, which will be converted if the environment variable
clocks_in_mhzis set. Which is also taken over into of struct while doingft_setup. This means that the newer Kernel, which is awaiting frequency in Hz will not boot if theclocks_in_mhzis 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 ifclocks_in_mhzis 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
Signature · 5 lines
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: [email protected] The human race has one really effective weapon, and that is laughter. - Mark Twain