linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh: Use clk_always_enable() on sh7723 / ap325rxa
@ 2008-07-17 10:13 Magnus Damm
  2008-07-17 10:16 ` [PATCH] sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722 Magnus Damm
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Magnus Damm @ 2008-07-17 10:13 UTC (permalink / raw)
  To: linux-sh

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

Use clk_always_enable() on the sh7723 processor and in the ap325rxa
board code. Remove duplicate MSTPCR register definitions.

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

 arch/sh/boards/renesas/ap325rxa/setup.c |   12 ------------
 arch/sh/kernel/cpu/sh4a/setup-sh7723.c  |   16 ++++++++++++++++
 2 files changed, 16 insertions(+), 12 deletions(-)

--- 0001/arch/sh/boards/renesas/ap325rxa/setup.c
+++ work/arch/sh/boards/renesas/ap325rxa/setup.c	2008-07-17 12:43:05.000000000 +0900
@@ -97,20 +97,8 @@ static int __init ap325rxa_devices_setup
 }
 device_initcall(ap325rxa_devices_setup);
 
-#define MSTPCR0		(0xA4150030)
-#define MSTPCR1		(0xA4150034)
-#define MSTPCR2		(0xA4150038)
-
 static void __init ap325rxa_setup(char **cmdline_p)
 {
-	/* enable VEU0 + VEU1 */
-	ctrl_outl(ctrl_inl(MSTPCR2) & ~0x00000044, MSTPCR2);	/* bit 2 + 6 */
-
-	/* enable MERAM */
-	ctrl_outl(ctrl_inl(MSTPCR0) & ~0x00000001, MSTPCR0);	/* bit 0 */
-
-	/* I2C */
-	ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1);
 }
 
 static struct sh_machine_vector mv_ap325rxa __initmv = {
--- 0007/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7723.c	2008-07-17 13:05:10.000000000 +0900
@@ -13,6 +13,7 @@
 #include <linux/mm.h>
 #include <linux/serial_sci.h>
 #include <linux/uio_driver.h>
+#include <asm/clock.h>
 #include <asm/mmzone.h>
 
 static struct uio_info vpu_platform_data = {
@@ -230,9 +231,24 @@ static struct platform_device *sh7723_de
 
 static int __init sh7723_devices_setup(void)
 {
+	clk_always_enable("mstp031"); /* TLB */
+	clk_always_enable("mstp030"); /* IC */
+	clk_always_enable("mstp029"); /* OC */
+	clk_always_enable("mstp024"); /* FPU */
+	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 */
+	clk_always_enable("mstp202"); /* VEU2H0 */
+	clk_always_enable("mstp201"); /* VPU */
+
 	platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20);
 	platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20);
 	platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20);
+
 	return platform_add_devices(sh7723_devices,
 				    ARRAY_SIZE(sh7723_devices));
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722
  2008-07-17 10:13 [PATCH] sh: Use clk_always_enable() on sh7723 / ap325rxa Magnus Damm
@ 2008-07-17 10:16 ` Magnus Damm
  2008-07-17 10:18 ` [PATCH] sh: Use clk_always_enable() on sh7343 / SE77343 Magnus Damm
  2008-07-17 10:20 ` [PATCH] sh: Use clk_always_enable() on sh7366 Magnus Damm
  2 siblings, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2008-07-17 10:16 UTC (permalink / raw)
  To: linux-sh

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

Use clk_always_enable() on the sh7722 processor and in the board code
for Migo-R and Solution Engine 7722. Remove duplicate MSTPCR register
definitions.

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

 arch/sh/boards/renesas/migor/setup.c   |    7 +++----
 arch/sh/boards/se/7722/setup.c         |    8 +++-----
 arch/sh/kernel/cpu/sh4a/setup-sh7722.c |   14 ++++++++++++++
 include/asm-sh/migor.h                 |    4 ----
 include/asm-sh/se7722.h                |    4 ----
 5 files changed, 20 insertions(+), 17 deletions(-)

--- 0001/arch/sh/boards/renesas/migor/setup.c
+++ work/arch/sh/boards/renesas/migor/setup.c	2008-07-17 17:30:48.000000000 +0900
@@ -15,6 +15,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/i2c.h>
 #include <linux/smc91x.h>
+#include <asm/clock.h>
 #include <asm/machvec.h>
 #include <asm/io.h>
 #include <asm/sh_keysc.h>
@@ -218,6 +219,8 @@ static struct i2c_board_info __initdata 
 
 static int __init migor_devices_setup(void)
 {
+	clk_always_enable("mstp214"); /* KEYSC */
+
 	i2c_register_board_info(0, migor_i2c_devices,
 				ARRAY_SIZE(migor_i2c_devices));
  
@@ -236,16 +239,12 @@ static void __init migor_setup(char **cm
 	ctrl_outw(ctrl_inw(PORT_PSELA) & ~0x4100, PORT_PSELA);
 	ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
 	ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
-	ctrl_outl(ctrl_inl(MSTPCR2) & ~0x00004000, MSTPCR2);
 
 	/* NAND Flash */
 	ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR);
 	ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200,
 		  BSC_CS6ABCR);
 
