diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2017-07-27 13:19:11 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-24 01:27:29 +0100 |
commit | 7b735989dc847289d7e8c234443db0f42129e9f7 (patch) | |
tree | a1051a420d0597f1d7f75912ff7e8dc84daf064a /arch/arm/mach-imx | |
parent | 2128af18ee28a3f9641eb4bd93490b91b8ac2277 (diff) |
busfreq-imx: only use existing global variables
The struct arm_reg and soc_reg are declared in by a extern statement
in include/linux/busfreq-imx.h. However they are only declared when
imx6-cpufreq.c is compiled and linked.
Qualify the use of arm_reg and soc_reg with the relevant config option
and change KConfig to switch that option on for the SoCs which use
it.
This fixes the following build issue when building for i.MX 7 with
option ARM_IMX6Q_CPUFREQ not set:
arch/arm/mach-imx/built-in.o: In function `imx6ull_lower_cpu_rate':
platform-imx-dma.c:(.text+0x5514): undefined reference to `arm_reg'
platform-imx-dma.c:(.text+0x551c): undefined reference to `arm_reg'
platform-imx-dma.c:(.text+0x553c): undefined reference to `soc_reg'
platform-imx-dma.c:(.text+0x5544): undefined reference to `soc_reg'
platform-imx-dma.c:(.text+0x5598): undefined reference to `arm_reg'
platform-imx-dma.c:(.text+0x55a0): undefined reference to `arm_reg'
platform-imx-dma.c:(.text+0x55ac): undefined reference to `soc_reg'
platform-imx-dma.c:(.text+0x55b4): undefined reference to `soc_reg'
platform-imx-dma.c:(.text+0x55c8): undefined reference to `soc_reg'
platform-imx-dma.c:(.text+0x55d0): undefined reference to `soc_reg'
platform-imx-dma.c:(.text+0x55f0): undefined reference to `arm_reg'
platform-imx-dma.c:(.text+0x55f8): undefined reference to `arm_reg'
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
(cherry picked from commit 3f68dc7c600c0354f5df7f06b931661319addafb)
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/busfreq-imx.c | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 34f2c63bcaf2..fe9d25b9c371 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -565,6 +565,7 @@ config SOC_IMX6UL config SOC_IMX6ULL bool "i.MX6 ULL support" select SOC_IMX6UL + select ARM_IMX6Q_CPUFREQ help This enables support for Freescale i.MX6 ULL processor. @@ -613,6 +614,7 @@ config SOC_IMX6SLL select PINCTRL_IMX6SLL select SOC_IMX6 select KEYBOARD_SNVS_PWRKEY + select ARM_IMX6Q_CPUFREQ help This enables support for Freescale i.MX6 SLL processor. diff --git a/arch/arm/mach-imx/busfreq-imx.c b/arch/arm/mach-imx/busfreq-imx.c index 85599763cddd..06270338a581 100644 --- a/arch/arm/mach-imx/busfreq-imx.c +++ b/arch/arm/mach-imx/busfreq-imx.c @@ -66,7 +66,6 @@ static int high_bus_count, med_bus_count, audio_bus_count, low_bus_count; static unsigned int ddr_low_rate; static int cur_bus_freq_mode; static u32 org_arm_rate; -static int origin_arm_volt, origin_soc_volt; extern unsigned long iram_tlb_phys_addr; extern int unsigned long iram_tlb_base_addr; @@ -169,7 +168,10 @@ int unregister_busfreq_notifier(struct notifier_block *nb) } EXPORT_SYMBOL(unregister_busfreq_notifier); +#ifdef CONFIG_ARM_IMX6Q_CPUFREQ + static struct clk *origin_step_parent; +static int origin_arm_volt, origin_soc_volt; /* * on i.MX6ULL, when entering low bus mode, the ARM core @@ -217,6 +219,16 @@ static void imx6ull_lower_cpu_rate(bool enter) clk_set_parent(pll1_bypass_clk, pll1_clk); } } +#else +static void imx6ull_lower_cpu_rate(bool enter) +{ + /* this stub should never be called. + configure with CONFIG_ARM_IMX6Q_CPUFREQ + */ + (void) enter; + BUG(); +} +#endif /* * enter_lpm_imx6_up and exit_lpm_imx6_up is used by |