From eb6fca85abeaa62225e9cbcd738f87d1b4d58f34 Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Mon, 5 Aug 2013 11:40:21 -0400 Subject: [PATCH] ENGR00273512-1 ARM: imx: Add i.mx6sl cpu type check Add i.mx6sl cpu type check and i.mx6 series SOC check. Signed-off-by: Anson Huang --- arch/arm/mach-imx/mach-imx6sl.c | 2 ++ arch/arm/mach-imx/mxc.h | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index b6ecd792cf17..be5249adb37d 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c @@ -15,6 +15,7 @@ #include #include "common.h" +#include "hardware.h" static void __init imx6sl_init_machine(void) { @@ -25,6 +26,7 @@ static void __init imx6sl_init_machine(void) static void __init imx6sl_init_irq(void) { + mxc_set_cpu_type(MXC_CPU_IMX6SL); imx_init_l2cache(); imx_src_init(); imx_gpc_init(); diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h index 8629e5be7ecd..ab2b91c31b62 100644 --- a/arch/arm/mach-imx/mxc.h +++ b/arch/arm/mach-imx/mxc.h @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007, 2010 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2004-2007, 2010, 2013 Freescale Semiconductor, Inc. All Rights Reserved. * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de) * * This program is free software; you can redistribute it and/or @@ -34,6 +34,7 @@ #define MXC_CPU_MX35 35 #define MXC_CPU_MX51 51 #define MXC_CPU_MX53 53 +#define MXC_CPU_IMX6SL 0x60 #define MXC_CPU_IMX6DL 0x61 #define MXC_CPU_IMX6Q 0x63 @@ -152,6 +153,11 @@ extern unsigned int __mxc_cpu_type; #endif #ifndef __ASSEMBLY__ +static inline bool cpu_is_imx6sl(void) +{ + return __mxc_cpu_type == MXC_CPU_IMX6SL; +} + static inline bool cpu_is_imx6dl(void) { return __mxc_cpu_type == MXC_CPU_IMX6DL; @@ -171,6 +177,7 @@ int tzic_enable_wake(void); extern struct cpu_op *(*get_cpu_op)(int *op); #endif +#define cpu_is_imx6() (cpu_is_imx6q() || cpu_is_imx6dl() || cpu_is_imx6sl()) #define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35()) #define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx27()) -- 2.39.5