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]
Message-Id: <20080718074044.32713.83039.sendpatchset@rx1.opensource.se>
Date:	Fri, 18 Jul 2008 16:40:44 +0900
From:	Magnus Damm <magnus.damm@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	linux-sh@...r.kernel.org, gregkh@...e.de, lethal@...ux-sh.org,
	i2c@...sensors.org, Magnus Damm <magnus.damm@...il.com>,
	akpm@...ux-foundation.org
Subject: [PATCH 05/05] sh: add IORESOURCE_CLK to SuperH Mobile I2C platform data

From: Magnus Damm <damm@...l.co.jp>

This patch passes processor specific IORESOURCE_CLK information to the
i2c-sh_mobile driver. With this change the clock to the IIC block will
be disabled while the I2C bus is inactive. Without this patch the clock
is always on.

Signed-off-by: Magnus Damm <damm@...l.co.jp>
---

 Applies to 6b4b0121a22649640e997b17dd00bb40e97e254d of sh-2.6 git

 arch/sh/kernel/cpu/sh4a/setup-sh7343.c |   14 ++++++++++----
 arch/sh/kernel/cpu/sh4a/setup-sh7366.c |    7 +++++--
 arch/sh/kernel/cpu/sh4a/setup-sh7722.c |    7 +++++--
 arch/sh/kernel/cpu/sh4a/setup-sh7723.c |    7 +++++--
 4 files changed, 25 insertions(+), 10 deletions(-)

--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7343.c	2008-07-18 14:37:33.000000000 +0900
@@ -25,7 +25,11 @@ static struct resource iic0_resources[] 
 		.start  = 96,
 		.end    = 99,
 		.flags  = IORESOURCE_IRQ,
-       },
+	},
+	[2] = {
+		.name   = "mstp109",
+		.flags  = IORESOURCE_CLK,
+	},
 };
 
 static struct platform_device iic0_device = {
@@ -45,7 +49,11 @@ static struct resource iic1_resources[] 
 		.start  = 44,
 		.end    = 47,
 		.flags  = IORESOURCE_IRQ,
-       },
+	},
+	[2] = {
+		.name   = "mstp108",
+		.flags  = IORESOURCE_CLK,
+	},
 };
 
 static struct platform_device iic1_device = {
@@ -147,8 +155,6 @@ static int __init sh7343_devices_setup(v
 	clk_always_enable("mstp023"); /* INTC3 */
 	clk_always_enable("mstp022"); /* INTC */
 	clk_always_enable("mstp020"); /* SuperHyway */
-	clk_always_enable("mstp109"); /* I2C0 */
-	clk_always_enable("mstp108"); /* I2C1 */
 	clk_always_enable("mstp202"); /* VEU */
 	clk_always_enable("mstp201"); /* VPU */
 
--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7366.c	2008-07-18 14:37:06.000000000 +0900
@@ -27,7 +27,11 @@ static struct resource iic_resources[] =
 		.start  = 96,
 		.end    = 99,
 		.flags  = IORESOURCE_IRQ,
-       },
+	},
+	[2] = {
+		.name   = "mstp109",
+		.flags  = IORESOURCE_CLK,
+	},
 };
 
 static struct platform_device iic_device = {
@@ -157,7 +161,6 @@ static int __init sh7366_devices_setup(v
 	clk_always_enable("mstp023"); /* INTC3 */
 	clk_always_enable("mstp022"); /* INTC */
 	clk_always_enable("mstp020"); /* SuperHyway */
-	clk_always_enable("mstp109"); /* I2C */
 	clk_always_enable("mstp207"); /* VEU-2 */
 	clk_always_enable("mstp202"); /* VEU-1 */
 	clk_always_enable("mstp201"); /* VPU */
--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7722.c	2008-07-18 14:35:43.000000000 +0900
@@ -52,7 +52,11 @@ static struct resource iic_resources[] =
 		.start  = 96,
 		.end    = 99,
 		.flags  = IORESOURCE_IRQ,
-       },
+	},
+	[2] = {
+		.name   = "mstp109",
+		.flags  = IORESOURCE_CLK,
+	},
 };
 
 static struct platform_device iic_device = {
@@ -166,7 +170,6 @@ static int __init sh7722_devices_setup(v
 	clk_always_enable("mstp026"); /* XYMEM */
 	clk_always_enable("mstp022"); /* INTC */
 	clk_always_enable("mstp020"); /* SuperHyway */
-	clk_always_enable("mstp109"); /* I2C */
 	clk_always_enable("mstp211"); /* USB */
 	clk_always_enable("mstp202"); /* VEU */
 	clk_always_enable("mstp201"); /* VPU */
--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7723.c	2008-07-18 14:36:23.000000000 +0900
@@ -210,7 +210,11 @@ static struct resource iic_resources[] =
 		.start  = 96,
 		.end    = 99,
 		.flags  = IORESOURCE_IRQ,
-       },
+	},
+	[2] = {
+		.name   = "mstp109",
+		.flags  = IORESOURCE_CLK,
+	},
 };
 
 static struct platform_device iic_device = {
@@ -238,7 +242,6 @@ static int __init sh7723_devices_setup(v
 	clk_always_enable("mstp022"); /* INTC */
 	clk_always_enable("mstp020"); /* SuperHyway */
 	clk_always_enable("mstp000"); /* MERAM */
-	clk_always_enable("mstp109"); /* I2C */
 	clk_always_enable("mstp108"); /* RTC */
 	clk_always_enable("mstp211"); /* USB */
 	clk_always_enable("mstp206"); /* VEU2H1 */
--
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