diff options
-rw-r--r-- | arch/powerpc/kernel/time.c | 42 | ||||
-rw-r--r-- | include/asm-powerpc/time.h | 4 |
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 | ||
1018 | static 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 | |||
1034 | static 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 | |||
1050 | int __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); | |||
39 | extern void wakeup_decrementer(void); | 39 | extern void wakeup_decrementer(void); |
40 | extern void snapshot_timebase(void); | 40 | extern void snapshot_timebase(void); |
41 | 41 | ||
42 | #ifdef CONFIG_RTC_CLASS | ||
43 | extern 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 */ |
47 | extern unsigned long ppc_proc_freq; | 43 | extern unsigned long ppc_proc_freq; |
48 | #define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) | 44 | #define DEFAULT_PROC_FREQ (DEFAULT_TB_FREQ * 8) |