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