1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * (C) Copyright 2011 4 * Stefano Babic, DENX Software Engineering, sbabic@denx.de. 5 */ 6 7 #ifndef __ASM_ARCH_CLOCK_H 8 #define __ASM_ARCH_CLOCK_H 9 10 #include <common.h> 11 12 #ifdef CONFIG_MX35_HCLK_FREQ 13 #define MXC_HCLK CONFIG_MX35_HCLK_FREQ 14 #else 15 #define MXC_HCLK 24000000 16 #endif 17 18 #ifdef CONFIG_MX35_CLK32 19 #define MXC_CLK32 CONFIG_MX35_CLK32 20 #else 21 #define MXC_CLK32 32768 22 #endif 23 24 enum mxc_clock { 25 MXC_ARM_CLK, 26 MXC_AHB_CLK, 27 MXC_IPG_CLK, 28 MXC_IPG_PERCLK, 29 MXC_UART_CLK, 30 MXC_ESDHC1_CLK, 31 MXC_ESDHC2_CLK, 32 MXC_ESDHC3_CLK, 33 MXC_USB_CLK, 34 MXC_CSPI_CLK, 35 MXC_FEC_CLK, 36 MXC_I2C_CLK, 37 }; 38 39 enum mxc_main_clock { 40 CPU_CLK, 41 AHB_CLK, 42 IPG_CLK, 43 IPG_PER_CLK, 44 NFC_CLK, 45 USB_CLK, 46 HSP_CLK, 47 }; 48 49 enum mxc_peri_clock { 50 UART1_BAUD, 51 UART2_BAUD, 52 UART3_BAUD, 53 SSI1_BAUD, 54 SSI2_BAUD, 55 CSI_BAUD, 56 MSHC_CLK, 57 ESDHC1_CLK, 58 ESDHC2_CLK, 59 ESDHC3_CLK, 60 SPDIF_CLK, 61 SPI1_CLK, 62 SPI2_CLK, 63 }; 64 65 u32 imx_get_uartclk(void); 66 u32 imx_get_fecclk(void); 67 unsigned int mxc_get_clock(enum mxc_clock clk); 68 69 #endif /* __ASM_ARCH_CLOCK_H */ 70