]> code.ossystems Code Review - meta-freescale.git/blob
0743099f61fe4eceabc86f14db91dae76f79f18d
[meta-freescale.git] /
1 From 8340ad4ab71b568e65dfd1b92cc0967152887f97 Mon Sep 17 00:00:00 2001
2 From: Nikolay Dimitrov <picmaster@mail.bg>
3 Date: Sun, 8 Feb 2015 22:18:09 +0200
4 Subject: [PATCH 3/3] ARM: imx6sl: Disable imx6sl-specific code when imx6sl SOC
5  support is disabled
6
7 Currently the build fails when CONFIG_SOC_IMX6SL is disabled, due to some
8 hard-coded stuff. The patch purpose is to handle enabling/disabling this
9 config option.
10
11 Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
12 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
13
14 Upstream-Status: Pending
15
16 ---
17  arch/arm/mach-imx/Makefile | 3 ++-
18  arch/arm/mach-imx/mxc.h    | 4 ++++
19  2 files changed, 6 insertions(+), 1 deletion(-)
20
21 diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
22 index b76a214..27f1976 100644
23 --- a/arch/arm/mach-imx/Makefile
24 +++ b/arch/arm/mach-imx/Makefile
25 @@ -122,7 +122,8 @@ obj-$(CONFIG_SOC_IMX6SL) += busfreq_lpddr2.o lpddr2_freq_imx6.o imx6sl_lpm_wfi.o
26  AFLAGS_lpddr2_freq_imx6sx.o :=-Wa,-march=armv7-a
27  AFLAGS_ddr3_freq_imx6sx.o :=-Wa,-march=armv7-a
28  AFLAGS_imx6sx_low_power_idle.o :=-Wa,-march=armv7-a
29 -obj-$(CONFIG_SOC_IMX6SX) += ddr3_freq_imx6sx.o lpddr2_freq_imx6sx.o imx6sx_low_power_idle.o
30 +obj-$(CONFIG_SOC_IMX6SX) += ddr3_freq_imx6sx.o lpddr2_freq_imx6sx.o imx6sx_low_power_idle.o \
31 +       busfreq_lpddr2.o lpddr2_freq_imx6.o
32  endif
33  
34  
35 diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h
36 index 1510769..e6af4dd 100644
37 --- a/arch/arm/mach-imx/mxc.h
38 +++ b/arch/arm/mach-imx/mxc.h
39 @@ -158,10 +158,14 @@ extern unsigned int __mxc_cpu_type;
40  #endif
41  
42  #ifndef __ASSEMBLY__
43 +#ifdef CONFIG_SOC_IMX6SL
44  static inline bool cpu_is_imx6sl(void)
45  {
46         return __mxc_cpu_type == MXC_CPU_IMX6SL;
47  }
48 +#else
49 +# define cpu_is_imx6sl() (0)
50 +#endif
51  
52  static inline bool cpu_is_imx6dl(void)
53  {
54 -- 
55 2.1.4
56