[PATCH v3] Create add_rtc() function to enable the RTC CMOS driver
Segher Boessenkool
segher at kernel.crashing.org
Fri Jun 22 17:56:24 EST 2007
> Hrm. It seems rather specific. Can we do this more generally, by
> creating an of_platform device which binds to rtc nodes, then
> registers an appropriate platform device for each so that the generic
> rtc drivers pick them up. Obviously we'd need some sort of table
> mapping the device node compatible properties to the appropriate
> platform device names.
>> + * RTC_PORT(x) is hardcoded in asm/mc146818rtc.h. Verify that the
>> + * address provided by the device node matches.
>> + */
>> + if (res.start != RTC_PORT(0)) {
>> + of_node_put(np);
>> + return -ENODEV;
>> + }
>
> This looks totally bogus. If we have a device tree we should be using
> the address information from there, not using hardcoded magic. Sounds
> like asm/mc146818rtc.h needs some serious fixing.
Both of your comments would be nice extensions (and the right
way forwards), but Wade's patch is good as-is already.
Segher
More information about the Linuxppc-dev
mailing list