From patchwork Fri Jun 3 05:28:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 69217 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp90644qgf; Thu, 2 Jun 2016 22:29:10 -0700 (PDT) X-Received: by 10.98.21.210 with SMTP id 201mr3546542pfv.51.1464931750185; Thu, 02 Jun 2016 22:29:10 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w68si3762470pfd.81.2016.06.02.22.29.09; Thu, 02 Jun 2016 22:29:10 -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 S1751801AbcFCF3H (ORCPT + 14 others); Fri, 3 Jun 2016 01:29:07 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33518 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751738AbcFCF3F (ORCPT ); Fri, 3 Jun 2016 01:29:05 -0400 Received: by mail-pf0-f171.google.com with SMTP id b124so39875453pfb.0 for ; Thu, 02 Jun 2016 22:29:05 -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=JwI78ebXjU0B51qdHY6r7AoaPeOXLjIU/xhj2+sL0rfkfii4Gu4ZY5tnl2BjGXvtRB /Wq+r9Ul8EUpklMS8FKjLmDW3x5UVeMRqAh2myC/z0cronI/FVbf0VEEMahEj4HwtreS DDK7cWCncEjbn86sf48zFL69bc/CNT1LdYQvw= 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=A+YjkQ83AkyeNWmddQAC9jka07Z7JB2I35U3i2DpcttOM/AfHFIaWnvIQGc6zyMlHx FGBGkwd1f7TtMkMIJJxo9ZgpNcoaKEZdHYzB/HMaR2ADkKbxw/MyI9PYqkPDua2R+xhf UDGxJqa0zKssiQqt+7yGi2q7dfU2lGfZ9+E6x024aQbp1KpuSm4GUSUvBYldWWgTDLgB Owq6yPsQTKmVepl94cAVH9piF6qf+Xb94+VurgRoRgODi8ztHp6THdrZX81BV+OH/Bab 7/nqrsGP4cXYcKke5zDjzAkXcxsVwSAOvYd1fZHCVhATQTdDkNcKwa9W7Ra6Fd+C4olA BSKQ== X-Gm-Message-State: ALyK8tJthbTe6H8nVlwvKeopbF5/P0Fv1Miv72ZGPIYU8Z9SlYnrHDsDu8NK0czaeE+E+o0G X-Received: by 10.98.89.207 with SMTP id k76mr3631341pfj.166.1464931744697; Thu, 02 Jun 2016 22:29:04 -0700 (PDT) Received: from localhost ([122.167.17.193]) by smtp.gmail.com with ESMTPSA id ut6sm2265591pac.37.2016.06.02.22.29.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jun 2016 22:29:04 -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 V3 1/8] ARM: davinci: Sort frequency table Date: Fri, 3 Jun 2016 10:58:45 +0530 Message-Id: X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: 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 --- 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..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; } }