[U-Boot-Users] [PATCH] 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

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
participants (2)
-
Luotao Fu
-
Wolfgang Denk