blob: 6424fafe146eaf2abefb62014435ea3daca7789f [file] [log] [blame]
Peng Fan684ccd92017-02-22 16:21:42 +08001/*
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. */
15enum 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
28u32 mxc_get_clock(enum mxc_clock clk);
29u32 get_lpuart_clk(void);
Ye Lib7f9c3e2017-02-22 16:21:44 +080030#ifdef CONFIG_SYS_LPI2C_IMX
31int enable_i2c_clk(unsigned char enable, unsigned i2c_num);
32u32 imx_get_i2cclk(unsigned i2c_num);
33#endif
Peng Fan684ccd92017-02-22 16:21:42 +080034#ifdef CONFIG_MXC_OCOTP
35void enable_ocotp_clk(unsigned char enable);
36#endif
Tom Riniceed5d22017-05-12 22:33:27 -040037#ifdef CONFIG_USB_EHCI_HCD
Peng Fan684ccd92017-02-22 16:21:42 +080038void enable_usboh3_clk(unsigned char enable);
39#endif
40void init_clk_usdhc(u32 index);
41void clock_init(void);
Peng Fana26ba6d2017-02-22 16:21:53 +080042void hab_caam_clock_enable(unsigned char enable);
Peng Fan684ccd92017-02-22 16:21:42 +080043#endif