1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright 2004-2007, 2010-2015 Freescale Semiconductor, Inc.
4 * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
7 #ifndef __ASM_ARCH_MXC_H__
8 #define __ASM_ARCH_MXC_H__
10 #include <linux/types.h>
11 #include <soc/imx/cpu.h>
13 #ifndef __ASM_ARCH_MXC_HARDWARE_H__
14 #error "Do not include directly."
17 #define IMX_DDR_TYPE_LPDDR2 1
21 #ifdef CONFIG_SOC_IMX6SL
22 static inline bool cpu_is_imx6sl(void)
24 return __mxc_cpu_type
== MXC_CPU_IMX6SL
;
27 static inline bool cpu_is_imx6sl(void)
33 static inline bool cpu_is_imx6dl(void)
35 return __mxc_cpu_type
== MXC_CPU_IMX6DL
;
38 static inline bool cpu_is_imx6sx(void)
40 return __mxc_cpu_type
== MXC_CPU_IMX6SX
;
43 static inline bool cpu_is_imx6ul(void)
45 return __mxc_cpu_type
== MXC_CPU_IMX6UL
;
48 static inline bool cpu_is_imx6ull(void)
50 return __mxc_cpu_type
== MXC_CPU_IMX6ULL
;
53 static inline bool cpu_is_imx6ulz(void)
55 return __mxc_cpu_type
== MXC_CPU_IMX6ULZ
;
58 static inline bool cpu_is_imx6sll(void)
60 return __mxc_cpu_type
== MXC_CPU_IMX6SLL
;
63 static inline bool cpu_is_imx6q(void)
65 return __mxc_cpu_type
== MXC_CPU_IMX6Q
;
68 static inline bool cpu_is_imx7d(void)
70 return __mxc_cpu_type
== MXC_CPU_IMX7D
;
77 int tzic_enable_wake(void);
79 extern struct cpu_op
*(*get_cpu_op
)(int *op
);
82 #define imx_readl readl_relaxed
83 #define imx_readw readw_relaxed
84 #define imx_writel writel_relaxed
85 #define imx_writew writew_relaxed
87 #endif /* __ASM_ARCH_MXC_H__ */