From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-sh@vger.kernel.org, gregkh@suse.de, lethal@linux-sh.org,
i2c@lm-sensors.org, Magnus Damm <magnus.damm@gmail.com>,
akpm@linux-foundation.org
Subject: [PATCH 05/05] sh: add IORESOURCE_CLK to SuperH Mobile I2C platform data
Date: Fri, 18 Jul 2008 07:40:44 +0000 [thread overview]
Message-ID: <20080718074044.32713.83039.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20080718074002.32713.73442.sendpatchset@rx1.opensource.se>
From: Magnus Damm <damm@igel.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@igel.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 */
next prev parent reply other threads:[~2008-07-18 7:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 7:40 [PATCH 00/05] resource: type, size and IORESOURCE_CLK patches V2 Magnus Damm
2008-07-18 7:40 ` [PATCH 01/05] resource: add resource_size() Magnus Damm
2008-07-18 7:54 ` Ben Dooks
2008-07-18 7:40 ` [PATCH 02/05] resource: add resource_type() and IORESOURCE_TYPE_BITS Magnus Damm
2008-07-18 7:56 ` [PATCH 02/05] resource: add resource_type() and Ben Dooks
2008-07-18 8:24 ` [PATCH 02/05] resource: add resource_type() and IORESOURCE_TYPE_BITS Magnus Damm
2008-07-18 8:33 ` [PATCH 02/05] resource: add resource_type() and Ben Dooks
2008-07-18 9:05 ` [PATCH 02/05] resource: add resource_type() and IORESOURCE_TYPE_BITS Magnus Damm
2008-07-18 7:40 ` [PATCH 03/05] resource: add new IORESOURCE_CLK type V2 Magnus Damm
2008-07-18 7:53 ` [i2c] " Ben Dooks
2008-07-18 8:53 ` Magnus Damm
2008-07-18 7:40 ` [PATCH 04/05] i2c-sh_mobile: IORESOURCE_CLK support Magnus Damm
2008-07-18 8:04 ` Ben Dooks
2008-07-18 9:18 ` Magnus Damm
2008-08-13 5:54 ` [i2c] " Ben Dooks
2008-08-13 7:51 ` Russell King
2008-07-18 7:40 ` Magnus Damm [this message]
2008-07-18 23:36 ` [PATCH 05/05] sh: add IORESOURCE_CLK to SuperH Mobile I2C Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080718074044.32713.83039.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=i2c@lm-sensors.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox