aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2006-11-21 11:31:14 -0500
committerPaul Mackerras <paulus@samba.org>2006-11-21 20:13:36 -0500
commitdf9c23095fc8652798c41dd860676d3dafb2f1dc (patch)
tree3c4cf44ca6cef63531bfe969e018a0891716aaae
parent6c12c18dfb0ccae21816de3e0c323b5250450d82 (diff)
[POWERPC] Revert "[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class"
This reverts commit 7a69af63e788a324d162201a0b23df41bcf158dd. As advised by David Brownell: http://marc.theaimsgroup.com/?l=linux-kernel&m=116387226902131&w=2 Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/kernel/time.c42
-rw-r--r--include/asm-powerpc/time.h4
2 files changed, 0 insertions, 46 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index a1b5e4b16151..46a24de36fec 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -1014,48 +1014,6 @@ void __init time_init(void)
1014 set_dec(tb_ticks_per_jiffy); 1014 set_dec(tb_ticks_per_jiffy);
1015} 1015}
1016 1016
1017#ifdef CONFIG_RTC_CLASS
1018static int set_rtc_class_time(struct rtc_time *tm)
1019{
1020 int err;
1021 struct class_device *class_dev =
1022 rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
1023
1024 if (class_dev == NULL)
1025 return -ENODEV;
1026
1027 err = rtc_set_time(class_dev, tm);
1028
1029 rtc_class_close(class_dev);
1030
1031 return 0;
1032}
1033
1034static void get_rtc_class_time(struct rtc_time *tm)
1035{
1036 int err;
1037 struct class_device *class_dev =
1038 rtc_class_open(CONFIG_RTC_HCTOSYS_DEVICE);
1039
1040 if (class_dev == NULL)
1041 return;
1042
1043 err = rtc_read_time(class_dev, tm);
1044
1045 rtc_class_close(class_dev);
1046
1047 return;
1048}
1049
1050int __init rtc_class_hookup(void)
1051{
1052 ppc_md.get_rtc_time = get_rtc_class_time;
1053 ppc_md.set_rtc_time = set_rtc_class_time;
1054
1055 return 0;
1056}
1057#endif /* CONFIG_RTC_CLASS */
1058
1059 1017
1060#define FEBRUARY 2 1018#define FEBRUARY 2
1061#define STARTOFTIME 1970 1019#define STARTOFTIME 1970
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index a78285010d62..4cff977ad526 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -39,10 +39,6 @@ extern void generic_calibrate_decr(void);
39extern void wakeup_decrementer(void); 39extern void wakeup_decrementer(void);
40extern void snapshot_timebase(void); 40extern void snapshot_timebase(void);
41 41
42#ifdef CONFIG_RTC_CLASS
43extern int __init rtc_class_hookup(void);
44#endif
45
46/* Some sane defaults: 125 MHz timebase, 1GHz processor */ 42/* Some sane defaults: 125 MHz timebase, 1GHz processor */
47extern unsigned long ppc_proc_freq; 43extern unsigned long ppc_proc_freq;
48#define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) 44#define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8)