mpic: add support for Time-Of-Day-Clock (TODC)
PATCH 1/1 mpic: add support for Time-Of-Day-Clock (TODC)
[Forgot to cc: linuxppc-dev the first time]
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 | 6 arch/powerpc/sysdev/Makefile | 1 arch/powerpc/sysdev/todc.c | 397 +++++++++++++++++++++++++++++++++++ include/asm-powerpc/todc.h | 487 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 891 insertions(+)
--
arch/powerpc/Kconfig +6 -0
@@ -543,6 +543,12 @@ 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 +397 -0
397 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 5 lines · Mark A. Greer
+ * In order to break the assumption that the RTC and NVRAM are accessed by
+ * the same mechanism, you need to explicitly set 'ppc_md.rtc_read_val' and
+ * 'ppc_md.rtc_write_val', otherwise the values of 'ppc_md.rtc_read_val'
+ * and 'ppc_md.rtc_write_val' will be used.
I'm guessing the second references should be "nvram_read/write_val" instead.
-Hollis
Quoted 9 lines · Hollis Blanchard
Quoted 5 lines · Mark A. Greer
+ * In order to break the assumption that the RTC and NVRAM are accessed by
+ * the same mechanism, you need to explicitly set 'ppc_md.rtc_read_val' and
+ * 'ppc_md.rtc_write_val', otherwise the values of 'ppc_md.rtc_read_val'
+ * and 'ppc_md.rtc_write_val' will be used.I'm guessing the second references should be "nvram_read/write_val" instead.
Hrm, yeah, the sentence would make sense then.
I'll repost the patch.
Mark
[This is a complete replacement for the earlier patch.]
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 | 6 arch/powerpc/sysdev/Makefile | 1 arch/powerpc/sysdev/todc.c | 392 ++++++++++++++++++++++++++++++++++ include/asm-powerpc/todc.h | 487 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 886 insertions(+)
--
arch/powerpc/Kconfig +6 -0
@@ -543,6 +543,12 @@ 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 4 lines · Mark A. Greer
[Forgot to cc: linuxppc-dev the first time]
The todc code from
arch/ppcsupports many todc/rtc chips and is needed inarch/powerpc. This patch adds the todc code toarch/powerpc.
Question... what does it have to do with mpic ? :)
Ben.
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines · Mark A. Greer
[Forgot to cc: linuxppc-dev the first time]
The todc code from
arch/ppcsupports many todc/rtc chips and is needed inarch/powerpc. This patch adds the todc code toarch/powerpc.Question... what does it have to do with mpic ? :)
Oops, nothing. Cut & paste error. Should read:
[PATCH] todc: add support for Time-Of-Day-Clock (TODC)
or something like that.
Mark