From patchwork Thu Mar 7 00:32:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2229281 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 632583FC8A for ; Thu, 7 Mar 2013 00:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757925Ab3CGAci (ORCPT ); Wed, 6 Mar 2013 19:32:38 -0500 Received: from mail-oa0-f50.google.com ([209.85.219.50]:38796 "EHLO mail-oa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755037Ab3CGAch (ORCPT ); Wed, 6 Mar 2013 19:32:37 -0500 Received: by mail-oa0-f50.google.com with SMTP id l20so13453594oag.37 for ; Wed, 06 Mar 2013 16:32:37 -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=yuHjwy5qMYa5hlZkruGnWMsy+RSq96rfL8+fMBwH1EY=; b=Qca2yqgGQN714uNOK2T+cBIUovI3XOLtKwvI4VFDwmhOvKd6ID6fuKZmFdgPEm+GeO X8Bb588FohwP/Y6sxfc3gnJCNmbD4j/K/2+RSWVB8DK/+VZmHxHAd18eGbnluFbyx0XQ WYeW2fYFlzNoddspsMrOlrWyPp0sjS8i91CvmXz0F7QmsazlL5v8NOb10ykrqjYJrCym qhWA/yfE0Y0Xsxo6ZRS8JWM0sfJyw/lobfKIqG9ADsg4ISaMVORiHh/9s/JK9+t5j/yV s7msbtnENyDjfu63/TYPtcdAZov1X1JfqgBIgQ9SctsC19R/yhc7OzFaS0RwoxJWbc6W BBGA== MIME-Version: 1.0 X-Received: by 10.60.12.226 with SMTP id b2mr23976036oec.76.1362616357220; Wed, 06 Mar 2013 16:32:37 -0800 (PST) Received: by 10.182.69.20 with HTTP; Wed, 6 Mar 2013 16:32:37 -0800 (PST) In-Reply-To: <20130305105251.GL17833@n2100.arm.linux.org.uk> References: <20130305105251.GL17833@n2100.arm.linux.org.uk> Date: Thu, 7 Mar 2013 08:32:37 +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 Cc: rjw@sisk.pl, Steve.Bannister@arm.com, linux-pm@vger.kernel.org, Sudeep KarkadaNagesha , Liviu.Dudau@arm.com, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, robin.randhawa@arm.com, linux-arm-kernel@lists.infradead.org, mark.hambleton@broadcom.com, linaro-kernel@lists.linaro.org, charles.garcia-tobin@arm.com X-Gm-Message-State: ALoCoQkKhcuBAN049kuBf4bZrOBKxNa+xWaqTAKJMSZv9bXzDJOgs4D+ue0sUqrbg3mhyfCOMoxM Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 5 March 2013 18:52, Russell King - ARM Linux wrote: > On Tue, Mar 05, 2013 at 12:52:41PM +0800, Viresh Kumar wrote: >> + clk[cluster] = clk_get(NULL, name); >> + if (!IS_ERR_OR_NULL(clk[cluster])) { > > NAK. Two reasons. > > 1. IS_ERR_OR_NULL. You know about this, it's been on the list several > times. Hey, i had a second thought about this one and i have some other opinion here. This is a cpufreq driver and we need clock support for sure here, we can't work without it. And so here is the latest fixup: --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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..d1fdc65 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) @@ -159,7 +159,7 @@ static int get_cluster_clk_and_freq_table(u32 cluster) name[7] = cluster + '0'; clk[cluster] = clk_get_sys(name, NULL); - if (!IS_ERR(clk[cluster])) { + if (!IS_ERR_OR_NULL(clk[cluster])) { pr_debug("%s: clk: %p & freq table: %p, cluster: %d\n", __func__, clk[cluster], freq_table[cluster], cluster);