lkml.org 
[lkml]   [2011]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 13/15] x86/rtc: don't register rtc if we the DT blob
* Grant Likely | 2011-01-11 17:02:24 [-0700]:

>> +static __init int have_DTB(void)
>> +{
>> + if (initial_boot_params)
>> + return 1;
>> + return 0;
>> +}

>Not quite the right test. For instance, OLPC has real openfirmware so
>initial_boot_params will be zero even though there is a fully
>populated device tree. Should test the allnodes value instead.
Oh really? They do have a device tree and their initial_boot_params is
NULL? I assumed they boot via OF but I saw no evidence of the device
tree as it. In fact I noticed that they have a static PCI bus living in
arch/x86 and I assumed that is the place where their devices are comming
from.
However, this _could_ change the behavior of OLPC and they could lack an
RTC now if it is not comming via isa_pnp thing or via the device tree
(which had no bindings until recently).

>Also, this test is useful to more than just rtc I'm sure. It could
>easily live in linux/of.h.
Okay.

>Finally one minor nit. This is more verbose than it needs to be. It
>could instead be: "return allnodes != NULL;", and the __init is
>unnecessary on a static inline.

Okay. The static line has no __init just the non inline has __init :)

>g.

Sebastian


\
 
 \ /
  Last update: 2011-01-12 19:31    [W:0.123 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site