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