From patchwork Thu Jun 2 14:19:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 69184 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp144739qgf; Thu, 2 Jun 2016 07:21:04 -0700 (PDT) X-Received: by 10.98.5.196 with SMTP id 187mr4964055pff.133.1464877263028; Thu, 02 Jun 2016 07:21:03 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id g17si789642pfg.127.2016.06.02.07.21.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jun 2016 07:21:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8TTO-0001ny-Ll; Thu, 02 Jun 2016 14:19:46 +0000 Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8TTL-0001YG-2a for linux-arm-kernel@lists.infradead.org; Thu, 02 Jun 2016 14:19:44 +0000 Received: by mail-pf0-x234.google.com with SMTP id f144so31937328pfa.3 for ; Thu, 02 Jun 2016 07:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=sM53+i5BLils1dJc0nPiAunE5VsWmhYK2oBElcISdpw=; b=XQW6ioCAQu7ZeJOMQ+A1cXsnKvuf+c+refNbcHIR9X37Vqe3gbSR/JPeoMadcO6yoZ ARhv8YrkHxk/oXMbmz/MHgU8A8GQUno+gOE2O5OVjtRoVDfcCwGybcMWKWD0BvmJDvRa JgcO8xmjL1zUml6mEm2xZqXpGY+RYd+JIS3wY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=sM53+i5BLils1dJc0nPiAunE5VsWmhYK2oBElcISdpw=; b=HKY+ojUSd/hRK0qpQ2m8zLsQAlqPtokUWBLOIIrsI++3Cri9DfClyw9O6f3i3+gTrP +BYbiPOj3q68a6WkLzmo1H04XJE3xTYsOj2UO9A+S4LOrhFodjF8tRmwatNTO8Q4GNrn BBBqAhLv7wEJJJnrUGr5pWqXLlcKXiVeIZJurkFS3VkGdAwAUmuHoWZCK7fJUDF4wINa mbtwRKpvvpi5l02i8U7GZrJNI6SVc9hOJYk8yjrlImJ0fLLQYA36v1F9TWc6Kd20U/vQ +59KFfRY7izte5NbJp6O3bhBIqYyjZWvh71EItpRe6T+IZcMhMUUqexg8JP6CaogRnD4 /Q4A== X-Gm-Message-State: ALyK8tJXEXDa3yK+lEKR756MExp8CK0+iQ+XM9Q9vvHV29IveuRtHPY0mWqkUJoMckHTM4UP X-Received: by 10.98.8.69 with SMTP id c66mr5004493pfd.47.1464877161977; Thu, 02 Jun 2016 07:19:21 -0700 (PDT) Received: from localhost ([122.167.17.193]) by smtp.gmail.com with ESMTPSA id m75sm1367690pfj.31.2016.06.02.07.19.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jun 2016 07:19:21 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Sekhar Nori , Kevin Hilman Subject: [PATCH 01/11] ARM: davinci: Sort frequency table Date: Thu, 2 Jun 2016 19:49:01 +0530 Message-Id: <08ad59656c493a72284c523560fb820deac95520.1464876460.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_071943_174860_0D8FD460 X-CRM114-Status: GOOD ( 14.26 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:234 listed in] [list.dnswl.org] 0.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [122.167.17.193 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof Kozlowski , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Dmitry Eremin-Solenikov , Viresh Kumar , Steven Miao , linux-kernel@vger.kernel.org, Kukjin Kim , Shawn Guo , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org This is required for some of the changes in cpufreq core. There was only one function dependent on the order of the table, that is fixed as well. Cc: Sekhar Nori Cc: Kevin Hilman Signed-off-by: Viresh Kumar --- arch/arm/mach-davinci/da850.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- 2.7.1.410.g6faf27b _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 239886299968..f683c119cfed 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -1004,13 +1004,14 @@ static const struct da850_opp da850_opp_96 = { .frequency = freq * 1000, \ } +/* Table sorted in ascending order of frequencies */ static struct cpufreq_frequency_table da850_freq_table[] = { - OPP(456), - OPP(408), - OPP(372), - OPP(300), - OPP(200), OPP(96), + OPP(200), + OPP(300), + OPP(372), + OPP(408), + OPP(456), { .driver_data = 0, .frequency = CPUFREQ_TABLE_END, @@ -1076,8 +1077,9 @@ int da850_register_cpufreq(char *async_clk) clk_add_alias("async", da850_cpufreq_device.name, async_clk, NULL); for (i = 0; i < ARRAY_SIZE(da850_freq_table); i++) { - if (da850_freq_table[i].frequency <= da850_max_speed) { - cpufreq_info.freq_table = &da850_freq_table[i]; + if (da850_freq_table[i].frequency > da850_max_speed) { + &da850_freq_table[i].driver_data = 0; + &da850_freq_table[i].frequency = CPUFREQ_TABLE_END; break; } }