Skip to contentSkip to conversation

sh: sh_mobile i2c clock framework support

PATCH New Magnus Damm 1 participant 1 message Oct 31, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: sh_mobile i2c clock framework support

From: Magnus Damm <[email protected]>

Add clock framework support to the sh_mobile i2c driver and adjust the processor specific code accordingly.

---

 arch/sh/kernel/cpu/sh4a/setup-sh7343.c |    4 -
 arch/sh/kernel/cpu/sh4a/setup-sh7366.c |    2 
 arch/sh/kernel/cpu/sh4a/setup-sh7722.c |    2 
 arch/sh/kernel/cpu/sh4a/setup-sh7723.c |    2 
 drivers/i2c/busses/i2c-sh_mobile.c     |   73 +++++++++++++++-----------------
 5 files changed, 41 insertions(+), 42 deletions(-)
arch/sh/kernel/cpu/sh4a/setup-sh7343.c +2 -2
@@ -30,6 +30,7 @@ static struct resource iic0_resources[] 
 
 static struct platform_device iic0_device = {
 	.name           = "i2c-sh_mobile",
+	.id             = 0, /* "i2c0" clock */
 	.num_resources  = ARRAY_SIZE(iic0_resources),
 	.resource       = iic0_resources,
 };
@@ -50,6 +51,7 @@ static struct resource iic1_resources[] 
 
 static struct platform_device iic1_device = {
 	.name           = "i2c-sh_mobile",
+	.id             = 1, /* "i2c1" clock */
 	.num_resources  = ARRAY_SIZE(iic1_resources),
 	.resource       = iic1_resources,
 };
@@ -147,8 +149,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 */
 
arch/sh/kernel/cpu/sh4a/setup-sh7366.c +1 -1
@@ -32,6 +32,7 @@ static struct resource iic_resources[]  
 static struct platform_device iic_device = {
 	.name           = "i2c-sh_mobile",
+	.id             = 0, /* "i2c0" clock */
 	.num_resources  = ARRAY_SIZE(iic_resources),
 	.resource       = iic_resources,
 };
@@ -184,7 +185,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("mstp211"); /* USB */
 	clk_always_enable("mstp207"); /* VEU-2 */
 	clk_always_enable("mstp202"); /* VEU-1 */
arch/sh/kernel/cpu/sh4a/setup-sh7722.c +1 -1
@@ -87,6 +87,7 @@ static struct resource iic_resources[]  
 static struct platform_device iic_device = {
 	.name           = "i2c-sh_mobile",
+	.id             = 0, /* "i2c0" clock */
 	.num_resources  = ARRAY_SIZE(iic_resources),
 	.resource       = iic_resources,
 };
@@ -197,7 +198,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 */
arch/sh/kernel/cpu/sh4a/setup-sh7723.c +1 -1
@@ -215,6 +215,7 @@ static struct resource iic_resources[]  
 static struct platform_device iic_device = {
 	.name           = "i2c-sh_mobile",
+	.id             = 0, /* "i2c0" clock */
 	.num_resources  = ARRAY_SIZE(iic_resources),
 	.resource       = iic_resources,
 };
@@ -238,7 +239,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 */
drivers/i2c/busses/i2c-sh_mobile.c +36 -37

107 lines not on this page · raw message