1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (c) 2008 Michael Sevakis
12 * Clock control functions for IMX31 processor
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
22 ****************************************************************************/
75 CGM_OFF
= 0x0, /* Always off */
76 CGM_ON_RUN
= 0x1, /* On in run mode, off in wait and doze */
77 CGM_ON_RUN_WAIT
= 0x2, /* On in run and wait modes, off in doze */
78 CGM_ON_ALL
= 0x3, /* Always on */
81 #define CG_MASK 0x3 /* bitmask */
83 /* Enable or disable module clocks independently - module must _not_ be
85 void ccm_module_clock_gating(enum IMX31_CG_LIST cg
,
86 enum IMX31_CG_MODES mode
);
96 #define CONFIG_CLK32_FREQ 32768
97 #define CONFIG_HCLK_FREQ 27000000
99 /* Get the PLL reference clock frequency in HZ */
100 unsigned int ccm_get_pll_ref_clk(void);
102 /* Return PLL frequency in HZ */
103 unsigned int ccm_get_pll(enum IMX31_PLLS pll
);
105 /* Return ipg_clk in HZ */
106 unsigned int ccm_get_ipg_clk(void);
108 /* Return ahb_clk in HZ */
109 unsigned int ccm_get_ahb_clk(void);
111 /* Return the ATA frequency in HZ */
112 unsigned int ccm_get_ata_clk(void);
114 #endif /* _CCM_IMX31_H_ */