blob: aafc2d690efa96c73a09423b93865c785bf6228d [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#include <common.h>
11
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000012#define MXC_HCLK CONFIG_MX31_HCLK_FREQ
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000013
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000014#define MXC_CLK32 CONFIG_MX31_CLK32
Benoît Thébaudeau38e2f082012-08-21 11:06:03 +000015
Stefano Babic43dc3f02011-07-13 14:34:52 +020016enum mxc_clock {
17 MXC_ARM_CLK,
18 MXC_IPG_CLK,
Stefano Babic2def40f2011-08-30 00:51:13 +000019 MXC_IPG_PERCLK,
Stefano Babic43dc3f02011-07-13 14:34:52 +020020 MXC_CSPI_CLK,
21 MXC_UART_CLK,
Helmut Raiger64c316d2012-01-11 03:59:22 +000022 MXC_IPU_CLK,
23 MXC_ESDHC_CLK,
Matthias Weisser99ba3422012-09-24 02:46:53 +000024 MXC_I2C_CLK,
Stefano Babic43dc3f02011-07-13 14:34:52 +020025};
26
27unsigned int mxc_get_clock(enum mxc_clock clk);
Stefano Babic7f9e79c2011-07-28 19:28:13 +020028extern u32 imx_get_uartclk(void);
Guennadi Liakhovetski08601a62008-05-08 10:09:27 +020029extern void mx31_gpio_mux(unsigned long mode);
Stefano Babic5f09b922010-10-19 20:19:13 +020030extern void mx31_set_pad(enum iomux_pins pin, u32 config);
Fabio Estevam87db8c92011-10-20 16:01:29 +000031extern void mx31_set_gpr(enum iomux_gp_func gp, char en);
Sascha Hauer1a7676f2008-03-26 20:40:42 +010032
Magnus Lilja17635312009-06-13 20:50:03 +020033void mx31_uart1_hw_init(void);
Helmut Raiger1f2850f2011-10-27 01:31:13 +000034void mx31_uart2_hw_init(void);
Magnus Lilja17635312009-06-13 20:50:03 +020035void mx31_spi2_hw_init(void);
36
Stefano Babic78129d92011-03-14 15:43:56 +010037#endif /* __ASM_ARCH_CLOCK_H */