Fix cpufreq
Subsystems (5)
PATCH 1/1 Fix cpufreq
OMAPs cpufreq requires the frequency table support, but nothing ensures that this is selected. This can result in configurations which fail to build:
drivers/built-in.o:(.data+0x5238): undefined reference to cpufreq_freq_attr_scaling_available_freqs' drivers/cpufreq/omap-cpufreq.c:88: undefined reference to cpufreq_frequency_table_target' drivers/cpufreq/omap-cpufreq.c:60: undefined reference to cpufreq_frequency_table_verify' drivers/cpufreq/omap-cpufreq.c:186: undefined reference to cpufreq_frequency_table_cpuinfo' drivers/cpufreq/omap-cpufreq.c:190: undefined reference to `cpufreq_frequency_table_get_attr'
Fix this by introducing a new configuration variable and having that select CPU_FREQ_TABLE.
--- arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 2 +- arch/arm/mach-omap2/clock.c | 2 +- arch/arm/mach-omap2/clock.h | 2 +- arch/arm/plat-omap/clock.c | 2 +- arch/arm/plat-omap/include/plat/clock.h | 4 ++-- drivers/cpufreq/Kconfig.arm | 5 +++++ drivers/cpufreq/Makefile | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +1 -1
@@ -165,7 +165,7 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)return 0 ; } -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ /* * Walk PRCM rate table and fillout cpufreq freq_table * XXX This should be replaced by an OPP layer in the near future
arch/arm/mach-omap2/clock.c +1 -1
@@ -536,7 +536,7 @@ struct clk_functions omap2_clk_functions = { .clk_set_rate = omap2_clk_set_rate, .clk_set_parent = omap2_clk_set_parent, .clk_disable_unused = omap2_clk_disable_unused, -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ/* These will be removed when the OPP code is integrated */ .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table, .clk_exit_cpufreq_table = omap2_clk_exit_cpufreq_table,
arch/arm/mach-omap2/clock.h +1 -1
@@ -146,7 +146,7 @@ extern const struct clksel_rate gpt_sys_rates[];extern const struct clksel_rate gfx_l3_rates[];extern const struct clksel_rate dsp_ick_rates[]; -#if defined(CONFIG_ARCH_OMAP2 ) && defined(CONFIG_CPU_FREQ ) +#if defined(CONFIG_ARCH_OMAP2 ) && defined(CONFIG_ARM_OMAP2PLUS_CPUFREQ )extern void omap2_clk_init_cpufreq_table (struct cpufreq_frequency_table **table);extern void omap2_clk_exit_cpufreq_table (struct cpufreq_frequency_table **table);#else
arch/arm/plat-omap/clock.c +1 -1
@@ -399,7 +399,7 @@ struct clk dummy_ck = { .ops = &clkops_null, }; -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ void clk_init_cpufreq_table (struct cpufreq_frequency_table **table) {unsigned long flags;
arch/arm/plat-omap/include/plat/clock.h +2 -2
@@ -283,7 +283,7 @@ struct clk_functions {void (*clk_allow_idle)(struct clk *clk);void (*clk_deny_idle)(struct clk *clk);void (*clk_disable_unused)(struct clk *clk); -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **);void (*clk_exit_cpufreq_table)(struct cpufreq_frequency_table **);#endif
@@ -301,7 +301,7 @@ extern void recalculate_root_clocks(void);extern unsigned long followparent_recalc (struct clk *clk);extern void clk_enable_init_clocks (void );unsigned long omap_fixed_divisor_recalc (struct clk *clk); -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ extern void clk_init_cpufreq_table (struct cpufreq_frequency_table **table);extern void clk_exit_cpufreq_table (struct cpufreq_frequency_table **table);#endif
drivers/cpufreq/Kconfig.arm +5 -0
@@ -2,6 +2,11 @@ # ARM CPU Frequency scaling drivers # +config ARM_OMAP2PLUS_CPUFREQ + bool + depends on ARCH_OMAP2PLUS + select CPU_FREQ_TABLE + config ARM_S3C64XX_CPUFREQ bool "Samsung S3C64XX" depends on CPU_S3C6410
drivers/cpufreq/Makefile +1 -1
@@ -44,7 +44,7 @@ obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += exynos-cpufreq.o obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o -obj-$(CONFIG_ARCH_OMAP2PLUS) += omap-cpufreq.o +obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o ################################################################################## # PowerPC platform drivers
Quoted 10 lines · Russell King - ARM Linux
OMAPs cpufreq requires the frequency table support, but nothing ensures that this is selected. This can result in configurations which fail to build:
drivers/built-in.o:(.data+0x5238): undefined reference to
cpufreq_freq_attr_scaling_available_freqs' drivers/cpufreq/omap-cpufreq.c:88: undefined reference tocpufreq_frequency_table_target'drivers/cpufreq/omap-cpufreq.c:60: undefined reference tocpufreq_frequency_table_verify' drivers/cpufreq/omap-cpufreq.c:186: undefined reference tocpufreq_frequency_table_cpuinfo'drivers/cpufreq/omap-cpufreq.c:190: undefined reference to `cpufreq_frequency_table_get_attr'
Quoted 4 lines
Fix this by introducing a new configuration variable and having that select
CPU_FREQ_TABLE.Signed-off-by Russell King <[email protected]>
Actually, we don't use cpufreq_table directly anymore in OMAP core code, and I've removed most of it:
http://marc.info/?l=linux-omap&m=132796096628835&w=2
but looks like I missed the plat-omap/* stuff. I'll update that patch.
The OMAP cpufreq driver uses the OPP layer now to fill up the cpufreq table, but it seems the OPP layer has the same dependency problem: it depends on CONFIG_CPU_FREQ, but not CONFIG_CPU_FREQ_TABLE.
I'll send a patch for that as well.
Kevin
Quoted 118 lines
--- arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c | 2 +- arch/arm/mach-omap2/clock.c | 2 +- arch/arm/mach-omap2/clock.h | 2 +- arch/arm/plat-omap/clock.c | 2 +- arch/arm/plat-omap/include/plat/clock.h | 4 ++-- drivers/cpufreq/Kconfig.arm | 5 +++++ drivers/cpufreq/Makefile | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-)arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c +1
-1@@ -165,7 +165,7 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)return 0 ; } -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ /* * Walk PRCM rate table and fillout cpufreq freq_table * XXX This should be replaced by an OPP layer in the near future arch/arm/mach-omap2/clock.c +1
-1@@ -536,7 +536,7 @@ struct clk_functions omap2_clk_functions = { .clk_set_rate = omap2_clk_set_rate, .clk_set_parent = omap2_clk_set_parent, .clk_disable_unused = omap2_clk_disable_unused, -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ/* These will be removed when the OPP code is integrated */ .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table, .clk_exit_cpufreq_table = omap2_clk_exit_cpufreq_table,arch/arm/mach-omap2/clock.h +1
-1@@ -146,7 +146,7 @@ extern const struct clksel_rate gpt_sys_rates[];extern const struct clksel_rate gfx_l3_rates[];extern const struct clksel_rate dsp_ick_rates[]; -#if defined(CONFIG_ARCH_OMAP2 ) && defined(CONFIG_CPU_FREQ ) +#if defined(CONFIG_ARCH_OMAP2 ) && defined(CONFIG_ARM_OMAP2PLUS_CPUFREQ )extern void omap2_clk_init_cpufreq_table (struct cpufreq_frequency_table **table);extern void omap2_clk_exit_cpufreq_table (struct cpufreq_frequency_table **table);#else arch/arm/plat-omap/clock.c +1
-1@@ -399,7 +399,7 @@ struct clk dummy_ck = { .ops = &clkops_null, }; -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ void clk_init_cpufreq_table (struct cpufreq_frequency_table **table) {unsigned long flags;arch/arm/plat-omap/include/plat/clock.h +2
-2@@ -283,7 +283,7 @@ struct clk_functions {void (*clk_allow_idle)(struct clk *clk);void (*clk_deny_idle)(struct clk *clk);void (*clk_disable_unused)(struct clk *clk); -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **);void (*clk_exit_cpufreq_table)(struct cpufreq_frequency_table **);#endif @@ -301,7 +301,7 @@ extern void recalculate_root_clocks(void);extern unsigned long followparent_recalc (struct clk *clk);extern void clk_enable_init_clocks (void );unsigned long omap_fixed_divisor_recalc (struct clk *clk); -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_OMAP2PLUS_CPUFREQ extern void clk_init_cpufreq_table (struct cpufreq_frequency_table **table);extern void clk_exit_cpufreq_table (struct cpufreq_frequency_table **table);#endif drivers/cpufreq/Kconfig.arm +5
-0@@ -2,6 +2,11 @@ # ARM CPU Frequency scaling drivers # +config ARM_OMAP2PLUS_CPUFREQ + bool + depends on ARCH_OMAP2PLUS + select CPU_FREQ_TABLE + config ARM_S3C64XX_CPUFREQ bool "Samsung S3C64XX" depends on CPU_S3C6410drivers/cpufreq/Makefile +1
-2@@ -44,7 +44,7 @@ obj-$(CONFIG_ARM_S3C64XX_CPUFREQ) += s3c64xx-cpufreq.o obj-$(CONFIG_ARM_S5PV210_CPUFREQ) += s5pv210-cpufreq.o obj-$(CONFIG_ARM_EXYNOS_CPUFREQ) += exynos-cpufreq.o obj-$(CONFIG_ARM_EXYNOS4210_CPUFREQ) += exynos4210-cpufreq.o -obj-$(CONFIG_ARCH_OMAP2PLUS) += omap-cpufreq.o +obj-$(CONFIG_ARM_OMAP2PLUS_CPUFREQ) += omap-cpufreq.o ################################################################################## # PowerPC platform drivers --To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html