diff options
author | Heiko Stuebner <heiko@sntech.de> | 2011-12-23 20:52:23 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-02-06 18:03:43 -0500 |
commit | b2994d318dc78c9a4a43605629f00217335ada28 (patch) | |
tree | 998c5f37a7e317569993718c92b86c56c24d3d52 | |
parent | 25c1a2466008a75955e80df3cc0698410a0cec72 (diff) |
ARM: S3C2443/S3C2416: add s3c_rtc_setname and rename rtc devices
As the S3C24xx SoCs use the same rtc device a renaming capability like in
the adc driver is necessary.
This patch adds a s3c_rtc_setname function and names the rtc devices for
S3C2443 and S3C2416 accordingly.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | arch/arm/mach-s3c2416/s3c2416.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-s3c2443/s3c2443.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/rtc-core.h | 27 |
3 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index 5287d2808d3e..5536392458e2 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <plat/fb-core.h> | 60 | #include <plat/fb-core.h> |
61 | #include <plat/nand-core.h> | 61 | #include <plat/nand-core.h> |
62 | #include <plat/adc-core.h> | 62 | #include <plat/adc-core.h> |
63 | #include <plat/rtc-core.h> | ||
63 | 64 | ||
64 | static struct map_desc s3c2416_iodesc[] __initdata = { | 65 | static struct map_desc s3c2416_iodesc[] __initdata = { |
65 | IODESC_ENT(WATCHDOG), | 66 | IODESC_ENT(WATCHDOG), |
@@ -101,6 +102,7 @@ int __init s3c2416_init(void) | |||
101 | s3c_fb_setname("s3c2443-fb"); | 102 | s3c_fb_setname("s3c2443-fb"); |
102 | 103 | ||
103 | s3c_adc_setname("s3c2416-adc"); | 104 | s3c_adc_setname("s3c2416-adc"); |
105 | s3c_rtc_setname("s3c2416-rtc"); | ||
104 | 106 | ||
105 | #ifdef CONFIG_PM | 107 | #ifdef CONFIG_PM |
106 | register_syscore_ops(&s3c2416_pm_syscore_ops); | 108 | register_syscore_ops(&s3c2416_pm_syscore_ops); |
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index b9deaeb0dfff..b7778a9dafaf 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <plat/fb-core.h> | 41 | #include <plat/fb-core.h> |
42 | #include <plat/nand-core.h> | 42 | #include <plat/nand-core.h> |
43 | #include <plat/adc-core.h> | 43 | #include <plat/adc-core.h> |
44 | #include <plat/rtc-core.h> | ||
44 | 45 | ||
45 | static struct map_desc s3c2443_iodesc[] __initdata = { | 46 | static struct map_desc s3c2443_iodesc[] __initdata = { |
46 | IODESC_ENT(WATCHDOG), | 47 | IODESC_ENT(WATCHDOG), |
@@ -73,6 +74,7 @@ int __init s3c2443_init(void) | |||
73 | s3c_fb_setname("s3c2443-fb"); | 74 | s3c_fb_setname("s3c2443-fb"); |
74 | 75 | ||
75 | s3c_adc_setname("s3c2443-adc"); | 76 | s3c_adc_setname("s3c2443-adc"); |
77 | s3c_rtc_setname("s3c2443-rtc"); | ||
76 | 78 | ||
77 | /* change WDT IRQ number */ | 79 | /* change WDT IRQ number */ |
78 | s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; | 80 | s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; |
diff --git a/arch/arm/plat-samsung/include/plat/rtc-core.h b/arch/arm/plat-samsung/include/plat/rtc-core.h new file mode 100644 index 000000000000..21d8594d37ca --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/rtc-core.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* linux/arch/arm/plat-samsung/include/plat/rtc-core.h | ||
2 | * | ||
3 | * Copyright (c) 2011 Heiko Stuebner <heiko@sntech.de> | ||
4 | * | ||
5 | * Samsung RTC Controller core functions | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_PLAT_RTC_CORE_H | ||
13 | #define __ASM_PLAT_RTC_CORE_H __FILE__ | ||
14 | |||
15 | /* These functions are only for use with the core support code, such as | ||
16 | * the cpu specific initialisation code | ||
17 | */ | ||
18 | |||
19 | /* re-define device name depending on support. */ | ||
20 | static inline void s3c_rtc_setname(char *name) | ||
21 | { | ||
22 | #if defined(CONFIG_SAMSUNG_DEV_RTC) || defined(CONFIG_PLAT_S3C24XX) | ||
23 | s3c_device_rtc.name = name; | ||
24 | #endif | ||
25 | } | ||
26 | |||
27 | #endif /* __ASM_PLAT_RTC_CORE_H */ | ||