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