[lkml]   [2013]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] cpufreq: cpufreq-cpu0: Use a sane boot frequency when booting with a mismatched bootloader configuration
On Mon, Nov 18, 2013 at 08:45:12AM -0600, Nishanth Menon wrote:
> I do not agree about this stance - device tree describes hardware
> capabilities to kernel -> I agree with that statement. Kernel should
> not care if that is provided by bootloader/firmware/fused into
> flash/ROM etc.

Yea, ideally kernel should just believe that the device tree is always
the correct one. But the following text in your commit log suggests
that might not be always the case.

| a) older or default bootloader in development platform without latest
| updates
| b) SoC documentation update that may have occurred in kernel
| c) kernel definitions are out of date Vs bootloader which is updated
| etc..
| In these cases, we should assume from a kernel perspective, the only
| safe frequency that the system can be on is the ones available in the
| OPP table. This may not handle case (c), but, that is a different
| kernel bug of it's own.

It says that the device tree might be wrong as well. That's why I
think the best/safest thing that kernel can do when seeing a mismatch
is to throw out an error message and fail out.


> If we agree with that statement, the moment kernel sees device
> operating in a configuration that is not hardware capability, it is
> our job to switch to the right configuration if it is possible for us
> to do so (which in this case, we can). to give a comparison - if i2c
> bus was configured for 3.4MHz and device tree describes the bus to
> operate at 100KHz, do we ignore device tree recommended configuration?
> No. we would switch to 100KHz. as far as kernel is concerned, it can
> detect invalid configuration and switch back to a valid configuration
> based on hardware description provided by device tree.
> --
> Regards,
> Nishanth Menon

 \ /
  Last update: 2013-11-18 17:21    [W:0.075 / U:1.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site