3 * Ben Gray <ben.r.gray@gmail.com>.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by Ben Gray.
17 * 4. The name of the company nor the name of the author may be used to
18 * endorse or promote products derived from this software without specific
19 * prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY BEN GRAY ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL BEN GRAY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 * Texas Instruments - OMAP3xxx series processors
40 * OMAP35x Applications Processor
41 * Technical Reference Manual
42 * (omap35xx_techref.pdf)
49 INVALID_CLK_IDENT = 0,
51 /* System clocks, typically you can only call ti_prcm_clk_get_source_freq()
52 * on these clocks as they are enabled by default.
56 /* The MPU (ARM) core clock */
96 /* General purpose timer modules */
110 /* McBSP module(s) */
117 /* General purpose I/O modules */
132 /* Mentor USB modules */
136 EDMA_TPCC_CLK = 1200,
141 /* LCD controller module */
149 /* Mailbox modules */
152 /* Spinlock modules */
153 SPINLOCK0_CLK = 1600,
171 SYSCLK_CLK, /* System clock */
174 F32KHZ_CLK, /* 32KHz clock */
175 F48MHZ_CLK, /* 48MHz clock */
176 F64MHZ_CLK, /* 64MHz clock */
177 F96MHZ_CLK, /* 96MHz clock */
181 struct ti_clock_dev {
182 /* The profile of the timer */
185 /* A bunch of callbacks associated with the clock device */
186 int (*clk_activate)(struct ti_clock_dev *clkdev);
187 int (*clk_deactivate)(struct ti_clock_dev *clkdev);
188 int (*clk_set_source)(struct ti_clock_dev *clkdev,
190 int (*clk_accessible)(struct ti_clock_dev *clkdev);
191 int (*clk_set_source_freq)(struct ti_clock_dev *clkdev,
193 int (*clk_get_source_freq)(struct ti_clock_dev *clkdev,
197 int ti_prcm_clk_valid(clk_ident_t clk);
198 int ti_prcm_clk_enable(clk_ident_t clk);
199 int ti_prcm_clk_disable(clk_ident_t clk);
200 int ti_prcm_clk_accessible(clk_ident_t clk);
201 int ti_prcm_clk_disable_autoidle(clk_ident_t clk);
202 int ti_prcm_clk_set_source(clk_ident_t clk, clk_src_t clksrc);
203 int ti_prcm_clk_set_source_freq(clk_ident_t clk, unsigned int freq);
204 int ti_prcm_clk_get_source_freq(clk_ident_t clk, unsigned int *freq);
205 void ti_prcm_reset(void);
207 #endif /* _TI_PRCM_H_ */