mpc5200: rtc driver
PATCH 1/1 mpc5200: rtc driver
Driver for internal rtc on mpc5200.
It isn't very useful, since its contents don't remain on power off.
Can be used to set alarm for wake-up from deep-sleep or one second periodic interrupt ;-)
Signed-off-by Domen Puncer <[email protected]>
--- drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 drivers/rtc/rtc-mpc5200.c | 282 ++++++++++++++++++++++++++++++++++++++ include/asm-powerpc/mpc5200_rtc.h | 49 ++++++ 4 files changed, 342 insertions(+)
drivers/rtc/Kconfig +10 -0
@@ -401,4 +401,14 @@ config RTC_DRV_RS5C313 help If you say yes here you get support for the Ricoh RS5C313 RTC chips. +config RTC_DRV_MPC5200 + tristate "MPC5200 RTC" + depends on RTC_CLASS + help + If you say yes here you will get support for the + RTC built in MPC5200(b) CPU. + + This driver can also be built as a module. If so, the module + will be called rtc-mpc5200. + endmenu
drivers/rtc/Makefile +1 -0
@@ -41,3 +41,4 @@ obj-$(CONFIG_RTC_DRV_V3020) += rtc-v3020 obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o +obj-$(CONFIG_RTC_DRV_MPC5200) += rtc-mpc5200.o
drivers/rtc/rtc-mpc5200.c new file +282 -0
282 lines not on this page · raw message
include/asm-powerpc/mpc5200_rtc.h new file +49 -0
49 lines not on this page · raw message
include/asm-powerpc/mpc5200_rtc.h line 5
Quoted 10 lines · Domen Puncer
Index:
work-powerpc.git/include/asm-powerpc/mpc5200_rtc.h
===================================================================include/asm-powerpc/mpc5200_rtc.h new file +5
-0@@ -0,0 +1,49 @@ +#ifndef _MPC5200_RTC_H_ +#define _MPC5200_RTC_H_ + +/* RTC */ +struct mpc52xx_rtc {
Is it really worth putting a header that's only ever going to be used by 1 file under drivers/rtc under include/asm-*/? If this struct is really only for rtc-mpc52xx, just define it .c?
Thanks
Guennadi
---
Guennadi Liakhovetski