xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-mx5/clock.h (revision 5d2947a3fc8d130cfa39fccdefb87082abbf0e9b)
1ff9f475dSJason Liu /*
2ff9f475dSJason Liu  * (C) Copyright 2009
3ff9f475dSJason Liu  * Stefano Babic, DENX Software Engineering, sbabic@denx.de.
4ff9f475dSJason Liu  *
5ff9f475dSJason Liu  * See file CREDITS for list of people who contributed to this
6ff9f475dSJason Liu  * project.
7ff9f475dSJason Liu  *
8ff9f475dSJason Liu  * This program is free software; you can redistribute it and/or
9ff9f475dSJason Liu  * modify it under the terms of the GNU General Public License as
10ff9f475dSJason Liu  * published by the Free Software Foundation; either version 2 of
11ff9f475dSJason Liu  * the License, or (at your option) any later version.
12ff9f475dSJason Liu  *
13ff9f475dSJason Liu  * This program is distributed in the hope that it will be useful,
14ff9f475dSJason Liu  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15ff9f475dSJason Liu  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16ff9f475dSJason Liu  * GNU General Public License for more details.
17ff9f475dSJason Liu  *
18ff9f475dSJason Liu  * You should have received a copy of the GNU General Public License
19ff9f475dSJason Liu  * along with this program; if not, write to the Free Software
20ff9f475dSJason Liu  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21ff9f475dSJason Liu  * MA 02111-1307 USA
22ff9f475dSJason Liu  */
23ff9f475dSJason Liu 
24ff9f475dSJason Liu #ifndef __ASM_ARCH_CLOCK_H
25ff9f475dSJason Liu #define __ASM_ARCH_CLOCK_H
26ff9f475dSJason Liu 
27ff9f475dSJason Liu enum mxc_clock {
28ff9f475dSJason Liu 	MXC_ARM_CLK = 0,
29ff9f475dSJason Liu 	MXC_AHB_CLK,
30ff9f475dSJason Liu 	MXC_IPG_CLK,
31ff9f475dSJason Liu 	MXC_IPG_PERCLK,
32ff9f475dSJason Liu 	MXC_UART_CLK,
33ff9f475dSJason Liu 	MXC_CSPI_CLK,
34ff9f475dSJason Liu 	MXC_FEC_CLK,
35ff9f475dSJason Liu };
36ff9f475dSJason Liu 
37ff9f475dSJason Liu unsigned int imx_decode_pll(unsigned int pll, unsigned int f_ref);
38ff9f475dSJason Liu 
39ff9f475dSJason Liu u32 imx_get_uartclk(void);
40ff9f475dSJason Liu u32 imx_get_fecclk(void);
41ff9f475dSJason Liu unsigned int mxc_get_clock(enum mxc_clock clk);
42ff9f475dSJason Liu 
43*5d2947a3SWolfgang Grandegger void set_usb_phy2_clk(void);
44*5d2947a3SWolfgang Grandegger void enable_usb_phy2_clk(unsigned char enable);
45*5d2947a3SWolfgang Grandegger void set_usboh3_clk(void);
46*5d2947a3SWolfgang Grandegger void enable_usboh3_clk(unsigned char enable);
47*5d2947a3SWolfgang Grandegger 
48ff9f475dSJason Liu #endif /* __ASM_ARCH_CLOCK_H */
49