-	/* I2C */
-	ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1);
-
 	/* Touch Panel - Enable IRQ6 */
 	ctrl_outw(ctrl_inw(PORT_PZCR) & ~0xc, PORT_PZCR);
 	ctrl_outw((ctrl_inw(PORT_PSELA) | 0x8000), PORT_PSELA);
--- 0001/arch/sh/boards/se/7722/setup.c
+++ work/arch/sh/boards/se/7722/setup.c	2008-07-17 17:31:07.000000000 +0900
@@ -16,6 +16,7 @@
 #include <linux/input.h>
 #include <linux/smc91x.h>
 #include <asm/machvec.h>
+#include <asm/clock.h>
 #include <asm/se7722.h>
 #include <asm/io.h>
 #include <asm/heartbeat.h>
@@ -145,6 +146,8 @@ static struct platform_device *se7722_de
 
 static int __init se7722_devices_setup(void)
 {
+	clk_always_enable("mstp214"); /* KEYSC */
+
 	return platform_add_devices(se7722_devices,
 		ARRAY_SIZE(se7722_devices));
 }
@@ -154,11 +157,6 @@ static void __init se7722_setup(char **c
 {
 	ctrl_outw(0x010D, FPGA_OUT);    /* FPGA */
 
-	ctrl_outl(0x00051001, MSTPCR0);
-	ctrl_outl(0x00000000, MSTPCR1);
-	/* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
-	ctrl_outl(0xffffb7c0, MSTPCR2);
-
 	ctrl_outw(0x0000, PORT_PECR);   /* PORT E 1 = IRQ5 ,E 0 = BS */
 	ctrl_outw(0x1000, PORT_PJCR);   /* PORT J 1 = IRQ1,J 0 =IRQ0 */
 
--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7722.c	2008-07-17 16:37:42.000000000 +0900
@@ -13,6 +13,7 @@
 #include <linux/serial_sci.h>
 #include <linux/mm.h>
 #include <linux/uio_driver.h>
+#include <asm/clock.h>
 #include <asm/mmzone.h>
 
 static struct resource usbf_resources[] = {
@@ -158,8 +159,21 @@ static struct platform_device *sh7722_de
 
 static int __init sh7722_devices_setup(void)
 {
+	clk_always_enable("mstp031"); /* TLB */
+	clk_always_enable("mstp030"); /* IC */
+	clk_always_enable("mstp029"); /* OC */
+	clk_always_enable("mstp028"); /* URAM */
+	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 */
+
 	platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20);
 	platform_resource_setup_memory(&veu_device, "veu", 2 << 20);
+
 	return platform_add_devices(sh7722_devices,
 				    ARRAY_SIZE(sh7722_devices));
 }
--- 0001/include/asm-sh/migor.h
+++ work/include/asm-sh/migor.h	2008-07-17 17:24:54.000000000 +0900
@@ -16,10 +16,6 @@
 #include <asm/addrspace.h>
 
 /* GPIO */
-#define MSTPCR0 0xa4150030
-#define MSTPCR1 0xa4150034
-#define MSTPCR2 0xa4150038
-
 #define PORT_PACR 0xa4050100
 #define PORT_PDCR 0xa4050106
 #define PORT_PECR 0xa4050108
--- 0001/include/asm-sh/se7722.h
+++ work/include/asm-sh/se7722.h	2008-07-17 17:28:15.000000000 +0900
@@ -55,10 +55,6 @@
 
 #define PA_LAN		(PA_AREA6_IO + 0)		/* SMC LAN91C111 */
 /* GPIO */
-#define MSTPCR0         0xA4150030UL
-#define MSTPCR1         0xA4150034UL
-#define MSTPCR2         0xA4150038UL
-
 #define FPGA_IN         0xb1840000UL
 #define FPGA_OUT        0xb1840004UL
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] sh: Use clk_always_enable() on sh7343 / SE77343
  2008-07-17 10:13 [PATCH] sh: Use clk_always_enable() on sh7723 / ap325rxa Magnus Damm
  2008-07-17 10:16 ` [PATCH] sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722 Magnus Damm
@ 2008-07-17 10:18 ` Magnus Damm
  2008-07-17 10:20 ` [PATCH] sh: Use clk_always_enable() on sh7366 Magnus Damm
  2 siblings, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2008-07-17 10:18 UTC (permalink / raw)
  To: linux-sh

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

Use clk_always_enable() on the sh7343 processor and in the board code
for Solution Engine 7343. Remove duplicate MSTPCR register definitions.

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

 arch/sh/boards/se/7343/setup.c         |    4 ----
 arch/sh/kernel/cpu/sh4a/setup-sh7343.c |   15 +++++++++++++++
 include/asm-sh/se7343.h                |    4 ----
 3 files changed, 15 insertions(+), 8 deletions(-)

--- 0001/arch/sh/boards/se/7343/setup.c
+++ work/arch/sh/boards/se/7343/setup.c	2008-07-17 18:21:58.000000000 +0900
@@ -114,10 +114,6 @@ static void __init sh7343se_setup(char *
 {
 	ctrl_outw(0xf900, FPGA_OUT);	/* FPGA */
 
-	ctrl_outl(0x00001001, MSTPCR0);
-	ctrl_outl(0x00000000, MSTPCR1);
-	ctrl_outl(0xffffbfC0, MSTPCR2);	/* LCDC, BEU, CEU, VEU, KEYSC */
-
 	ctrl_outw(0x0002, PORT_PECR);	/* PORT E 1 = IRQ5 */
 	ctrl_outw(0x0020, PORT_PSELD);
 
--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7343.c	2008-07-17 18:25:46.000000000 +0900
@@ -12,6 +12,7 @@
 #include <linux/serial.h>
 #include <linux/serial_sci.h>
 #include <linux/uio_driver.h>
+#include <asm/clock.h>
 
 static struct resource iic0_resources[] = {
 	[0] = {
@@ -138,8 +139,22 @@ static struct platform_device *sh7343_de
 
 static int __init sh7343_devices_setup(void)
 {
+	clk_always_enable("mstp031"); /* TLB */
+	clk_always_enable("mstp030"); /* IC */
+	clk_always_enable("mstp029"); /* OC */
+	clk_always_enable("mstp028"); /* URAM */
+	clk_always_enable("mstp026"); /* XYMEM */
+	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 */
+
 	platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20);
 	platform_resource_setup_memory(&veu_device, "veu", 2 << 20);
+
 	return platform_add_devices(sh7343_devices,
 				    ARRAY_SIZE(sh7343_devices));
 }
--- 0001/include/asm-sh/se7343.h
+++ work/include/asm-sh/se7343.h	2008-07-17 18:22:12.000000000 +0900
@@ -115,10 +115,6 @@
 #define PORT_PWDR  	0xA4050166
 #define PORT_PYDR  	0xA4050168
 
-#define MSTPCR0		0xA4150030
-#define MSTPCR1		0xA4150034
-#define MSTPCR2		0xA4150038
-
 #define FPGA_IN		0xb1400000
 #define FPGA_OUT	0xb1400002
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] sh: Use clk_always_enable() on sh7366
  2008-07-17 10:13 [PATCH] sh: Use clk_always_enable() on sh7723 / ap325rxa Magnus Damm
  2008-07-17 10:16 ` [PATCH] sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722 Magnus Damm
  2008-07-17 10:18 ` [PATCH] sh: Use clk_always_enable() on sh7343 / SE77343 Magnus Damm
@ 2008-07-17 10:20 ` Magnus Damm
  2 siblings, 0 replies; 4+ messages in thread
From: Magnus Damm @ 2008-07-17 10:20 UTC (permalink / raw)
  To: linux-sh

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

Use clk_always_enable() in the sh7366 processor code.

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

 arch/sh/kernel/cpu/sh4a/setup-sh7366.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7366.c	2008-07-17 18:33:51.000000000 +0900
@@ -14,6 +14,7 @@
 #include <linux/serial.h>
 #include <linux/serial_sci.h>
 #include <linux/uio_driver.h>
+#include <asm/clock.h>
 
 static struct resource iic_resources[] = {
 	[0] = {
@@ -148,9 +149,23 @@ static struct platform_device *sh7366_de
 
 static int __init sh7366_devices_setup(void)
 {
+	clk_always_enable("mstp031"); /* TLB */
+	clk_always_enable("mstp030"); /* IC */
+	clk_always_enable("mstp029"); /* OC */
+	clk_always_enable("mstp028"); /* RSMEM */
+	clk_always_enable("mstp026"); /* XYMEM */
+	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 */
+
 	platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20);
 	platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20);
 	platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20);
+
 	return platform_add_devices(sh7366_devices,
 				    ARRAY_SIZE(sh7366_devices));
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-17 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-17 10:13 [PATCH] sh: Use clk_always_enable() on sh7723 / ap325rxa Magnus Damm
2008-07-17 10:16 ` [PATCH] sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722 Magnus Damm
2008-07-17 10:18 ` [PATCH] sh: Use clk_always_enable() on sh7343 / SE77343 Magnus Damm
2008-07-17 10:20 ` [PATCH] sh: Use clk_always_enable() on sh7366 Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).