aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-07-17 06:16:11 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 05:10:37 -0400
commit6c7d826cf6ff05264f9af04410aee82a08edfb9f (patch)
treece110c55b7429071732321f9fcad19b97461f887 /arch/sh/boards
parent9ca6ecac505002d0c34b47b394f39aa14b0e6fb6 (diff)
sh: Use clk_always_enable() on sh7722 / Migo-R / SE7722
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> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/renesas/migor/setup.c7
-rw-r--r--arch/sh/boards/se/7722/setup.c8
2 files changed, 6 insertions, 9 deletions
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c
index 963c99322095..91819fb61b3e 100644
--- a/arch/sh/boards/renesas/migor/setup.c
+++ b/arch/sh/boards/renesas/migor/setup.c
@@ -15,6 +15,7 @@
15#include <linux/mtd/nand.h> 15#include <linux/mtd/nand.h>
16#include <linux/i2c.h> 16#include <linux/i2c.h>
17#include <linux/smc91x.h> 17#include <linux/smc91x.h>
18#include <asm/clock.h>
18#include <asm/machvec.h> 19#include <asm/machvec.h>
19#include <asm/io.h> 20#include <asm/io.h>
20#include <asm/sh_keysc.h> 21#include <asm/sh_keysc.h>
@@ -217,6 +218,8 @@ static struct i2c_board_info __initdata migor_i2c_devices[] = {
217 218
218static int __init migor_devices_setup(void) 219static int __init migor_devices_setup(void)
219{ 220{
221 clk_always_enable("mstp214"); /* KEYSC */
222
220 i2c_register_board_info(0, migor_i2c_devices, 223 i2c_register_board_info(0, migor_i2c_devices,
221 ARRAY_SIZE(migor_i2c_devices)); 224 ARRAY_SIZE(migor_i2c_devices));
222 225
@@ -235,16 +238,12 @@ static void __init migor_setup(char **cmdline_p)
235 ctrl_outw(ctrl_inw(PORT_PSELA) & ~0x4100, PORT_PSELA); 238 ctrl_outw(ctrl_inw(PORT_PSELA) & ~0x4100, PORT_PSELA);
236 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA); 239 ctrl_outw(ctrl_inw(PORT_HIZCRA) & ~0x4000, PORT_HIZCRA);
237 ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC); 240 ctrl_outw(ctrl_inw(PORT_HIZCRC) & ~0xc000, PORT_HIZCRC);
238 ctrl_outl(ctrl_inl(MSTPCR2) & ~0x00004000, MSTPCR2);
239 241
240 /* NAND Flash */ 242 /* NAND Flash */
241 ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR); 243 ctrl_outw(ctrl_inw(PORT_PXCR) & 0x0fff, PORT_PXCR);
242 ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200, 244 ctrl_outl((ctrl_inl(BSC_CS6ABCR) & ~0x00000600) | 0x00000200,
243 BSC_CS6ABCR); 245 BSC_CS6ABCR);
244 246
245 /* I2C */
246 ctrl_outl(ctrl_inl(MSTPCR1) & ~0x00000200, MSTPCR1);
247
248 /* Touch Panel - Enable IRQ6 */ 247 /* Touch Panel - Enable IRQ6 */
249 ctrl_outw(ctrl_inw(PORT_PZCR) & ~0xc, PORT_PZCR); 248 ctrl_outw(ctrl_inw(PORT_PZCR) & ~0xc, PORT_PZCR);
250 ctrl_outw((ctrl_inw(PORT_PSELA) | 0x8000), PORT_PSELA); 249 ctrl_outw((ctrl_inw(PORT_PSELA) | 0x8000), PORT_PSELA);
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c
index ede3957fc14a..6e228ea59788 100644
--- a/arch/sh/boards/se/7722/setup.c
+++ b/arch/sh/boards/se/7722/setup.c
@@ -16,6 +16,7 @@
16#include <linux/input.h> 16#include <linux/input.h>
17#include <linux/smc91x.h> 17#include <linux/smc91x.h>
18#include <asm/machvec.h> 18#include <asm/machvec.h>
19#include <asm/clock.h>
19#include <asm/se7722.h> 20#include <asm/se7722.h>
20#include <asm/io.h> 21#include <asm/io.h>
21#include <asm/heartbeat.h> 22#include <asm/heartbeat.h>
@@ -145,6 +146,8 @@ static struct platform_device *se7722_devices[] __initdata = {
145 146
146static int __init se7722_devices_setup(void) 147static int __init se7722_devices_setup(void)
147{ 148{
149 clk_always_enable("mstp214"); /* KEYSC */
150
148 return platform_add_devices(se7722_devices, 151 return platform_add_devices(se7722_devices,
149 ARRAY_SIZE(se7722_devices)); 152 ARRAY_SIZE(se7722_devices));
150} 153}
@@ -154,11 +157,6 @@ static void __init se7722_setup(char **cmdline_p)
154{ 157{
155 ctrl_outw(0x010D, FPGA_OUT); /* FPGA */ 158 ctrl_outw(0x010D, FPGA_OUT); /* FPGA */
156 159
157 ctrl_outl(0x00051001, MSTPCR0);
158 ctrl_outl(0x00000000, MSTPCR1);
159 /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
160 ctrl_outl(0xffffb7c0, MSTPCR2);
161
162 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */ 160 ctrl_outw(0x0000, PORT_PECR); /* PORT E 1 = IRQ5 ,E 0 = BS */
163 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */ 161 ctrl_outw(0x1000, PORT_PJCR); /* PORT J 1 = IRQ1,J 0 =IRQ0 */
164 162