Skip to contentSkip to conversation

todc: add support for Time-Of-Day-Clock

PATCH In review Mark A. Greer 2 participants 3 messages Jun 28, 2006 – Jun 30, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 todc: add support for Time-Of-Day-Clock

This is a resubmit with a proper subject and with all comments addressed. Applies cleanly to powerpc.git 649e85797259162f7fdc696420e7492f20226f2d

Mark
--

The todc code from arch/ppc supports many todc/rtc chips and is needed in arch/powerpc. This patch adds the todc code to arch/powerpc.

--

 arch/powerpc/Kconfig         |    7 
 arch/powerpc/sysdev/Makefile |    1 
 arch/powerpc/sysdev/todc.c   |  392 ++++++++++++++++++++++++++++++++++
 include/asm-powerpc/todc.h   |  487 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 887 insertions(+)

--

arch/powerpc/Kconfig +7 -0
index a4dad6e..b1dcdbd 100644
@@ -562,6 +562,13 @@ config TAU_AVERAGE
 	  /proc/cpuinfo.
 
 	  If in doubt, say N here.
+
+config PPC_TODC
+	depends on EMBEDDED6xx
+	bool "Generic Time-of-day Clock (TODC) support"
+	---help---
+	  This adds support for many TODC/RTC chips.
+
 endmenu
 
 source arch/powerpc/platforms/embedded6xx/Kconfig
arch/powerpc/sysdev/Makefile +1 -0
index cef95b0..8b0dd5f 100644
@@ -12,3 +12,4 @@ obj-$(CONFIG_U3_DART)		+= dart_iommu.o
 obj-$(CONFIG_MMIO_NVRAM)	+= mmio_nvram.o
 obj-$(CONFIG_PPC_83xx)		+= ipic.o
 obj-$(CONFIG_FSL_SOC)		+= fsl_soc.o
+obj-$(CONFIG_PPC_TODC)		+= todc.o
arch/powerpc/sysdev/todc.c new file +392 -0

392 lines not on this page · raw message

include/asm-powerpc/todc.h new file +487 -0

487 lines not on this page · raw message

#1 lore raw
Quoted 10 lines · Mark A. Greer

This is a resubmit with a proper subject and with all comments addressed. Applies cleanly to powerpc.git 649e85797259162f7fdc696420e7492f20226f2d

Mark
--

The todc code from arch/ppc supports many todc/rtc chips and is needed in arch/powerpc. This patch adds the todc code to arch/powerpc.

Just noticed this and was wondering if you have looked at the new RTC subsystem and if we can move any of this over to use that?

Kim has a patch for the MPC834x ITC board that appear to provide a generic implementations of ppc_md.set_rtc_time, ppc.get_rtc_time using the RTC class code.

- k

#2 lore raw
Quoted 10 lines · Kumar Gala
Quoted 8 lines · Mark A. Greer

This is a resubmit with a proper subject and with all comments addressed.
Applies cleanly to powerpc.git 649e85797259162f7fdc696420e7492f20226f2d

Mark
--

Quoted 7 lines
Quoted 4 lines

The todc code from arch/ppc supports many todc/rtc chips and is needed in arch/powerpc. This patch adds the todc code to arch/powerpc.

Just noticed this and was wondering if you have looked at the new RTC subsystem and if we can move any of this over to use that?

Yes, its on the todo list.

Quoted 3 lines

Kim has a patch for the MPC834x ITC board that appear to provide a generic implementations of ppc_md.set_rtc_time, ppc.get_rtc_time using the RTC class code.

I saw that but had a chance to really look at it yet. Eventually, todc should disappear.

Mark