aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2009-05-12 19:27:09 -0400
committerpaul <paul@twilight.(none)>2009-05-12 19:27:09 -0400
commitd75d9e73cd59127a4d926a2bf5e9cdcc90f033d6 (patch)
tree4c16d44d6fcf91df6d8b14c92ee389a89b958f7f /arch/arm
parent69d4255b139274f71faca28bc93bb49da8eb1a91 (diff)
OMAP3 clock: add interconnect barriers to CORE DPLL M2 change
Where necessary, add interconnect barriers to force posted writes to complete before continuing. Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/sram34xx.S9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S
index f4a356d5d2d8..8d524f305633 100644
--- a/arch/arm/mach-omap2/sram34xx.S
+++ b/arch/arm/mach-omap2/sram34xx.S
@@ -66,22 +66,23 @@ unlock_dll:
66 ldr r4, omap3_sdrc_dlla_ctrl 66 ldr r4, omap3_sdrc_dlla_ctrl
67 ldr r5, [r4] 67 ldr r5, [r4]
68 orr r5, r5, #0x4 68 orr r5, r5, #0x4
69 str r5, [r4] 69 str r5, [r4] @ (no OCP barrier needed)
70 bx lr 70 bx lr
71lock_dll: 71lock_dll:
72 ldr r4, omap3_sdrc_dlla_ctrl 72 ldr r4, omap3_sdrc_dlla_ctrl
73 ldr r5, [r4] 73 ldr r5, [r4]
74 bic r5, r5, #0x4 74 bic r5, r5, #0x4
75 str r5, [r4] 75 str r5, [r4] @ (no OCP barrier needed)
76 bx lr 76 bx lr
77sdram_in_selfrefresh: 77sdram_in_selfrefresh:
78 ldr r4, omap3_sdrc_power @ read the SDRC_POWER register 78 ldr r4, omap3_sdrc_power @ read the SDRC_POWER register
79 ldr r5, [r4] @ read the contents of SDRC_POWER 79 ldr r5, [r4] @ read the contents of SDRC_POWER
80 orr r5, r5, #0x40 @ enable self refresh on idle req 80 orr r5, r5, #0x40 @ enable self refresh on idle req
81 str r5, [r4] @ write back to SDRC_POWER register 81 str r5, [r4] @ write back to SDRC_POWER register
82 ldr r5, [r4] @ posted-write barrier for SDRC
82 ldr r4, omap3_cm_iclken1_core @ read the CM_ICLKEN1_CORE reg 83 ldr r4, omap3_cm_iclken1_core @ read the CM_ICLKEN1_CORE reg
83 ldr r5, [r4] 84 ldr r5, [r4]
84 bic r5, r5, #0x2 @ disable iclk bit for SRDC 85 bic r5, r5, #0x2 @ disable iclk bit for SDRC
85 str r5, [r4] 86 str r5, [r4]
86wait_sdrc_idle: 87wait_sdrc_idle:
87 ldr r4, omap3_cm_idlest1_core 88 ldr r4, omap3_cm_idlest1_core
@@ -97,6 +98,7 @@ configure_core_dpll:
97 and r5, r5, r6 98 and r5, r5, r6
98 orr r5, r5, r3, lsl #0x1B @ r3 contains the M2 val 99 orr r5, r5, r3, lsl #0x1B @ r3 contains the M2 val
99 str r5, [r4] 100 str r5, [r4]
101 ldr r5, [r4] @ posted-write barrier for CM
100 mov r5, #0x800 @ wait for the clock to stabilise 102 mov r5, #0x800 @ wait for the clock to stabilise
101 cmp r3, #2 103 cmp r3, #2
102 bne wait_clk_stable 104 bne wait_clk_stable
@@ -152,6 +154,7 @@ configure_sdrc:
152 str r1, [r4] 154 str r1, [r4]
153 ldr r4, omap3_sdrc_actim_ctrlb 155 ldr r4, omap3_sdrc_actim_ctrlb
154 str r2, [r4] 156 str r2, [r4]
157 ldr r2, [r4] @ posted-write barrier for SDRC
155 bx lr 158 bx lr
156 159
157omap3_sdrc_power: 160omap3_sdrc_power: