todc: add support for Time-Of-Day-Clock
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
@@ -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
@@ -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
Quoted 10 lines · Mark A. Greer
This is a resubmit with a proper subject and with all comments addressed. Applies cleanly to powerpc.git
649e85797259162f7fdc696420e7492f20226f2dMark
--The todc code from
arch/ppcsupports many todc/rtc chips and is needed inarch/powerpc. This patch adds the todc code toarch/powerpc.Signed-off-by Mark A. Greer <[email protected]>
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
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.git649e85797259162f7fdc696420e7492f20226f2dMark
--
Quoted 7 lines
Quoted 4 lines
The todc code from
arch/ppcsupports many todc/rtc chips and is needed inarch/powerpc. This patch adds the todc code toarch/powerpc.Signed-off-by Mark A. Greer <[email protected]>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