Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Peng Fan | 684ccd9 | 2017-02-22 16:21:42 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. |
Peng Fan | 684ccd9 | 2017-02-22 16:21:42 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _ASM_ARCH_CLOCK_H |
| 7 | #define _ASM_ARCH_CLOCK_H |
| 8 | |
Peng Fan | 684ccd9 | 2017-02-22 16:21:42 +0800 | [diff] [blame] | 9 | #include <asm/arch/pcc.h> |
| 10 | #include <asm/arch/scg.h> |
| 11 | |
| 12 | /* Mainly for compatible to imx common code. */ |
| 13 | enum mxc_clock { |
| 14 | MXC_ARM_CLK = 0, |
| 15 | MXC_AHB_CLK, |
| 16 | MXC_IPG_CLK, |
| 17 | MXC_UART_CLK, |
| 18 | MXC_CSPI_CLK, |
| 19 | MXC_AXI_CLK, |
| 20 | MXC_DDR_CLK, |
| 21 | MXC_ESDHC_CLK, |
| 22 | MXC_ESDHC2_CLK, |
| 23 | MXC_I2C_CLK, |
| 24 | }; |
| 25 | |
| 26 | u32 mxc_get_clock(enum mxc_clock clk); |
| 27 | u32 get_lpuart_clk(void); |
Ye Li | 3edefd5 | 2019-07-22 01:24:53 +0000 | [diff] [blame] | 28 | #ifdef CONFIG_SYS_I2C_IMX_LPI2C |
Ye Li | b7f9c3e | 2017-02-22 16:21:44 +0800 | [diff] [blame] | 29 | int enable_i2c_clk(unsigned char enable, unsigned i2c_num); |
| 30 | u32 imx_get_i2cclk(unsigned i2c_num); |
| 31 | #endif |
Peng Fan | 684ccd9 | 2017-02-22 16:21:42 +0800 | [diff] [blame] | 32 | #ifdef CONFIG_MXC_OCOTP |
| 33 | void enable_ocotp_clk(unsigned char enable); |
| 34 | #endif |
Tom Rini | ceed5d2 | 2017-05-12 22:33:27 -0400 | [diff] [blame] | 35 | #ifdef CONFIG_USB_EHCI_HCD |
Peng Fan | 684ccd9 | 2017-02-22 16:21:42 +0800 | [diff] [blame] | 36 | void enable_usboh3_clk(unsigned char enable); |
| 37 | #endif |
| 38 | void init_clk_usdhc(u32 index); |
| 39 | void clock_init(void); |
Peng Fan | a26ba6d | 2017-02-22 16:21:53 +0800 | [diff] [blame] | 40 | void hab_caam_clock_enable(unsigned char enable); |
Peng Fan | 684ccd9 | 2017-02-22 16:21:42 +0800 | [diff] [blame] | 41 | #endif |