twl4030: improve rtc device setup
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 11 Sep 2008 09:48:39 +0000 (02:48 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 12 Sep 2008 17:25:53 +0000 (10:25 -0700)
commit74fcfe9c589f1060b5e5a791e9c0c54212d7c1b8
treece3af3c2b3899dc8e43df1533570ebb39577779a
parent846fe83eec802587777fef31d80c967cfcf7d700
twl4030: improve rtc device setup

Make the twl4030 RTC initialization follow the driver model better.
The platform device is created (if needed) as part of twl4030 setup
instead of as a board-specific thing, and fits properly into the
driver model tree.

The only minor glitch here is on boards using platform_data to pass
MSECURE initialization hooks to the RTC driver.  The right solution
probably just removes that platform_data, and might even make Linux
follow the principle of "least privilege" (at the hardware level!)
instead of always holding this signal high.

Pending better handling of MSECURE, this patch just does what the
RTC init does, but earlier:  MSECURE is always high, so the RTC time
and calendar registers can be updated (and presumably a bunch of
non-RTC privileged operations will be allowed too).

Yet to be done:  set up the IRQ resource; make the rtc driver use
that IRQ resource; and properly issue wakeup alarms.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
drivers/i2c/chips/twl4030-core.c