From patchwork Thu Mar 7 17:04:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2233161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 925FEE0248 for ; Thu, 7 Mar 2013 17:08:36 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDeFT-0004zf-Pj; Thu, 07 Mar 2013 17:04:55 +0000 Received: from mail-oa0-f43.google.com ([209.85.219.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UDeFR-0004yu-5l for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2013 17:04:53 +0000 Received: by mail-oa0-f43.google.com with SMTP id l10so866392oag.30 for ; Thu, 07 Mar 2013 09:04:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=JrXLOdkgRE9+cSZzGmOf4wrJNaZwBJjyymUy8+1bUx4=; b=KEVd7OkLdHWT75JB5iL/EXydE9nOBHwA1l3EazrWbVOKpR4A4PdTlNDHqOjtmKYY21 9f2V/Vt1U0Kq2Yd/XQmo7Ml3Zd3oDdqL4Pp5ekKw+Us6szijNlWsE87Wunlh4OW8SqVP BvBczyoKSU3gINjKAT2jOOtUBXm5jMdjL2zM8EOO/wT8E5oAlbp/x0o7gjffqrmLHzJT hzEGEafI2TwSSA9RJC3Oy/UgVsdIj8FJJObGyFLqdsICD36ljgCsQpU6HRFiyOx1FEox fC8pKBPbtPEKisMgZWDnos7vyAsTb3pPclL0cGjYA4FBkyjK+uXp56a4BesU5321JLO7 ogGQ== MIME-Version: 1.0 X-Received: by 10.182.118.42 with SMTP id kj10mr26174527obb.99.1362675891321; Thu, 07 Mar 2013 09:04:51 -0800 (PST) Received: by 10.182.69.20 with HTTP; Thu, 7 Mar 2013 09:04:51 -0800 (PST) In-Reply-To: <20130307114950.GF17833@n2100.arm.linux.org.uk> References: <20130305105251.GL17833@n2100.arm.linux.org.uk> <20130307005119.GY17833@n2100.arm.linux.org.uk> <20130307114950.GF17833@n2100.arm.linux.org.uk> Date: Fri, 8 Mar 2013 01:04:51 +0800 Message-ID: Subject: Re: [PATCH] cpufreq: ARM big LITTLE: Add generic cpufreq driver and its DT glue From: Viresh Kumar To: Russell King - ARM Linux X-Gm-Message-State: ALoCoQmtS5RTUFUhp0tgeFigt/4X0ID3Ircm4BhigQlJJ4q9lHuBhI4hd3dE7k5jnDwqmkFabvEM X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130307_120453_312182_931F9C09 X-CRM114-Status: GOOD ( 12.77 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.219.43 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Steve.Bannister@arm.com, linux-pm@vger.kernel.org, Sudeep KarkadaNagesha , Liviu.Dudau@arm.com, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, rjw@sisk.pl, robin.randhawa@arm.com, mark.hambleton@broadcom.com, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, charles.garcia-tobin@arm.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 7 March 2013 19:49, Russell King - ARM Linux wrote: > So how is this different from any other clock which may also return zero > from its clk_get_rate() ? > > If that's the condition you want to check for, call clk_get_rate() after > a successful clk_get*() and check for the condition. Don't go treating > the cookie somehow specially. You're *assuming* a behaviour that is > inappropriate for the side of the interface you're working with. Okay. I will replace the earlier fixup with following: For more clarity i will resend this patch now will all updates. diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index fdf54a9..87b7e48 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -9,8 +9,7 @@ config ARM_BIG_LITTLE_CPUFREQ config ARM_DT_BL_CPUFREQ tristate "Generic ARM big LITTLE CPUfreq driver probed via DT" select ARM_BIG_LITTLE_CPUFREQ - depends on OF - default n + depends on OF && HAVE_CLK help This enables the Generic CPUfreq driver for ARM big.LITTLE platform. This gets frequency tables from DT. diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index 2486b9a..a41fd89 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -147,7 +147,7 @@ static void put_cluster_clk_and_freq_table(u32 cluster) static int get_cluster_clk_and_freq_table(u32 cluster) { - char name[9] = "cluster"; + char name[9] = "cpu-cluster"; int count; if (atomic_inc_return(&cluster_usage[cluster]) != 1)