Enable RTC for Ebony and Walnut (v2)

David Gibson dwg at au1.ibm.com
Mon Jan 14 15:02:07 EST 2008


On Fri, Jan 11, 2008 at 05:29:57PM +1100, Stephen Rothwell wrote:
> On Fri, 11 Jan 2008 14:25:34 +1100 David Gibson <dwg at au1.ibm.com> wrote:
> >
> > +++ working-2.6/arch/powerpc/sysdev/of_rtc.c	2008-01-11 14:17:03.000000000 +1100
> 
> > +static __initdata struct {
> > +	const char *compatible;
> 
> If you make this an array, then the string will become __initdata as well.

Well, yes, but then I'd have to pick a specific size for the string.
Since this is supposed to be a stopgap until I can build a more
general constructor mechanism..

> > +	char *plat_name;
> > +} of_rtc_table[] = {
> > +	{ "ds1743-nvram", "rtc-ds1742" },
> > +};
> 
> > +			platform_device_register_simple(plat_name, -1, res, 1);
> 
> Do we care if this fails?

Well.. sort of, but there's not really any sane way of reporting it.
This will be called from early platform init code, failures shouldn't
cause us not to boot, and failure to register one rtc shouldn't cause
us not to attempt to register others if they're present.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080114/7282c064/attachment.pgp>


More information about the Linuxppc-dev mailing list