Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007,2008 Nobuhiro Iwamatsu |
| 3 | * |
| 4 | * u-boot/board/r7780mp/lowlevel_init.S |
| 5 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <config.h> |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 10 | #include <asm/processor.h> |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 11 | #include <asm/macro.h> |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 12 | |
| 13 | /* |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 14 | * Board specific low level init code, called _very_ early in the |
| 15 | * startup sequence. Relocation to SDRAM has not happened yet, no |
| 16 | * stack is available, bss section has not been initialised, etc. |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 17 | * |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 18 | * (Note: As no stack is available, no subroutines can be called...). |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 19 | */ |
| 20 | |
| 21 | .global lowlevel_init |
| 22 | |
| 23 | .text |
| 24 | .align 2 |
| 25 | |
| 26 | lowlevel_init: |
| 27 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 28 | write32 CCR_A, CCR_D /* Address of Cache Control Register */ |
| 29 | /* Instruction Cache Invalidate */ |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 30 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 31 | write32 FRQCR_A, FRQCR_D /* Frequency control register */ |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 32 | |
| 33 | /* pin_multi_setting */ |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 34 | write32 BBG_PMMR_A, BBG_PMMR_D_PMSR1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 35 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 36 | write32 BBG_PMSR1_A, BBG_PMSR1_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 37 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 38 | write32 BBG_PMMR_A, BBG_PMMR_D_PMSR2 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 39 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 40 | write32 BBG_PMSR2_A, BBG_PMSR2_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 41 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 42 | write32 BBG_PMMR_A, BBG_PMMR_D_PMSR3 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 43 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 44 | write32 BBG_PMSR3_A, BBG_PMSR3_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 45 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 46 | write32 BBG_PMMR_A, BBG_PMMR_D_PMSR4 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 47 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 48 | write32 BBG_PMSR4_A, BBG_PMSR4_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 49 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 50 | write32 BBG_PMMR_A, BBG_PMMR_D_PMSRG |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 51 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 52 | write32 BBG_PMSRG_A, BBG_PMSRG_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 53 | |
| 54 | /* cpg_setting */ |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 55 | write32 FRQCR_A, FRQCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 56 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 57 | write32 DLLCSR_A, DLLCSR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 58 | |
| 59 | nop |
| 60 | nop |
| 61 | nop |
| 62 | nop |
| 63 | nop |
| 64 | nop |
| 65 | nop |
| 66 | nop |
| 67 | nop |
| 68 | nop |
| 69 | |
| 70 | /* wait 200us */ |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 71 | mov.l REPEAT0_R3, r3 |
| 72 | mov #0, r2 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 73 | repeat0: |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 74 | add #1, r2 |
| 75 | cmp/hs r3, r2 |
| 76 | bf repeat0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 77 | nop |
| 78 | |
| 79 | /* bsc_setting */ |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 80 | write32 MMSELR_A, MMSELR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 81 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 82 | write32 BCR_A, BCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 83 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 84 | write32 CS0BCR_A, CS0BCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 85 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 86 | write32 CS1BCR_A, CS1BCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 87 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 88 | write32 CS2BCR_A, CS2BCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 89 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 90 | write32 CS4BCR_A, CS4BCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 91 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 92 | write32 CS5BCR_A, CS5BCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 93 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 94 | write32 CS6BCR_A, CS6BCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 95 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 96 | write32 CS0WCR_A, CS0WCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 97 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 98 | write32 CS1WCR_A, CS1WCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 99 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 100 | write32 CS2WCR_A, CS2WCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 101 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 102 | write32 CS4WCR_A, CS4WCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 103 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 104 | write32 CS5WCR_A, CS5WCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 105 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 106 | write32 CS6WCR_A, CS6WCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 107 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 108 | write32 CS5PCR_A, CS5PCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 109 | |
Jean-Christophe PLAGNIOL-VILLARD | f7e78f3 | 2008-12-20 19:29:49 +0100 | [diff] [blame] | 110 | write32 CS6PCR_A, CS6PCR_D |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 111 | |
| 112 | /* ddr_setting */ |
| 113 | /* wait 200us */ |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 114 | mov.l REPEAT0_R3, r3 |
| 115 | mov #0, r2 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 116 | repeat1: |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 117 | add #1, r2 |
| 118 | cmp/hs r3, r2 |
| 119 | bf repeat1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 120 | nop |
| 121 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 122 | mov.l MIM_U_A, r0 |
| 123 | mov.l MIM_U_D, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 124 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 125 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 126 | synco |
| 127 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 128 | mov.l MIM_L_A, r0 |
| 129 | mov.l MIM_L_D0, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 130 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 131 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 132 | synco |
| 133 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 134 | mov.l STR_L_A, r0 |
| 135 | mov.l STR_L_D, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 136 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 137 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 138 | synco |
| 139 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 140 | mov.l SDR_L_A, r0 |
| 141 | mov.l SDR_L_D, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 142 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 143 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 144 | synco |
| 145 | |
| 146 | nop |
| 147 | nop |
| 148 | nop |
| 149 | nop |
| 150 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 151 | mov.l SCR_L_A, r0 |
| 152 | mov.l SCR_L_D0, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 153 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 154 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 155 | synco |
| 156 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 157 | mov.l SCR_L_A, r0 |
| 158 | mov.l SCR_L_D1, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 159 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 160 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 161 | synco |
| 162 | |
| 163 | nop |
| 164 | nop |
| 165 | nop |
| 166 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 167 | mov.l EMRS_A, r0 |
| 168 | mov.l EMRS_D, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 169 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 170 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 171 | synco |
| 172 | |
| 173 | nop |
| 174 | nop |
| 175 | nop |
| 176 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 177 | mov.l MRS1_A, r0 |
| 178 | mov.l MRS1_D, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 179 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 180 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 181 | synco |
| 182 | |
| 183 | nop |
| 184 | nop |
| 185 | nop |
| 186 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 187 | mov.l SCR_L_A, r0 |
| 188 | mov.l SCR_L_D2, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 189 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 190 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 191 | synco |
| 192 | |
| 193 | nop |
| 194 | nop |
| 195 | nop |
| 196 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 197 | mov.l SCR_L_A, r0 |
| 198 | mov.l SCR_L_D3, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 199 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 200 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 201 | synco |
| 202 | |
| 203 | nop |
| 204 | nop |
| 205 | nop |
| 206 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 207 | mov.l SCR_L_A, r0 |
| 208 | mov.l SCR_L_D4, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 209 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 210 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 211 | synco |
| 212 | |
| 213 | nop |
| 214 | nop |
| 215 | nop |
| 216 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 217 | mov.l MRS2_A, r0 |
| 218 | mov.l MRS2_D, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 219 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 220 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 221 | synco |
| 222 | |
| 223 | nop |
| 224 | nop |
| 225 | nop |
| 226 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 227 | mov.l SCR_L_A, r0 |
| 228 | mov.l SCR_L_D5, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 229 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 230 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 231 | synco |
| 232 | |
| 233 | /* wait 200us */ |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 234 | mov.l REPEAT0_R1, r3 |
| 235 | mov #0, r2 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 236 | repeat2: |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 237 | add #1, r2 |
| 238 | cmp/hs r3, r2 |
| 239 | bf repeat2 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 240 | |
| 241 | synco |
| 242 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 243 | mov.l MIM_L_A, r0 |
| 244 | mov.l MIM_L_D1, r1 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 245 | synco |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 246 | mov.l r1, @r0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 247 | synco |
| 248 | |
| 249 | rts |
| 250 | nop |
| 251 | .align 4 |
| 252 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 253 | RWTCSR_D_1: .word 0xA507 |
| 254 | RWTCSR_D_2: .word 0xA507 |
| 255 | RWTCNT_D: .word 0x5A00 |
Nobuhiro Iwamatsu | b5d10a1 | 2008-09-18 19:34:36 +0900 | [diff] [blame] | 256 | .align 2 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 257 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 258 | BBG_PMMR_A: .long 0xFF800010 |
| 259 | BBG_PMSR1_A: .long 0xFF800014 |
| 260 | BBG_PMSR2_A: .long 0xFF800018 |
| 261 | BBG_PMSR3_A: .long 0xFF80001C |
| 262 | BBG_PMSR4_A: .long 0xFF800020 |
| 263 | BBG_PMSRG_A: .long 0xFF800024 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 264 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 265 | BBG_PMMR_D_PMSR1: .long 0xffffbffd |
| 266 | BBG_PMSR1_D: .long 0x00004002 |
| 267 | BBG_PMMR_D_PMSR2: .long 0xfc21a7ff |
| 268 | BBG_PMSR2_D: .long 0x03de5800 |
| 269 | BBG_PMMR_D_PMSR3: .long 0xfffffff8 |
| 270 | BBG_PMSR3_D: .long 0x00000007 |
| 271 | BBG_PMMR_D_PMSR4: .long 0xdffdfff9 |
| 272 | BBG_PMSR4_D: .long 0x20020006 |
| 273 | BBG_PMMR_D_PMSRG: .long 0xffffffff |
| 274 | BBG_PMSRG_D: .long 0x00000000 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 275 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 276 | FRQCR_A: .long FRQCR |
| 277 | DLLCSR_A: .long 0xffc40010 |
| 278 | FRQCR_D: .long 0x40233035 |
| 279 | DLLCSR_D: .long 0x00000000 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 280 | |
| 281 | /* for DDR-SDRAM */ |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 282 | MIM_U_A: .long MIM_1 |
| 283 | MIM_L_A: .long MIM_2 |
| 284 | SCR_U_A: .long SCR_1 |
| 285 | SCR_L_A: .long SCR_2 |
| 286 | STR_U_A: .long STR_1 |
| 287 | STR_L_A: .long STR_2 |
| 288 | SDR_U_A: .long SDR_1 |
| 289 | SDR_L_A: .long SDR_2 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 290 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 291 | EMRS_A: .long 0xFEC02000 |
| 292 | MRS1_A: .long 0xFEC00B08 |
| 293 | MRS2_A: .long 0xFEC00308 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 294 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 295 | MIM_U_D: .long 0x00004000 |
| 296 | MIM_L_D0: .long 0x03e80009 |
| 297 | MIM_L_D1: .long 0x03e80209 |
| 298 | SCR_L_D0: .long 0x3 |
| 299 | SCR_L_D1: .long 0x2 |
| 300 | SCR_L_D2: .long 0x2 |
| 301 | SCR_L_D3: .long 0x4 |
| 302 | SCR_L_D4: .long 0x4 |
| 303 | SCR_L_D5: .long 0x0 |
| 304 | STR_L_D: .long 0x000f0000 |
| 305 | SDR_L_D: .long 0x00000400 |
| 306 | EMRS_D: .long 0x0 |
| 307 | MRS1_D: .long 0x0 |
| 308 | MRS2_D: .long 0x0 |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 309 | |
| 310 | /* Cache Controller */ |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 311 | CCR_A: .long CCR |
| 312 | MMUCR_A: .long MMUCR |
| 313 | RWTCNT_A: .long WTCNT |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 314 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 315 | CCR_D: .long 0x0000090b |
| 316 | CCR_D_2: .long 0x00000103 |
| 317 | MMUCR_D: .long 0x00000004 |
| 318 | MSTPCR0_D: .long 0x00001001 |
| 319 | MSTPCR2_D: .long 0xffffffff |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 320 | |
| 321 | /* local Bus State Controller */ |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 322 | MMSELR_A: .long MMSELR |
| 323 | BCR_A: .long BCR |
| 324 | CS0BCR_A: .long CS0BCR |
| 325 | CS1BCR_A: .long CS1BCR |
| 326 | CS2BCR_A: .long CS2BCR |
| 327 | CS4BCR_A: .long CS4BCR |
| 328 | CS5BCR_A: .long CS5BCR |
| 329 | CS6BCR_A: .long CS6BCR |
| 330 | CS0WCR_A: .long CS0WCR |
| 331 | CS1WCR_A: .long CS1WCR |
| 332 | CS2WCR_A: .long CS2WCR |
| 333 | CS4WCR_A: .long CS4WCR |
| 334 | CS5WCR_A: .long CS5WCR |
| 335 | CS6WCR_A: .long CS6WCR |
| 336 | CS5PCR_A: .long CS5PCR |
| 337 | CS6PCR_A: .long CS6PCR |
Yusuke Goda | c133c1f | 2008-03-11 12:55:12 +0900 | [diff] [blame] | 338 | |
| 339 | MMSELR_D: .long 0xA5A50003 |
| 340 | BCR_D: .long 0x00000000 |
| 341 | CS0BCR_D: .long 0x77777770 |
| 342 | CS1BCR_D: .long 0x77777670 |
| 343 | CS2BCR_D: .long 0x77777770 |
| 344 | CS4BCR_D: .long 0x77777770 |
| 345 | CS5BCR_D: .long 0x77777670 |
| 346 | CS6BCR_D: .long 0x77777770 |
| 347 | CS0WCR_D: .long 0x00020006 |
| 348 | CS1WCR_D: .long 0x00232304 |
| 349 | CS2WCR_D: .long 0x7777770F |
| 350 | CS4WCR_D: .long 0x7777770F |
| 351 | CS5WCR_D: .long 0x00101006 |
| 352 | CS6WCR_D: .long 0x77777703 |
| 353 | CS5PCR_D: .long 0x77000000 |
| 354 | CS6PCR_D: .long 0x77000000 |
| 355 | |
Jean-Christophe PLAGNIOL-VILLARD | e443077 | 2008-12-20 19:29:48 +0100 | [diff] [blame] | 356 | REPEAT0_R3: .long 0x00002000 |
| 357 | REPEAT0_R1: .long 0x0000200 |