lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed,  2 Nov 2011 11:36:08 -0700
From:	David Brown <davidb@...eaurora.org>
To:	David Brown <davidb@...eaurora.org>,
	Daniel Walker <dwalker@...o99.com>,
	Bryan Huntsman <bryanh@...eaurora.org>,
	Russell King <linux@....linux.org.uk>
Cc:	Stephen Boyd <sboyd@...eaurora.org>, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [RFC PATCH 11/34] msm: Migrate to clock rate voting

From: Stephen Boyd <sboyd@...eaurora.org>

Add the appropriate clock voters and integrate clock.c with the
voting driver so that voting works appropriately.

Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
Signed-off-by: David Brown <davidb@...eaurora.org>
---
 arch/arm/mach-msm/devices-msm7x30.c |   19 +++++++++++++++++++
 arch/arm/mach-msm/devices-qsd8x50.c |   17 +++++++++++++++++
 2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c
index 7a548a2..6574b7a 100644
--- a/arch/arm/mach-msm/devices-msm7x30.c
+++ b/arch/arm/mach-msm/devices-msm7x30.c
@@ -24,6 +24,7 @@
 #include <mach/board.h>
 
 #include "devices.h"
+#include "clock-voter.h"
 #include "smd_private.h"
 
 #include <asm/mach/flash.h>
@@ -210,6 +211,15 @@ static struct pcom_clk pbus_clk = {
 	},
 };
 
+static DEFINE_CLK_VOTER(ebi1_dtv_clk,	&pbus_clk.c);
+static DEFINE_CLK_VOTER(ebi1_kgsl_clk,	&pbus_clk.c);
+static DEFINE_CLK_VOTER(ebi1_lcdc_clk,	&pbus_clk.c);
+static DEFINE_CLK_VOTER(ebi1_mddi_clk,	&pbus_clk.c);
+static DEFINE_CLK_VOTER(ebi1_tv_clk,	&pbus_clk.c);
+static DEFINE_CLK_VOTER(ebi1_usb_clk,	&pbus_clk.c);
+static DEFINE_CLK_VOTER(ebi1_vcd_clk,	&pbus_clk.c);
+static DEFINE_CLK_VOTER(ebi1_vfe_clk,	&pbus_clk.c);
+
 struct clk_lookup msm_clocks_7x30[] = {
 	CLK_LOOKUP("adm_clk",			adm_clk.c,	"msm_dmov"),
 	CLK_LOOKUP("adsp_clk",			adsp_clk.c,	NULL),
@@ -284,6 +294,15 @@ struct clk_lookup msm_clocks_7x30[] = {
 	CLK_LOOKUP("csi_clk",			csi0_clk.c,	NULL),
 	CLK_LOOKUP("csi_pclk",			csi0_p_clk.c,	NULL),
 	CLK_LOOKUP("csi_vfe_clk",		csi0_vfe_clk.c,	NULL),
+
+	CLK_LOOKUP("ebi1_clk",	ebi1_dtv_clk.c,		NULL),
+	CLK_LOOKUP("ebi1_clk",	ebi1_kgsl_clk.c,	NULL),
+	CLK_LOOKUP("ebi1_clk",	ebi1_lcdc_clk.c,	NULL),
+	CLK_LOOKUP("ebi1_clk",	ebi1_mddi_clk.c,	NULL),
+	CLK_LOOKUP("ebi1_clk",	ebi1_tv_clk.c,		NULL),
+	CLK_LOOKUP("ebi1_clk",	ebi1_usb_clk.c,		NULL),
+	CLK_LOOKUP("ebi1_clk",	ebi1_vcd_clk.c,		NULL),
+	CLK_LOOKUP("ebi1_clk",	ebi1_vfe_clk.c,		NULL),
 };
 
 unsigned msm_num_clocks_7x30 = ARRAY_SIZE(msm_clocks_7x30);
diff --git a/arch/arm/mach-msm/devices-qsd8x50.c b/arch/arm/mach-msm/devices-qsd8x50.c
index cc93ce8..21a1f3a 100644
--- a/arch/arm/mach-msm/devices-qsd8x50.c
+++ b/arch/arm/mach-msm/devices-qsd8x50.c
@@ -29,6 +29,7 @@
 
 #include <mach/mmc.h>
 #include "clock-pcom.h"
+#include "clock-voter.h"
 
 static struct resource resources_uart3[] = {
 	{
@@ -343,6 +344,14 @@ static DEFINE_CLK_PCOM(usb_hs3_clk,	USB_HS3_CLK,	OFF);
 static DEFINE_CLK_PCOM(usb_hs3_p_clk,	USB_HS3_P_CLK,	OFF);
 static DEFINE_CLK_PCOM(usb_phy_clk,	USB_PHY_CLK,	0);
 
+static DEFINE_CLK_VOTER(ebi1_acpu_clk,	&ebi1_clk.c);
+static DEFINE_CLK_VOTER(ebi1_kgsl_clk,	&ebi1_clk.c);
+static DEFINE_CLK_VOTER(ebi1_lcdc_clk,	&ebi1_clk.c);
+static DEFINE_CLK_VOTER(ebi1_mddi_clk,	&ebi1_clk.c);
+static DEFINE_CLK_VOTER(ebi1_tv_clk,	&ebi1_clk.c);
+static DEFINE_CLK_VOTER(ebi1_usb_clk,	&ebi1_clk.c);
+static DEFINE_CLK_VOTER(ebi1_vfe_clk,	&ebi1_clk.c);
+
 struct clk_lookup msm_clocks_8x50[] = {
 	CLK_LOOKUP("adm_clk",		adm_clk.c,	"msm_dmov"),
 	CLK_LOOKUP("ce_clk",		ce_clk.c,		NULL),
@@ -395,6 +404,14 @@ struct clk_lookup msm_clocks_8x50[] = {
 	CLK_LOOKUP("usb_hs3_clk",	usb_hs3_clk.c,	NULL),
 	CLK_LOOKUP("usb_hs3_pclk",	usb_hs3_p_clk.c,	NULL),
 	CLK_LOOKUP("usb_phy_clk",	usb_phy_clk.c,	NULL),
+
+	CLK_LOOKUP("ebi1_clk",		ebi1_acpu_clk.c,	NULL),
+	CLK_LOOKUP("ebi1_clk",		ebi1_kgsl_clk.c,	NULL),
+	CLK_LOOKUP("ebi1_clk",		ebi1_lcdc_clk.c,	NULL),
+	CLK_LOOKUP("ebi1_clk",		ebi1_mddi_clk.c,	NULL),
+	CLK_LOOKUP("ebi1_clk",		ebi1_tv_clk.c,		NULL),
+	CLK_LOOKUP("ebi1_clk",		ebi1_usb_clk.c,		NULL),
+	CLK_LOOKUP("ebi1_clk",		ebi1_vfe_clk.c,		NULL),
 };
 
 unsigned msm_num_clocks_8x50 = ARRAY_SIZE(msm_clocks_8x50);
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