From patchwork Mon Jun 6 03:44:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 69358 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1288775qgf; Sun, 5 Jun 2016 20:45:15 -0700 (PDT) X-Received: by 10.98.75.146 with SMTP id d18mr23004845pfj.4.1465184715013; Sun, 05 Jun 2016 20:45:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d129si13709820pfa.184.2016.06.05.20.45.14; Sun, 05 Jun 2016 20:45:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; 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-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752534AbcFFDpM (ORCPT + 14 others); Sun, 5 Jun 2016 23:45:12 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33304 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbcFFDpL (ORCPT ); Sun, 5 Jun 2016 23:45:11 -0400 Received: by mail-pf0-f182.google.com with SMTP id y124so2768979pfy.0 for ; Sun, 05 Jun 2016 20:45:11 -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; bh=ALDC/2cdrtGZ6AOnSYqysM9sBet3X0Yf9brljHICKvQ=; b=F/rz6O7oM4VDRPo4WI0jz1SV84uIalu03xDfpKcDNJWwrR7yXuSqbMVyuedNdXlrcK uLhynls7NiSMoYc7K9WbaYmcErXmEw1FTCJuh2PG4OotLRivXAg9T4uYx78WyoVz2xrS MLQ3SE1XdMfcFJ6wYoQ5D9zjgcS+MXNvPSFmo= 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; bh=ALDC/2cdrtGZ6AOnSYqysM9sBet3X0Yf9brljHICKvQ=; b=DLRWtjOyzKq8aK5uXW00/RSQfcvQSEjj8jhQHm/RL/EtaHOY93FtA9VpApU4ZBxJIv 6xL9y1Q3jyqwmAhDPn5X1t76X7um9osfGLGAElnPJcItv4nHvg2bcQXy6nNb0o6nqLaw q170fGqgBT91wfKxuxQNjTAF3sA526lQ/HwYqbekFRmYU34G3FUPZjHQ8Rv7qqzI/qSD +/BR6D9x+bJQRysLFDzwmbZQ3Zkr3erjLmMZiO3mwrSaht+76qCiw4jfpSpKRDeJPEXR +wPSgJEC+M/gjMPAcfqkCGOy8RV8LX46Sl7D8KtW89dzrmAoMRQHHBuJopRVLUMsWbFe kuvQ== X-Gm-Message-State: ALyK8tKmvsCDJs2QJeez5JaC3sWZbpzeyY+znWhfmMeJnd5XjJQK/hybpF4HXlWBans0Iw67 X-Received: by 10.98.65.92 with SMTP id o89mr22701109pfa.72.1465184710639; Sun, 05 Jun 2016 20:45:10 -0700 (PDT) Received: from localhost ([122.167.17.193]) by smtp.gmail.com with ESMTPSA id 75sm23249995pfo.82.2016.06.05.20.45.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Jun 2016 20:45:09 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Sekhar Nori , Kevin Hilman Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar , linux-arm-kernel@lists.infradead.org Subject: [PATCH V4 1/8] ARM: davinci: Sort frequency table Date: Mon, 6 Jun 2016 09:14:54 +0530 Message-Id: <3a395ec9a3cfec21f227a1ad92df237b1dda9f2d.1465184522.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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 --- V3->V4: - Fixed an error reported by buildbot, by removing '&' before usage of da850_freq_table. arch/arm/mach-davinci/da850.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- 2.7.1.410.g6faf27b -- 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/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 239886299968..a706df3367ee 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; } }