diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/Kconfig | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sram34xx.S | 19 |
2 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 7309aab305a9..0cd25ceadb43 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -128,3 +128,15 @@ config OMAP3_EMU | |||
128 | help | 128 | help |
129 | Say Y here to enable debugging hardware of omap3 | 129 | Say Y here to enable debugging hardware of omap3 |
130 | 130 | ||
131 | config OMAP3_SDRC_AC_TIMING | ||
132 | bool "Enable SDRC AC timing register changes" | ||
133 | depends on ARCH_OMAP3 && ARCH_OMAP34XX | ||
134 | default n | ||
135 | help | ||
136 | If you know that none of your system initiators will attempt to | ||
137 | access SDRAM during CORE DVFS, select Y here. This should boost | ||
138 | SDRAM performance at lower CORE OPPs. There are relatively few | ||
139 | users who will wish to say yes at this point - almost everyone will | ||
140 | wish to say no. Selecting yes without understanding what is | ||
141 | going on could result in system crashes; | ||
142 | |||
diff --git a/arch/arm/mach-omap2/sram34xx.S b/arch/arm/mach-omap2/sram34xx.S index 82aa4a3d160c..de99ba2a57ab 100644 --- a/arch/arm/mach-omap2/sram34xx.S +++ b/arch/arm/mach-omap2/sram34xx.S | |||
@@ -91,8 +91,19 @@ | |||
91 | * new SDRC_ACTIM_CTRL_B_1 register contents | 91 | * new SDRC_ACTIM_CTRL_B_1 register contents |
92 | * new SDRC_MR_1 register value | 92 | * new SDRC_MR_1 register value |
93 | * | 93 | * |
94 | * If the param SDRC_RFR_CTRL_1 is 0, the parameters | 94 | * If the param SDRC_RFR_CTRL_1 is 0, the parameters are not programmed into |
95 | * are not programmed into the SDRC CS1 registers | 95 | * the SDRC CS1 registers |
96 | * | ||
97 | * NOTE: This code no longer attempts to program the SDRC AC timing and MR | ||
98 | * registers. This is because the code currently cannot ensure that all | ||
99 | * L3 initiators (e.g., sDMA, IVA, DSS DISPC, etc.) are not accessing the | ||
100 | * SDRAM when the registers are written. If the registers are changed while | ||
101 | * an initiator is accessing SDRAM, memory can be corrupted and/or the SDRC | ||
102 | * may enter an unpredictable state. In the future, the intent is to | ||
103 | * re-enable this code in cases where we can ensure that no initiators are | ||
104 | * touching the SDRAM. Until that time, users who know that their use case | ||
105 | * can satisfy the above requirement can enable the CONFIG_OMAP3_SDRC_AC_TIMING | ||
106 | * option. | ||
96 | */ | 107 | */ |
97 | ENTRY(omap3_sram_configure_core_dpll) | 108 | ENTRY(omap3_sram_configure_core_dpll) |
98 | stmfd sp!, {r1-r12, lr} @ store regs to stack | 109 | stmfd sp!, {r1-r12, lr} @ store regs to stack |
@@ -219,6 +230,7 @@ configure_sdrc: | |||
219 | ldr r12, omap_sdrc_rfr_ctrl_0_val @ fetch value from SRAM | 230 | ldr r12, omap_sdrc_rfr_ctrl_0_val @ fetch value from SRAM |
220 | ldr r11, omap3_sdrc_rfr_ctrl_0 @ fetch addr from SRAM | 231 | ldr r11, omap3_sdrc_rfr_ctrl_0 @ fetch addr from SRAM |
221 | str r12, [r11] @ store | 232 | str r12, [r11] @ store |
233 | #ifdef CONFIG_OMAP3_SDRC_AC_TIMING | ||
222 | ldr r12, omap_sdrc_actim_ctrl_a_0_val | 234 | ldr r12, omap_sdrc_actim_ctrl_a_0_val |
223 | ldr r11, omap3_sdrc_actim_ctrl_a_0 | 235 | ldr r11, omap3_sdrc_actim_ctrl_a_0 |
224 | str r12, [r11] | 236 | str r12, [r11] |
@@ -228,11 +240,13 @@ configure_sdrc: | |||
228 | ldr r12, omap_sdrc_mr_0_val | 240 | ldr r12, omap_sdrc_mr_0_val |
229 | ldr r11, omap3_sdrc_mr_0 | 241 | ldr r11, omap3_sdrc_mr_0 |
230 | str r12, [r11] | 242 | str r12, [r11] |
243 | #endif | ||
231 | ldr r12, omap_sdrc_rfr_ctrl_1_val | 244 | ldr r12, omap_sdrc_rfr_ctrl_1_val |
232 | cmp r12, #0 @ if SDRC_RFR_CTRL_1 is 0, | 245 | cmp r12, #0 @ if SDRC_RFR_CTRL_1 is 0, |
233 | beq skip_cs1_prog @ do not program cs1 params | 246 | beq skip_cs1_prog @ do not program cs1 params |
234 | ldr r11, omap3_sdrc_rfr_ctrl_1 | 247 | ldr r11, omap3_sdrc_rfr_ctrl_1 |
235 | str r12, [r11] | 248 | str r12, [r11] |
249 | #ifdef CONFIG_OMAP3_SDRC_AC_TIMING | ||
236 | ldr r12, omap_sdrc_actim_ctrl_a_1_val | 250 | ldr r12, omap_sdrc_actim_ctrl_a_1_val |
237 | ldr r11, omap3_sdrc_actim_ctrl_a_1 | 251 | ldr r11, omap3_sdrc_actim_ctrl_a_1 |
238 | str r12, [r11] | 252 | str r12, [r11] |
@@ -242,6 +256,7 @@ configure_sdrc: | |||
242 | ldr r12, omap_sdrc_mr_1_val | 256 | ldr r12, omap_sdrc_mr_1_val |
243 | ldr r11, omap3_sdrc_mr_1 | 257 | ldr r11, omap3_sdrc_mr_1 |
244 | str r12, [r11] | 258 | str r12, [r11] |
259 | #endif | ||
245 | skip_cs1_prog: | 260 | skip_cs1_prog: |
246 | ldr r12, [r11] @ posted-write barrier for SDRC | 261 | ldr r12, [r11] @ posted-write barrier for SDRC |
247 | bx lr | 262 | bx lr |