blob: e99e115f79e789d7bd8c5c6451392dc661c4f072 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Sascha Hauer1a7676f2008-03-26 20:40:42 +01002/*
3 *
4 * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer1a7676f2008-03-26 20:40:42 +01005 */
6
Stefano Babic78129d92011-03-14 15:43:56 +01007#ifndef __ASM_ARCH_CLOCK_H
8#define __ASM_ARCH_CLOCK_H
Sascha Hauer1a7676f2008-03-26 20:40:42 +01009
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000010#define MXC_HCLK CONFIG_MX31_HCLK_FREQ
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000011
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000012#define MXC_CLK32 CONFIG_MX31_CLK32
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000013
Stefano Babic43dc3f02011-07-13 14:34:52 +020014enum mxc_clock {
15 MXC_ARM_CLK,
16 MXC_IPG_CLK,
Stefano Babic2def40f2011-08-30 00:51:13 +000017 MXC_IPG_PERCLK,
Stefano Babic43dc3f02011-07-13 14:34:52 +020018 MXC_CSPI_CLK,
19 MXC_UART_CLK,
Helmut Raiger64c316d2012-01-11 03:59:22 +000020 MXC_IPU_CLK,
21 MXC_ESDHC_CLK,
Matthias Weisser99ba3422012-09-24 02:46:53 +000022 MXC_I2C_CLK,
Stefano Babic43dc3f02011-07-13 14:34:52 +020023};
24
25unsigned int mxc_get_clock(enum mxc_clock clk);
Stefano Babic7f9e79c2011-07-28 19:28:13 +020026extern u32 imx_get_uartclk(void);
Guennadi Liakhovetski08601a62008-05-08 10:09:27 +020027extern void mx31_gpio_mux(unsigned long mode);
Stefano Babic5f09b922010-10-19 20:19:13 +020028extern void mx31_set_pad(enum iomux_pins pin, u32 config);
Fabio Estevam87db8c92011-10-20 16:01:29 +000029extern void mx31_set_gpr(enum iomux_gp_func gp, char en);
Sascha Hauer1a7676f2008-03-26 20:40:42 +010030
Magnus Lilja17635312009-06-13 20:50:03 +020031void mx31_uart1_hw_init(void);
Helmut Raiger1f2850f2011-10-27 01:31:13 +000032void mx31_uart2_hw_init(void);
Magnus Lilja17635312009-06-13 20:50:03 +020033void mx31_spi2_hw_init(void);
34
Stefano Babic78129d92011-03-14 15:43:56 +010035#endif /* __ASM_ARCH_CLOCK_H */