enable generic rtc hook for the MPC8349 mITX
Subsystems (2)
PATCH 2/2 enable generic rtc hook for the MPC8349 mITX
enable generic rtc hook for the MPC8349 mITX.
--- arch/powerpc/platforms/83xx/mpc834x_itx.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/powerpc/platforms/83xx/mpc834x_itx.c +4 -0
@@ -109,6 +109,10 @@ static int __init mpc834x_itx_probe(voidreturn 1 ; } +#ifdef CONFIG_RTC_CLASS +late_initcall (rtc_class_hookup); +#endif +define_machine (mpc834x_itx) { .name = "MPC834x ITX", .probe = mpc834x_itx_probe,
Signature · 1 line
1.4.2.1
Quoted 13 lines · Kim Phillips
enable generic rtc hook for the MPC8349 mITX.
Signed-off-by Kim Phillips <[email protected]>--- arch/powerpc/platforms/83xx/mpc834x_itx.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)arch/powerpc/platforms/83xx/mpc834x_itx.c +0
-0
arch/powerpc/platforms/83xx/mpc834x_itx.c static int __init mpc834x_itx_probe(void · line 114
Quoted 6 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c +3
-0@@ -109,6 +109,10 @@ static int __init mpc834x_itx_probe(voidreturn 1 ; } +#ifdef CONFIG_RTC_CLASS +late_initcall (rtc_class_hookup); +#endif
Any reason we can't just do this in setup_arch?
- k
Quoted 6 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c +1
-0+define_machine (mpc834x_itx) { .name = "MPC834x ITX", .probe = mpc834x_itx_probe,Signature · 1 line
1.4.2.1
Quoted 1 line · Kumar Gala
On Sep 26, 2006, at 5:46 PM, Kim Phillips wrote:
[snip]
Quoted 9 lines
Quoted 9 lines
arch/ renamed from arch/powerpc/platforms/83xx/mpc834x_itx.c +0
-0
powerpc/platforms/83xx/mpc834x_itx.c
index 969fbb6..8c676d7 100644arch/powerpc/platforms/83xx/mpc834x_itx.c +0
-0@@ -109,6 +109,10 @@ static int __init mpc834x_itx_probe(voidreturn 1 ; }
Quoted 5 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c static int __init mpc834x_itx_probe(void · line 114
Quoted 3 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c +3
-0+#ifdef CONFIG_RTC_CLASS +late_initcall (rtc_class_hookup); +#endif Any reason we can't just do this in
setup_arch?
I think because of rtc-over-i2c and similar where we need the whole rest of the system 'up' before we can try and use the RTC (which might not be the case for this specific board, but for consistency it looks like a good thing to always do it like this).
Signature · 1 line
Tom Rini
Quoted 18 lines · On Wed, 27 Sep 2006 08:58:53 -0700 Tom Rini <[email protected]> wrote:
Quoted 1 line · Kumar Gala
On Sep 26, 2006, at 5:46 PM, Kim Phillips wrote:
[snip]
Quoted 9 lines
Quoted 9 lines
arch/ renamed from arch/powerpc/platforms/83xx/mpc834x_itx.c +0
-0
powerpc/platforms/83xx/mpc834x_itx.c
index 969fbb6..8c676d7 100644arch/powerpc/platforms/83xx/mpc834x_itx.c +0
-0@@ -109,6 +109,10 @@ static int __init mpc834x_itx_probe(voidreturn 1 ; }Quoted 5 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c static int __init mpc834x_itx_probe(void · line 114
Quoted 3 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c +3
-0+#ifdef CONFIG_RTC_CLASS +late_initcall (rtc_class_hookup); +#endif Any reason we can't just do this in
setup_arch?
Quoted 5 lines
I think because of rtc-over-i2c and similar where we need the whole rest of the system 'up' before we can try and use the RTC (which might not be the case for this specific board, but for consistency it looks like a good thing to always do it like this).
this is indeed the case, as with the static assignment of the ppc_md rtc_time functions in define_machine. In the early assignment case, the kernel oopses early in rtc_class_open().
During testing I noticed hwclock get/set operations worked even without hooking up with the ppc_md rtc_time functions. Turns out this rtc_class provides access to the RTC to the whole kernel and userspace:
http://lkml.org/lkml/2005/12/20/220
so, both of these patches are really unnecessary, unless there's a genuine consumer in arch/powerpc that I can't find (I'm assuming get_boot_time() isn't one of them since it gets called way too early in the rtc-over-i2c based platform case).
So we should just configure RTC_CLASS and the specific chip and we're done. :)
Kim
Quoted 28 lines · Kim Phillips
Quoted 18 lines · On Wed, 27 Sep 2006 08:58:53 -0700 Tom Rini <[email protected]> wrote:
Quoted 1 line · Kumar Gala
On Sep 26, 2006, at 5:46 PM, Kim Phillips wrote:
[snip]
Quoted 9 lines
Quoted 9 lines
arch/ renamed from arch/powerpc/platforms/83xx/mpc834x_itx.c +0
-0
powerpc/platforms/83xx/mpc834x_itx.c
index 969fbb6..8c676d7 100644arch/powerpc/platforms/83xx/mpc834x_itx.c +0
-0@@ -109,6 +109,10 @@ static int __init mpc834x_itx_probe(voidreturn 1 ; }Quoted 5 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c static int __init mpc834x_itx_probe(void · line 114
Quoted 3 lines
arch/powerpc/platforms/83xx/mpc834x_itx.c +3
-0+#ifdef CONFIG_RTC_CLASS +late_initcall (rtc_class_hookup); +#endif Any reason we can't just do this in
setup_arch?Quoted 5 lines
I think because of rtc-over-i2c and similar where we need the whole rest of the system 'up' before we can try and use the RTC (which might not be the case for this specific board, but for consistency it looks like a good thing to always do it like this).
this is indeed the case, as with the static assignment of the
ppc_mdrtc_timefunctions indefine_machine. In the early assignment case, the kernel oopses early inrtc_class_open().
Quoted 7 lines
During testing I noticed hwclock get/set operations worked even without hooking up with the
ppc_mdrtc_timefunctions. Turns out thisrtc_classprovides access to the RTC to the whole kernel and userspace:http://lkml.org/lkml/2005/12/20/220
so, both of these patches are really unnecessary, unless there's a genuine consumer in
arch/powerpcthat I can't find (I'm assumingget_boot_time()isn't one of them since it gets called way too early in the rtc-over-i2c based platform case).So we should just configure
RTC_CLASSand the specific chip and we're done. :)
Does this mean we can then rip out some existing code, so long as there's associated cleanup / rtc class support additions?
Signature · 1 line
Tom Rini
Quoted 2 lines · Tom Rini
Does this mean we can then rip out some existing code, so long as there's associated cleanup / rtc class support additions?
Long term, the todc stuff should disappear.
Mark