Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 1 | /* linux/arch/arm/plat-s5p/include/plat/s5p-clock.h |
| 2 | * |
Kukjin Kim | 3109e55 | 2010-09-01 15:35:30 +0900 | [diff] [blame] | 3 | * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. |
| 4 | * http://www.samsung.com |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 5 | * |
| 6 | * Header file for s5p clock support |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | */ |
| 12 | |
| 13 | #ifndef __ASM_PLAT_S5P_CLOCK_H |
| 14 | #define __ASM_PLAT_S5P_CLOCK_H __FILE__ |
| 15 | |
| 16 | #include <linux/clk.h> |
| 17 | |
| 18 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) |
| 19 | |
| 20 | #define clk_fin_apll clk_ext_xtal_mux |
| 21 | #define clk_fin_mpll clk_ext_xtal_mux |
| 22 | #define clk_fin_epll clk_ext_xtal_mux |
Kukjin Kim | 3109e55 | 2010-09-01 15:35:30 +0900 | [diff] [blame] | 23 | #define clk_fin_dpll clk_ext_xtal_mux |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 24 | #define clk_fin_vpll clk_ext_xtal_mux |
Thomas Abraham | a443a63 | 2010-05-14 16:27:28 +0900 | [diff] [blame] | 25 | #define clk_fin_hpll clk_ext_xtal_mux |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 26 | |
| 27 | extern struct clk clk_ext_xtal_mux; |
Thomas Abraham | f001d5b | 2010-04-19 20:05:08 +0900 | [diff] [blame] | 28 | extern struct clk clk_xusbxti; |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 29 | extern struct clk clk_48m; |
Thomas Abraham | a443a63 | 2010-05-14 16:27:28 +0900 | [diff] [blame] | 30 | extern struct clk s5p_clk_27m; |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 31 | extern struct clk clk_fout_apll; |
| 32 | extern struct clk clk_fout_mpll; |
| 33 | extern struct clk clk_fout_epll; |
Kukjin Kim | 3109e55 | 2010-09-01 15:35:30 +0900 | [diff] [blame] | 34 | extern struct clk clk_fout_dpll; |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 35 | extern struct clk clk_fout_vpll; |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 36 | extern struct clk clk_arm; |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 37 | extern struct clk clk_vpll; |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 38 | |
| 39 | extern struct clksrc_sources clk_src_apll; |
| 40 | extern struct clksrc_sources clk_src_mpll; |
| 41 | extern struct clksrc_sources clk_src_epll; |
Kukjin Kim | 3109e55 | 2010-09-01 15:35:30 +0900 | [diff] [blame] | 42 | extern struct clksrc_sources clk_src_dpll; |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 43 | |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 44 | extern int s5p_gatectrl(void __iomem *reg, struct clk *clk, int enable); |
| 45 | |
Seungwhan Youn | d4b34c6 | 2010-10-14 10:39:08 +0900 | [diff] [blame^] | 46 | /* Common EPLL operations for S5P platform */ |
| 47 | extern int s5p_epll_enable(struct clk *clk, int enable); |
| 48 | extern unsigned long s5p_epll_get_rate(struct clk *clk); |
| 49 | |
Kukjin Kim | 1a0e8a5 | 2010-01-14 08:13:37 +0900 | [diff] [blame] | 50 | #endif /* __ASM_PLAT_S5P_CLOCK_H */ |