Skip to contentSkip to conversation

sparc32: use RTC subsystem

PATCH Applied Krzysztof Helt 2 participants 2 messages Sep 3, 2008 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 sparc32: use RTC subsystem

From: Krzysztof Helt <[email protected]>

Use rtc subsystem for sparc32 architecture. Actually, only one driver is needed: m48t59 as it supports the most common clocks on sparc32
machines: m48t08 and m48t02.

---

I haven't touched the IDL rtc code as Dave Miller said it would be removed.

According to the DaveM's prtconfs git repository the sparc32 families have these drivers:

sun4m/sun4d: m48t08
sun4c: m48t02

arch/sparc/Kconfig +2 -0
diff -urp linux-old/arch/sparc/Kconfig linux-sparc/arch/sparc/Kconfig
@@ -69,6 +69,8 @@ config SPARC
 	select HAVE_OPROFILE
 	select HAVE_ARCH_KGDB if !SMP
 	select HAVE_ARCH_TRACEHOOK
+	select RTC_CLASS
+	select RTC_DRV_M48T59
 
 # Identify this as a Sparc32 build
 config SPARC32
arch/sparc/kernel/sparc_ksyms.c +0 -2
diff -urp linux-old/arch/sparc/kernel/sparc_ksyms.c linux-sparc/arch/sparc/kernel/sparc_ksyms.c
@@ -127,8 +127,6 @@ EXPORT_SYMBOL(phys_cpu_present_map);
 EXPORT_SYMBOL(__udelay);
 EXPORT_SYMBOL(__ndelay);
 EXPORT_SYMBOL(rtc_lock);
-EXPORT_SYMBOL(mostek_lock);
-EXPORT_SYMBOL(mstk48t02_regs);
 #ifdef CONFIG_SUN_AUXIO
 EXPORT_SYMBOL(set_auxio);
 EXPORT_SYMBOL(get_auxio);
arch/sparc/kernel/time.c +80 -181

343 lines not on this page · raw message

maintainer
#1 lore raw

From: Krzysztof Helt <[email protected]>
Date: Wed, 3 Sep 2008 18:32:55 +0200

Quoted 6 lines

Use rtc subsystem for sparc32 architecture. Actually, only one driver is needed: m48t59 as it supports the most common clocks on sparc32
machines: m48t08 and m48t02.

I wish you would have prepared this against sparc-next-2.6, half of the patch rejected :-/ For example, everything mentioning CONFIG_SUN4 has been deleted from the tree.

Anyways, I fixed it up and added proper code to set_rtc_mmss() to call into the generic RTC layer, just as I did for sparc64.

I've pushed this into sparc-next-2.6, let's see what explodes :)

sparc32: use RTC subsystem

Use rtc subsystem for sparc32 architecture.
Actually, only one driver is needed: m48t59
as it supports the most common clocks on sparc32
machines: m48t08 and m48t02.

[ Add proper RTC layer calls to set_rtc_mmss() -DaveM ]

---
 arch/sparc/Kconfig              |    2 +
 arch/sparc/kernel/sparc_ksyms.c |    2 -
 arch/sparc/kernel/time.c        |  217 +++++++++++----------------------------
 3 files changed, 62 insertions(+), 159 deletions(-)
arch/sparc/Kconfig +2 -0
index a4c7fb7..97671da 100644
@@ -75,6 +75,8 @@ config SPARC
 	select HAVE_ARCH_KGDB if !SMP
 	select HAVE_ARCH_TRACEHOOK
 	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select RTC_CLASS
+	select RTC_DRV_M48T59
 
 # Identify this as a Sparc32 build
 config SPARC32
arch/sparc/kernel/sparc_ksyms.c +0 -2
index 6007ac5..0ce002e 100644
@@ -123,8 +123,6 @@ EXPORT_SYMBOL(phys_cpu_present_map);
 EXPORT_SYMBOL(__udelay);
 EXPORT_SYMBOL(__ndelay);
 EXPORT_SYMBOL(rtc_lock);
-EXPORT_SYMBOL(mostek_lock);
-EXPORT_SYMBOL(mstk48t02_regs);
 #ifdef CONFIG_SUN_AUXIO
 EXPORT_SYMBOL(set_auxio);
 EXPORT_SYMBOL(get_auxio);
arch/sparc/kernel/time.c +60 -157

276 lines not on this page · raw message

Signature · 1 line
1.5.6.5.GIT