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