Re: [PATCH v2 13/15] x86/rtc: don't register rtc if we the DT blob

From: Grant Likely
Date: Fri Jan 14 2011 - 17:17:03 EST


On Wed, Jan 12, 2011 at 11:29 AM, Sebastian Andrzej Siewior
<bigeasy@xxxxxxxxxxxxx> wrote:
> * 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.

I'm not sure how much of it has gone upstream yet (some stuff is going
via tip tree), but when OLPC device tree support gets fully merged, it
will be creating the live tree by poking OFW directly like Sparc does.
It will not generate a flattree first like PowerPC. Therefore,
initial_boot_params will be NULL on OLPC.

> 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).

Yes, you'll need to coordinate with Andres to make sure everything
still works. In fact, I'll be happiest if OLPC and embedded-x86 are
using the same RTC bindings. However, that point might be moot since
Andres has told me that he has no intention of actually registering
devices from the tree, but rather to just export it to userspace.

g.

--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/