[PATCH] ARM: OMAP: add RTC support to beagleboard

This patch adds RTC support to the omap3 based beagleboard

Signed-off-by: Koen Kooi <koen@openembedded.org>

I've reviewed this patch and based upon my experience with the OMAP3
EVM believe it should also work on the beagleboard.

Acked-by: Steve Sakoman <steve@sakoman.com>

Something must be missing here, omap3_beagle_devices is not being referenced.

The missing line probably looks something like
platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices));

You can also add the #ifdef around omap3_beagle_twl4030rtc_device to
avoid a compiler warning, or drop it in both places.

Regards

Op 8 mei 2008, om 18:55 heeft andrzej zaborowski het volgende
geschreven:

Something must be missing here, omap3_beagle_devices is not being
referenced.

The missing line probably looks something like
platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices));

You're 100% right :slight_smile: I forgot --amend, so the patch missed my second
commit

You can also add the #ifdef around omap3_beagle_twl4030rtc_device to
avoid a compiler warning, or drop it in both places.

The idea is that a next patch (rudimentary lcd support) will add
device in there as well. I can move the ifdef for this patch if you
want.

thanks for the review,

Koen

Updated patch:

This patch adds RTC support to the omap3 based beagleboard

Signed-off-by: Koen Kooi <koen@openembedded.org>
- ---
  arch/arm/mach-omap2/board-omap3beagle.c | 12 ++++++++++++
  1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
omap2/board-omap3beagle.c
index 626f004..0c0cbfc 100644
- --- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -58,13 +58,25 @@ static struct omap_mmc_config
omap3beagle_mmc_config __initdata = {
    },
  };

+static struct platform_device omap3_beagle_twl4030rtc_device = {
+ .name = "twl4030_rtc",
+ .id = -1,
+};

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 8 mei 2008, om 18:55 heeft andrzej zaborowski het volgende
geschreven:

Something must be missing here, omap3_beagle_devices is not being
referenced.

The missing line probably looks something like
platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices));

You're 100% right :slight_smile: I forgot --amend, so the patch missed my second
commit

You can also add the #ifdef around omap3_beagle_twl4030rtc_device to
avoid a compiler warning, or drop it in both places.

The idea is that a next patch (rudimentary lcd support) will add
device in there as well. I can move the ifdef for this patch if you
want.

thanks for the review,

Koen

Updated patch:

With the current patch I get this in the bootlog:

usb0: RNDIS ready
mice: PS/2 mouse device common for all mice
twl4030_rtc twl4030_rtc: rtc core: registered twl4030_rtc as rtc0
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[..]
twl4030_rtc twl4030_rtc: setting system clock to 2000-01-01 00:02:15
UTC (946684935)

So it works :slight_smile:

regards,

Koen

* Koen Kooi <k.kooi@student.utwente.nl> [080509 07:56]:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Op 8 mei 2008, om 18:55 heeft andrzej zaborowski het volgende
> geschreven:
>> Something must be missing here, omap3_beagle_devices is not being
>> referenced.
>>
>> The missing line probably looks something like
>> platform_add_devices(omap3_beagle_devices,
>> ARRAY_SIZE(omap3_beagle_devices));
>
> You're 100% right :slight_smile: I forgot --amend, so the patch missed my second
> commit
>
>> You can also add the #ifdef around omap3_beagle_twl4030rtc_device to
>> avoid a compiler warning, or drop it in both places.
>
> The idea is that a next patch (rudimentary lcd support) will add
> device in there as well. I can move the ifdef for this patch if you
> want.
>
> thanks for the review,
>
> Koen
>
> Updated patch:

With the current patch I get this in the bootlog:

usb0: RNDIS ready
mice: PS/2 mouse device common for all mice
twl4030_rtc twl4030_rtc: rtc core: registered twl4030_rtc as rtc0
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[..]
twl4030_rtc twl4030_rtc: setting system clock to 2000-01-01 00:02:15
UTC (946684935)

So it works :slight_smile:

Pushing today.

Tony

* Koen Kooi <k.kooi@student.utwente.nl> [080509 07:56]:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 8 mei 2008, om 18:55 heeft andrzej zaborowski het volgende
geschreven:

Something must be missing here, omap3_beagle_devices is not being
referenced.

The missing line probably looks something like
platform_add_devices(omap3_beagle_devices,
ARRAY_SIZE(omap3_beagle_devices));

You're 100% right :slight_smile: I forgot --amend, so the patch missed my second
commit

You can also add the #ifdef around omap3_beagle_twl4030rtc_device
to
avoid a compiler warning, or drop it in both places.

The idea is that a next patch (rudimentary lcd support) will add
device in there as well. I can move the ifdef for this patch if you
want.

thanks for the review,

Koen

Updated patch:

With the current patch I get this in the bootlog:

usb0: RNDIS ready
mice: PS/2 mouse device common for all mice
twl4030_rtc twl4030_rtc: rtc core: registered twl4030_rtc as rtc0
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[..]
twl4030_rtc twl4030_rtc: setting system clock to 2000-01-01 00:02:15
UTC (946684935)

So it works :slight_smile:

Pushing today.

It still doesn't show up in git after the rc2 merge, did something go
wrong?

regards,

Koen

* Koen Kooi <k.kooi@student.utwente.nl> [080512 14:55]:

> * Koen Kooi <k.kooi@student.utwente.nl> [080509 07:56]:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>>
>>> Op 8 mei 2008, om 18:55 heeft andrzej zaborowski het volgende
>>> geschreven:
>>>> Something must be missing here, omap3_beagle_devices is not being
>>>> referenced.
>>>>
>>>> The missing line probably looks something like
>>>> platform_add_devices(omap3_beagle_devices,
>>>> ARRAY_SIZE(omap3_beagle_devices));
>>>
>>> You're 100% right :slight_smile: I forgot --amend, so the patch missed my second
>>> commit
>>>
>>>> You can also add the #ifdef around omap3_beagle_twl4030rtc_device
>>>> to
>>>> avoid a compiler warning, or drop it in both places.
>>>
>>> The idea is that a next patch (rudimentary lcd support) will add
>>> device in there as well. I can move the ifdef for this patch if you
>>> want.
>>>
>>> thanks for the review,
>>>
>>> Koen
>>>
>>> Updated patch:
>>
>> With the current patch I get this in the bootlog:
>>
>> usb0: RNDIS ready
>> mice: PS/2 mouse device common for all mice
>> twl4030_rtc twl4030_rtc: rtc core: registered twl4030_rtc as rtc0
>> OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
>> [..]
>> twl4030_rtc twl4030_rtc: setting system clock to 2000-01-01 00:02:15
>> UTC (946684935)
>>
>> So it works :slight_smile:
>
> Pushing today.

It still doesn't show up in git after the rc2 merge, did something go
wrong?

Hmm, sorry I guess I must have edited it manually because it did not
apply. Then I probably forgot to commit it and moved onto other things
and ran git-reset --hard...

Can you please refresh and send it one more time?

Thanks,

Tony