0001
0002
0003
0004
0005
0006
0007 #ifndef __ASM_ARCH_MXC_H__
0008 #define __ASM_ARCH_MXC_H__
0009
0010 #include <linux/types.h>
0011 #include <soc/imx/cpu.h>
0012
0013 #ifndef __ASM_ARCH_MXC_HARDWARE_H__
0014 #error "Do not include directly."
0015 #endif
0016
0017 #define IMX_DDR_TYPE_LPDDR2 1
0018
0019 #ifndef __ASSEMBLY__
0020
0021 #ifdef CONFIG_SOC_IMX6SL
0022 static inline bool cpu_is_imx6sl(void)
0023 {
0024 return __mxc_cpu_type == MXC_CPU_IMX6SL;
0025 }
0026 #else
0027 static inline bool cpu_is_imx6sl(void)
0028 {
0029 return false;
0030 }
0031 #endif
0032
0033 static inline bool cpu_is_imx6dl(void)
0034 {
0035 return __mxc_cpu_type == MXC_CPU_IMX6DL;
0036 }
0037
0038 static inline bool cpu_is_imx6sx(void)
0039 {
0040 return __mxc_cpu_type == MXC_CPU_IMX6SX;
0041 }
0042
0043 static inline bool cpu_is_imx6ul(void)
0044 {
0045 return __mxc_cpu_type == MXC_CPU_IMX6UL;
0046 }
0047
0048 static inline bool cpu_is_imx6ull(void)
0049 {
0050 return __mxc_cpu_type == MXC_CPU_IMX6ULL;
0051 }
0052
0053 static inline bool cpu_is_imx6ulz(void)
0054 {
0055 return __mxc_cpu_type == MXC_CPU_IMX6ULZ;
0056 }
0057
0058 static inline bool cpu_is_imx6sll(void)
0059 {
0060 return __mxc_cpu_type == MXC_CPU_IMX6SLL;
0061 }
0062
0063 static inline bool cpu_is_imx6q(void)
0064 {
0065 return __mxc_cpu_type == MXC_CPU_IMX6Q;
0066 }
0067
0068 static inline bool cpu_is_imx7d(void)
0069 {
0070 return __mxc_cpu_type == MXC_CPU_IMX7D;
0071 }
0072
0073 struct cpu_op {
0074 u32 cpu_rate;
0075 };
0076
0077 int tzic_enable_wake(void);
0078
0079 extern struct cpu_op *(*get_cpu_op)(int *op);
0080 #endif
0081
0082 #define imx_readl readl_relaxed
0083 #define imx_readw readw_relaxed
0084 #define imx_writel writel_relaxed
0085 #define imx_writew writew_relaxed
0086
0087 #endif