Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757246Ab3FLPuU (ORCPT ); Wed, 12 Jun 2013 11:50:20 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:60558 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756925Ab3FLPuS (ORCPT ); Wed, 12 Jun 2013 11:50:18 -0400 Message-ID: <51B898B6.8070103@wwwdotorg.org> Date: Wed, 12 Jun 2013 09:50:14 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Viresh Kumar CC: rjw@sisk.pl, linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, arvind.chauhan@arm.com, arnd@arndb.de, Stephen Warren Subject: Re: [PATCH 10/11] cpufreq: tegra: select CPU_FREQ_TABLE for ARCH_TEGRA References: <881257c10f24b5ca8721b561726bac8887dc922e.1371022830.git.viresh.kumar@linaro.org> In-Reply-To: <881257c10f24b5ca8721b561726bac8887dc922e.1371022830.git.viresh.kumar@linaro.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 30 On 06/12/2013 02:15 AM, Viresh Kumar wrote: > ARCH_TEGRA selects ARCH_HAS_CPUFREQ, so CPUFREQ will be enabled for all variants > of TEGRA. CPUFreq driver for tegra is enabled if ARCH_TEGRA is selected. Driver > uses APIs from freq_table.c and so we must select CPU_FREQ_TABLE for ARCH_TEGRA. > > This also removes select CPU_FREQ_TABLE from individual tegra variants. I guess the real issue here is that drivers/cpufreq/tegra-cpufreq.c gets built based on ARCH_TEGRA, which doesn't depend on nor select CPU_FREQ itself, so: select CPU_FREQ_TABLE if CPU_FREQ ... isn't guaranteed to fire. The correct solution seems to be: * Add CONFIG_ARM_TEGRA_CPUFREQ to drivers/cpufreq/Kconfig.arm. * Make that Kconfig option selct CPU_FREQ_TABLE. * Make that Kconfig option be def_bool ARCH_TEGRA. * Modify drivers/cpufreq/Makefile to build tegra-cpufreq.c based on that. * Remove all the cpufreq-related stuff from arch/arm/mach-tegra/Kconfig. That way, tegra-cpufreq.c can't be built if !CPU_FREQ, and Tegra's cpufreq works the same way as all the other cpufreq drivers. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/