Subject: Re: [PATCH 2/5] Add legacy devices to mpc8641_hpcn.dts

From: Segher Boessenkool <[email-masked]>
Date: Wed, 16 May 2007 21:59:02 +0200

>> Is "rtc" a standard OF device, or are we making up a
>> new thing that should be documented in booting-with-OF.txt ?
>> And is the plan to somehow use this entry in the future?
>
> It is my understanding that "rtc" is a standard OF device.  Can anybody
> confirm this?

It is.

> This could be used in the platform-specific RTC code to get the ports
> from the device tree.  Currently, however, I simply use RTC_PORT(x) 
> from
> asm/mc146818rtc.h.  Is it preferable to use the device tree here?

If you instantiate the RTC device from platform code,
and the device sits at the same address on all boards
you support, the only good thing you get from using
the device tree is that you don't have to hardcode a
number in the Linux code.  Using the device tree however
the RTC device could be detected and instantiated from
more generic code, a much better situation.

Segher