Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / mach-imx / mxc.h
blobfe2d0f5abfcc245d7cbf7d8611ff549894863276
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Copyright 2004-2007, 2010-2015 Freescale Semiconductor, Inc.
4 * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
5 */
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."
15 #endif
17 #define IMX_DDR_TYPE_LPDDR2 1
19 #ifndef __ASSEMBLY__
21 #ifdef CONFIG_SOC_IMX6SL
22 static inline bool cpu_is_imx6sl(void)
24 return __mxc_cpu_type == MXC_CPU_IMX6SL;
26 #else
27 static inline bool cpu_is_imx6sl(void)
29 return false;
31 #endif
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;
73 struct cpu_op {
74 u32 cpu_rate;
77 int tzic_enable_wake(void);
79 extern struct cpu_op *(*get_cpu_op)(int *op);
80 #endif
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__ */