1 /* 2 * Copyright (C) 2016 Freescale Semiconductor, Inc. 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef _ASM_ARCH_CLOCK_H 8 #define _ASM_ARCH_CLOCK_H 9 10 #include <common.h> 11 #include <asm/arch/pcc.h> 12 #include <asm/arch/scg.h> 13 14 /* Mainly for compatible to imx common code. */ 15 enum mxc_clock { 16 MXC_ARM_CLK = 0, 17 MXC_AHB_CLK, 18 MXC_IPG_CLK, 19 MXC_UART_CLK, 20 MXC_CSPI_CLK, 21 MXC_AXI_CLK, 22 MXC_DDR_CLK, 23 MXC_ESDHC_CLK, 24 MXC_ESDHC2_CLK, 25 MXC_I2C_CLK, 26 }; 27 28 u32 mxc_get_clock(enum mxc_clock clk); 29 u32 get_lpuart_clk(void); 30 #ifdef CONFIG_SYS_LPI2C_IMX 31 int enable_i2c_clk(unsigned char enable, unsigned i2c_num); 32 u32 imx_get_i2cclk(unsigned i2c_num); 33 #endif 34 #ifdef CONFIG_MXC_OCOTP 35 void enable_ocotp_clk(unsigned char enable); 36 #endif 37 #ifdef CONFIG_USB_EHCI_HCD 38 void enable_usboh3_clk(unsigned char enable); 39 #endif 40 void init_clk_usdhc(u32 index); 41 void clock_init(void); 42 void hab_caam_clock_enable(unsigned char enable); 43 #endif 44