ARM: S5PV210: Add clock support for S5PV210
Subsystems (3)
PATCH v5 2/8 ARM: S5PV210: Add clock support for S5PV210
This patch adds clock support for S5PV210. This patch adds the clock register definitions and the various system clocks in S5PV210. Clocks that are common to other S5P SoC'c are added in the common S5P clock support.
Signed-off-by Thomas Abraham <[email protected]>
Signed-off-by Kukjin Kim <[email protected]>
--- arch/arm/mach-s5pv210/Makefile | 2 +- arch/arm/mach-s5pv210/clock.c | 454 +++++++++++++++++++++++ arch/arm/mach-s5pv210/include/mach/pwm-clock.h | 69 ++++ arch/arm/mach-s5pv210/include/mach/regs-clock.h | 169 +++++++++ arch/arm/mach-s5pv210/include/mach/tick.h | 26 ++ arch/arm/plat-s5p/clock.c | 13 + arch/arm/plat-s5p/include/plat/s5p-clock.h | 2 + 7 files changed, 734 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-s5pv210/clock.c create mode 100644 arch/arm/mach-s5pv210/include/mach/pwm-clock.h create mode 100644 arch/arm/mach-s5pv210/include/mach/regs-clock.h create mode 100644 arch/arm/mach-s5pv210/include/mach/tick.h
arch/arm/mach-s5pv210/Makefile +1 -1
@@ -12,7 +12,7 @@ obj- := # Core support for S5PV210 system -obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o +obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o # machine support
arch/arm/mach-s5pv210/clock.c new file +454 -0
454 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/pwm-clock.h new file +69 -0
69 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/regs-clock.h new file +169 -0
169 lines not on this page · raw message
arch/arm/mach-s5pv210/include/mach/tick.h new file +26 -0
@@ -0,0 +1,26 @@ +/* linux/arch/arm/mach-s5pv210/include/mach/tick.h +* +* Copyright (c) 2009 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* Based on arch/arm/mach-s3c6400/include/mach/tick.h +* +* S5PV210 - Timer tick support definitions +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ASM_ARCH_TICK_H +#define __ASM_ARCH_TICK_H __FILE__ + +static inline u32 s3c24xx_ostimer_pending (void ) +{ +u32 pend =__raw_readl (VA_VIC0 +VIC_RAW_STATUS ); +return pend & (1 << (IRQ_TIMER4_VIC -S5P_IRQ_VIC0 (0 ))); +} + +#define TICK_MAX (0xffffffff) + +#endif /* __ASM_ARCH_TICK_H */
arch/arm/plat-s5p/clock.c +13 -0
@@ -33,6 +33,12 @@ struct clk clk_ext_xtal_mux = { .id = -1, }; +static struct clk s5p_clk_27m = { + .name ="clk_27m" , + .id =-1 , + .rate =27000000 , +}; +/* 48MHz USB Phy clock output */ struct clk clk_48m = { .name ="clk_48m" ,
@@ -104,6 +110,11 @@ struct clksrc_sources clk_src_epll = { .nr_sources = ARRAY_SIZE(clk_src_epll_list), }; +struct clk clk_vpll = { + .name ="vpll" , + .id =-1 , +}; +int s5p_gatectrl (void __iomem *reg,struct clk *clk,int enable) {unsigned int ctrlbit = clk->ctrlbit;
@@ -118,10 +129,12 @@ int s5p_gatectrl(void __iomem *reg, struct clk *clk, int enable)static struct clk *s5p_clks[]__initdata = { &clk_ext_xtal_mux, &clk_48m, + &s5p_clk_27m, &clk_fout_apll, &clk_fout_mpll, &clk_fout_epll, &clk_arm, + &clk_vpll, };void __init s5p_register_clocks (unsigned long xtal_freq)
arch/arm/plat-s5p/include/plat/s5p-clock.h +2 -0
@@ -20,6 +20,7 @@#define clk_fin_apll clk_ext_xtal_mux#define clk_fin_mpll clk_ext_xtal_mux#define clk_fin_epll clk_ext_xtal_mux +#define clk_fin_vpll clk_ext_xtal_muxextern struct clk clk_ext_xtal_mux;extern struct clk clk_48m;
@@ -27,6 +28,7 @@ extern struct clk clk_fout_apll;extern struct clk clk_fout_mpll;extern struct clk clk_fout_epll;extern struct clk clk_arm; +extern struct clk clk_vpll;extern struct clksrc_sources clk_src_apll;extern struct clksrc_sources clk_src_mpll;
Signature · 1 line
1.6.2.5