Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Sascha Hauer | 1a7676f | 2008-03-26 20:40:42 +0100 | [diff] [blame] | 2 | /* |
| 3 | * |
| 4 | * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> |
Sascha Hauer | 1a7676f | 2008-03-26 20:40:42 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
Stefano Babic | 78129d9 | 2011-03-14 15:43:56 +0100 | [diff] [blame] | 7 | #ifndef __ASM_ARCH_CLOCK_H |
| 8 | #define __ASM_ARCH_CLOCK_H |
Sascha Hauer | 1a7676f | 2008-03-26 20:40:42 +0100 | [diff] [blame] | 9 | |
Benoît Thébaudeau | 38e2f08 | 2012-08-21 11:06:03 +0000 | [diff] [blame] | 10 | #include <common.h> |
| 11 | |
Benoît Thébaudeau | 38e2f08 | 2012-08-21 11:06:03 +0000 | [diff] [blame] | 12 | #define MXC_HCLK CONFIG_MX31_HCLK_FREQ |
Benoît Thébaudeau | 38e2f08 | 2012-08-21 11:06:03 +0000 | [diff] [blame] | 13 | |
Benoît Thébaudeau | 38e2f08 | 2012-08-21 11:06:03 +0000 | [diff] [blame] | 14 | #define MXC_CLK32 CONFIG_MX31_CLK32 |
Benoît Thébaudeau | 38e2f08 | 2012-08-21 11:06:03 +0000 | [diff] [blame] | 15 | |
Stefano Babic | 43dc3f0 | 2011-07-13 14:34:52 +0200 | [diff] [blame] | 16 | enum mxc_clock { |
| 17 | MXC_ARM_CLK, |
| 18 | MXC_IPG_CLK, |
Stefano Babic | 2def40f | 2011-08-30 00:51:13 +0000 | [diff] [blame] | 19 | MXC_IPG_PERCLK, |
Stefano Babic | 43dc3f0 | 2011-07-13 14:34:52 +0200 | [diff] [blame] | 20 | MXC_CSPI_CLK, |
| 21 | MXC_UART_CLK, |
Helmut Raiger | 64c316d | 2012-01-11 03:59:22 +0000 | [diff] [blame] | 22 | MXC_IPU_CLK, |
| 23 | MXC_ESDHC_CLK, |
Matthias Weisser | 99ba342 | 2012-09-24 02:46:53 +0000 | [diff] [blame] | 24 | MXC_I2C_CLK, |
Stefano Babic | 43dc3f0 | 2011-07-13 14:34:52 +0200 | [diff] [blame] | 25 | }; |
| 26 | |
| 27 | unsigned int mxc_get_clock(enum mxc_clock clk); |
Stefano Babic | 7f9e79c | 2011-07-28 19:28:13 +0200 | [diff] [blame] | 28 | extern u32 imx_get_uartclk(void); |
Guennadi Liakhovetski | 08601a6 | 2008-05-08 10:09:27 +0200 | [diff] [blame] | 29 | extern void mx31_gpio_mux(unsigned long mode); |
Stefano Babic | 5f09b92 | 2010-10-19 20:19:13 +0200 | [diff] [blame] | 30 | extern void mx31_set_pad(enum iomux_pins pin, u32 config); |
Fabio Estevam | 87db8c9 | 2011-10-20 16:01:29 +0000 | [diff] [blame] | 31 | extern void mx31_set_gpr(enum iomux_gp_func gp, char en); |
Sascha Hauer | 1a7676f | 2008-03-26 20:40:42 +0100 | [diff] [blame] | 32 | |
Magnus Lilja | 1763531 | 2009-06-13 20:50:03 +0200 | [diff] [blame] | 33 | void mx31_uart1_hw_init(void); |
Helmut Raiger | 1f2850f | 2011-10-27 01:31:13 +0000 | [diff] [blame] | 34 | void mx31_uart2_hw_init(void); |
Magnus Lilja | 1763531 | 2009-06-13 20:50:03 +0200 | [diff] [blame] | 35 | void mx31_spi2_hw_init(void); |
| 36 | |
Stefano Babic | 78129d9 | 2011-03-14 15:43:56 +0100 | [diff] [blame] | 37 | #endif /* __ASM_ARCH_CLOCK_H */ |