[U-Boot-Users] [PATCH] fixup the clockfrequency in of if clocks_in_mhz is set

Wolfgang Denk wd at denx.de
Wed Nov 14 21:00:51 CET 2007


In message <20071114175613.GA7471 at 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 at denx.de
The human race has one really effective weapon, and that is laughter.
                                                         - Mark Twain




More information about the U-Boot mailing list