2 * Copyright (C) 2004 Sascha Hauer, Synertronixx GmbH
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/arch/imx-regs.h>
16 /* Change PERCLK1DIV to 14 ie 14+1 */
18 ldr r1, =CONFIG_SYS_PCDR_VAL
21 /* set MCU PLL Control Register 0 */
24 ldr r1, =CONFIG_SYS_MPCTL0_VAL
27 /* set mpll restart bit */
43 /* set System PLL Control Register 0 */
46 ldr r1, =CONFIG_SYS_SPCTL0_VAL
49 /* set spll restart bit */
66 ldr r1, =CONFIG_SYS_CSCR_VAL
69 /* I have now read the ARM920 DataSheet back-to-Back, and have stumbled upon
72 * It would appear that from a Cold-Boot the ARM920T enters "FastBus" mode CP15
73 * register 1, this stops it using the output of the PLL and thus runs at the
74 * slow rate. Unless you place the Core into "Asynch" mode, the CPU will never
75 * use the value set in the CM_OSC registers...regardless of what you set it
76 * too! Thus, although i thought i was running at 140MHz, i'm actually running
79 * Slapping this into my bootloader does the trick...
81 * MRC p15,0,r0,c1,c0,0 ; read core configuration register
82 * ORR r0,r0,#0xC0000000 ; set asynchronous clocks and not fastbus mode
83 * MCR p15,0,r0,c1,c0,0 ; write modified value to core configuration
91 ldr r1, =CONFIG_SYS_GPR_A_VAL
95 ldr r1, =CONFIG_SYS_GIUS_A_VAL
98 /* CS3 becomes CS3 by clearing reset default bit 1 in FMCR */
101 ldr r1, =CONFIG_SYS_FMCR_VAL
105 ldr r1, =CONFIG_SYS_CS0U_VAL
109 ldr r1, =CONFIG_SYS_CS0L_VAL
113 ldr r1, =CONFIG_SYS_CS1U_VAL
117 ldr r1, =CONFIG_SYS_CS1L_VAL
121 ldr r1, =CONFIG_SYS_CS2U_VAL
125 ldr r1, =CONFIG_SYS_CS2L_VAL
129 ldr r1, =CONFIG_SYS_CS3U_VAL
133 ldr r1, =CONFIG_SYS_CS3L_VAL
137 ldr r1, =CONFIG_SYS_CS4U_VAL
141 ldr r1, =CONFIG_SYS_CS4L_VAL
145 ldr r1, =CONFIG_SYS_CS5U_VAL
149 ldr r1, =CONFIG_SYS_CS5L_VAL
155 ldr r1, =PRECHARGE_CMD
159 ldr r1, =0x0 /* Issue Precharge all Command */
163 ldr r1, =AUTOREFRESH_CMD
167 ldr r1, =0x0 /* Issue AutoRefresh Command */
181 ldr r0, =0x08223000 /* CAS Latency 2 */
182 ldr r1, =0x0 /* Issue Mode Register Command, Burst Length = 8 */
186 ldr r1, =0x810a8200 /* Set to Normal Mode CAS 2 */