diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-07-17 06:16:11 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:37 -0400 |
commit | 6c7d826cf6ff05264f9af04410aee82a08edfb9f (patch) | |
tree | ce110c55b7429071732321f9fcad19b97461f887 /arch/sh | |
parent | 9ca6ecac505002d0c34b47b394f39aa14b0e6fb6 (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')
-rw-r--r-- | arch/sh/boards/renesas/migor/setup.c | 7 | ||||
-rw-r--r-- | arch/sh/boards/se/7722/setup.c | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 14 |
3 files changed, 20 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 | ||
218 | static int __init migor_devices_setup(void) | 219 | static 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 | ||
146 | static int __init se7722_devices_setup(void) | 147 | static 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 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 6015f842edad..de1ede92176e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/serial_sci.h> | 13 | #include <linux/serial_sci.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/uio_driver.h> | 15 | #include <linux/uio_driver.h> |
16 | #include <asm/clock.h> | ||
16 | #include <asm/mmzone.h> | 17 | #include <asm/mmzone.h> |
17 | 18 | ||
18 | static struct resource usbf_resources[] = { | 19 | static struct resource usbf_resources[] = { |
@@ -158,8 +159,21 @@ static struct platform_device *sh7722_devices[] __initdata = { | |||
158 | 159 | ||
159 | static int __init sh7722_devices_setup(void) | 160 | static int __init sh7722_devices_setup(void) |
160 | { | 161 | { |
162 | clk_always_enable("mstp031"); /* TLB */ | ||
163 | clk_always_enable("mstp030"); /* IC */ | ||
164 | clk_always_enable("mstp029"); /* OC */ | ||
165 | clk_always_enable("mstp028"); /* URAM */ | ||
166 | clk_always_enable("mstp026"); /* XYMEM */ | ||
167 | clk_always_enable("mstp022"); /* INTC */ | ||
168 | clk_always_enable("mstp020"); /* SuperHyway */ | ||
169 | clk_always_enable("mstp109"); /* I2C */ | ||
170 | clk_always_enable("mstp211"); /* USB */ | ||
171 | clk_always_enable("mstp202"); /* VEU */ | ||
172 | clk_always_enable("mstp201"); /* VPU */ | ||
173 | |||
161 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); | 174 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); |
162 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); | 175 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); |
176 | |||
163 | return platform_add_devices(sh7722_devices, | 177 | return platform_add_devices(sh7722_devices, |
164 | ARRAY_SIZE(sh7722_devices)); | 178 | ARRAY_SIZE(sh7722_devices)); |
165 | } | 179 | } |