1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  *
4  * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
5  */
6 
7 #ifndef __ASM_ARCH_CLOCK_H
8 #define __ASM_ARCH_CLOCK_H
9 
10 #include <common.h>
11 
12 #define MXC_HCLK	CONFIG_MX31_HCLK_FREQ
13 
14 #define MXC_CLK32	CONFIG_MX31_CLK32
15 
16 enum mxc_clock {
17 	MXC_ARM_CLK,
18 	MXC_IPG_CLK,
19 	MXC_IPG_PERCLK,
20 	MXC_CSPI_CLK,
21 	MXC_UART_CLK,
22 	MXC_IPU_CLK,
23 	MXC_ESDHC_CLK,
24 	MXC_I2C_CLK,
25 };
26 
27 unsigned int mxc_get_clock(enum mxc_clock clk);
28 extern u32 imx_get_uartclk(void);
29 extern void mx31_gpio_mux(unsigned long mode);
30 extern void mx31_set_pad(enum iomux_pins pin, u32 config);
31 extern void mx31_set_gpr(enum iomux_gp_func gp, char en);
32 
33 void mx31_uart1_hw_init(void);
34 void mx31_uart2_hw_init(void);
35 void mx31_spi2_hw_init(void);
36 
37 #endif /* __ASM_ARCH_CLOCK_H */
38