summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c24xx/common.c
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2014-05-09 05:48:57 +0900
committerKukjin Kim <kgene.kim@samsung.com>2014-05-13 08:00:01 +0900
commit51cb128987d96538fdea4ce3704e79257afad4a5 (patch)
tree1109bd22e3f6a5fb9e3274bd3d158c4a05d17c94 /arch/arm/mach-s3c24xx/common.c
parent5799ea12a41286d9588155a1abd828f43bc63d6b (diff)
downloadlinux-51cb128987d96538fdea4ce3704e79257afad4a5.tar.gz
linux-51cb128987d96538fdea4ce3704e79257afad4a5.tar.bz2
linux-51cb128987d96538fdea4ce3704e79257afad4a5.zip
ARM: S3C24XX: enable usage of common dclk if common clock framework is enabled
Add platform device and select the correct implementation automatically depending on wether the old samsung_clock or the common clock framework is enabled. This is only done for machines already using the old dclk implementation, as everybody else should move to use dt anyway. The machine-specific settings for the external clocks will have to be set by somebody with knowledge about the specific hardware. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Tomasz Figa <t.figa@samsung.com> [pebolle@tiscali.nl: pointed out typo and fixed] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c24xx/common.c')
-rw-r--r--arch/arm/mach-s3c24xx/common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
index ad5b76bf4d51..7cc6d944c820 100644
--- a/arch/arm/mach-s3c24xx/common.c
+++ b/arch/arm/mach-s3c24xx/common.c
@@ -553,3 +553,17 @@ void __init s3c2443_init_clocks(int xtal)
s3c2443_common_clk_init(NULL, xtal, 1, S3C24XX_VA_CLKPWR);
}
#endif
+
+#if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2440) || \
+ defined(CONFIG_CPU_S3C2442)
+static struct resource s3c2410_dclk_resource[] = {
+ [0] = DEFINE_RES_MEM(0x56000084, 0x4),
+};
+
+struct platform_device s3c2410_device_dclk = {
+ .name = "s3c2410-dclk",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(s3c2410_dclk_resource),
+ .resource = s3c2410_dclk_resource,
+};
+#endif