2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2011-01-20 07:49:52 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2011
|
|
|
|
* Stefano Babic, DENX Software Engineering, sbabic@denx.de.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_ARCH_CLOCK_H
|
|
|
|
#define __ASM_ARCH_CLOCK_H
|
|
|
|
|
2012-08-21 11:07:20 +00:00
|
|
|
#include <common.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_MX35_HCLK_FREQ
|
|
|
|
#define MXC_HCLK CONFIG_MX35_HCLK_FREQ
|
|
|
|
#else
|
|
|
|
#define MXC_HCLK 24000000
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_MX35_CLK32
|
|
|
|
#define MXC_CLK32 CONFIG_MX35_CLK32
|
|
|
|
#else
|
|
|
|
#define MXC_CLK32 32768
|
|
|
|
#endif
|
|
|
|
|
2011-01-20 07:49:52 +00:00
|
|
|
enum mxc_clock {
|
2012-08-14 10:32:21 +00:00
|
|
|
MXC_ARM_CLK,
|
2011-01-20 07:49:52 +00:00
|
|
|
MXC_AHB_CLK,
|
|
|
|
MXC_IPG_CLK,
|
|
|
|
MXC_IPG_PERCLK,
|
|
|
|
MXC_UART_CLK,
|
2012-09-27 10:26:02 +00:00
|
|
|
MXC_ESDHC1_CLK,
|
|
|
|
MXC_ESDHC2_CLK,
|
|
|
|
MXC_ESDHC3_CLK,
|
2011-01-20 07:49:52 +00:00
|
|
|
MXC_USB_CLK,
|
|
|
|
MXC_CSPI_CLK,
|
|
|
|
MXC_FEC_CLK,
|
2012-09-24 02:46:53 +00:00
|
|
|
MXC_I2C_CLK,
|
2011-01-20 07:49:52 +00:00
|
|
|
};
|
|
|
|
|
2012-08-14 10:32:21 +00:00
|
|
|
enum mxc_main_clock {
|
|
|
|
CPU_CLK,
|
|
|
|
AHB_CLK,
|
|
|
|
IPG_CLK,
|
|
|
|
IPG_PER_CLK,
|
|
|
|
NFC_CLK,
|
|
|
|
USB_CLK,
|
|
|
|
HSP_CLK,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum mxc_peri_clock {
|
|
|
|
UART1_BAUD,
|
|
|
|
UART2_BAUD,
|
|
|
|
UART3_BAUD,
|
|
|
|
SSI1_BAUD,
|
|
|
|
SSI2_BAUD,
|
|
|
|
CSI_BAUD,
|
|
|
|
MSHC_CLK,
|
|
|
|
ESDHC1_CLK,
|
|
|
|
ESDHC2_CLK,
|
|
|
|
ESDHC3_CLK,
|
|
|
|
SPDIF_CLK,
|
|
|
|
SPI1_CLK,
|
|
|
|
SPI2_CLK,
|
|
|
|
};
|
|
|
|
|
2011-01-20 07:49:52 +00:00
|
|
|
u32 imx_get_uartclk(void);
|
|
|
|
u32 imx_get_fecclk(void);
|
|
|
|
unsigned int mxc_get_clock(enum mxc_clock clk);
|
|
|
|
|
|
|
|
#endif /* __ASM_ARCH_CLOCK_H */
|