2 * Common Clock definitions for various kernel files
4 * Copyright 2007-2008 Analog Devices Inc.
6 * Licensed under the GPL-2 or later.
10 #define _BFIN_CLOCKS_H
14 #ifdef CONFIG_CCLK_DIV_1
15 # define CONFIG_CCLK_ACT_DIV CCLK_DIV1
16 # define CONFIG_CCLK_DIV 1
19 #ifdef CONFIG_CCLK_DIV_2
20 # define CONFIG_CCLK_ACT_DIV CCLK_DIV2
21 # define CONFIG_CCLK_DIV 2
24 #ifdef CONFIG_CCLK_DIV_4
25 # define CONFIG_CCLK_ACT_DIV CCLK_DIV4
26 # define CONFIG_CCLK_DIV 4
29 #ifdef CONFIG_CCLK_DIV_8
30 # define CONFIG_CCLK_ACT_DIV CCLK_DIV8
31 # define CONFIG_CCLK_DIV 8
34 #ifndef CONFIG_PLL_BYPASS
35 # ifndef CONFIG_CLKIN_HALF
36 # define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)
38 # define CONFIG_VCO_HZ ((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT)/2)
41 # define CONFIG_CCLK_HZ (CONFIG_VCO_HZ/CONFIG_CCLK_DIV)
42 # define CONFIG_SCLK_HZ (CONFIG_VCO_HZ/CONFIG_SCLK_DIV)
45 # define CONFIG_VCO_HZ (CONFIG_CLKIN_HZ)
46 # define CONFIG_CCLK_HZ (CONFIG_CLKIN_HZ)
47 # define CONFIG_SCLK_HZ (CONFIG_CLKIN_HZ)
48 # define CONFIG_VCO_MULT 0