]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: mach-shmobile: Disable sh7372 RT side MSTP bits
authorMagnus Damm <damm@opensource.se>
Tue, 17 May 2011 10:39:22 +0000 (10:39 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 24 May 2011 03:28:56 +0000 (12:28 +0900)
Update the sh7372 clock code to set the RT side
set of MSTP bits to a fixed disabled state.

The sh7372 SoC contains two sets of MSTP bits,
one for the ARM (SYS) side, and one for the
SH4AL-DSP (RT) side. The actual clock associated
with the MSTP bit will only be stopped when both
sides have set the MSTP bit to disabled mode.

Some MSTP bits are enabled by default after
hardware reset, so this patch adjusts the code
to disable all MSTP bits associated with the RT
side to allow the SYS side to have full control.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/arm/mach-shmobile/clock-sh7372.c

index fbca92cc530a0ac0e6f07a1d0d302556150ef5c3..95b814aac55668e478ccd51b599b8f9f2f3483d4 100644 (file)
 #define DSI1PCKCR      0xe6150098
 #define PLLC01CR       0xe6150028
 #define PLLC2CR                0xe615002c
+#define RMSTPCR0       0xe6150110
+#define RMSTPCR1       0xe6150114
+#define RMSTPCR2       0xe6150118
+#define RMSTPCR3       0xe615011c
+#define RMSTPCR4       0xe6150120
 #define SMSTPCR0       0xe6150130
 #define SMSTPCR1       0xe6150134
 #define SMSTPCR2       0xe6150138
@@ -654,6 +659,13 @@ void __init sh7372_clock_init(void)
 {
        int k, ret = 0;
 
+       /* make sure MSTP bits on the RT/SH4AL-DSP side are off */
+       __raw_writel(0xe4ef8087, RMSTPCR0);
+       __raw_writel(0xffffffff, RMSTPCR1);
+       __raw_writel(0x37c7f7ff, RMSTPCR2);
+       __raw_writel(0xffffffff, RMSTPCR3);
+       __raw_writel(0xffe0fffd, RMSTPCR4);
+
        for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
                ret = clk_register(main_clks[k]);