wdenk | e221174 | 2002-11-02 23:30:20 +0000 | [diff] [blame] | 1 | |
| 2 | This file contains basic information on the port of U-Boot to TQM8260. |
| 3 | All the changes fit in the common U-Boot infrastructure, providing a |
| 4 | new TQM8260-specific entry in makefiles. To build U-Boot for TQM8260, |
| 5 | type "make TQM8260_config", edit the "include/config_TQM8260.h" file |
| 6 | if necessary, then type "make". |
| 7 | |
| 8 | |
| 9 | Common file modifications: |
| 10 | -------------------------- |
| 11 | |
| 12 | The following common files have been modified by this project: |
| 13 | (starting from the ppcboot-0.9.3/ directory) |
| 14 | |
| 15 | MAKEALL - TQM8260 entry added |
| 16 | Makefile - TQM8260_config entry added |
| 17 | cpu/mpc8260/Makefile - soft_i2c.o module added |
| 18 | cpu/mpc8260/ether_scc.c - TQM8260-specific definitions added, an obvious |
| 19 | bug fixed (fcr -> scr) |
| 20 | cpu/mpc8260/ether_fcc.c - TQM8260-specific definitions added |
| 21 | include/flash.h - added definitions for the AM29LV640D Flash chip |
| 22 | |
| 23 | |
| 24 | New files: |
| 25 | ---------- |
| 26 | |
| 27 | The following new files have been added by this project: |
| 28 | (starting from the ppcboot-0.9.3/ directory) |
| 29 | |
| 30 | board/tqm8260/ - board-specific directory |
| 31 | board/tqm8260/Makefile - board-specific makefile |
| 32 | board/tqm8260/config.mk - config file |
| 33 | board/tqm8260/flash.c - flash driver (for AM29LV640D) |
| 34 | board/tqm8260/ppcboot.lds - linker script |
| 35 | board/tqm8260/tqm8260.c - ioport and memory initialization |
| 36 | cpu/mpc8260/soft_i2c.c - software i2c EEPROM driver |
| 37 | include/config_TQM8260.h - main configuration file |
| 38 | |
| 39 | |
| 40 | New configuration options: |
| 41 | -------------------------- |
| 42 | |
| 43 | CONFIG_TQM8260 |
| 44 | |
| 45 | Main board-specific option (should be defined for TQM8260). |
| 46 | |
| 47 | CONFIG_82xx_CONS_SMC1 |
| 48 | |
| 49 | If defined, SMC1 will be used as the console |
| 50 | |
| 51 | CONFIG_82xx_CONS_SMC2 |
| 52 | |
| 53 | If defined, SMC2 will be used as the console |
| 54 | |
| 55 | CFG_INIT_LOCAL_SDRAM |
| 56 | |
| 57 | If defined, the SDRAM on the local bus will be initialized and |
| 58 | mapped at BR2. |
| 59 | |
| 60 | |
| 61 | Acceptance criteria tests: |
| 62 | -------------------------- |
| 63 | |
| 64 | The following tests have been conducted to validate the port of U-Boot |
| 65 | to TQM8260: |
| 66 | |
| 67 | 1. Operation on serial console: |
| 68 | |
| 69 | With the CONFIG_82xx_CONS_SMC1 option defined in the main configuration file, |
| 70 | the U-Boot output appeared on the serial terminal connected to COM1 as |
| 71 | follows: |
| 72 | |
| 73 | ------------------------------------------------------------------------------ |
| 74 | => help |
| 75 | go - start application at address 'addr' |
| 76 | run - run commands in an environment variable |
| 77 | bootm - boot application image from memory |
| 78 | bootp - boot image via network using BootP/TFTP protocol |
| 79 | tftpboot- boot image via network using TFTP protocol |
| 80 | and env variables ipaddr and serverip |
| 81 | rarpboot- boot image via network using RARP/TFTP protocol |
| 82 | bootd - boot default, i.e., run 'bootcmd' |
| 83 | loads - load S-Record file over serial line |
| 84 | loadb - load binary file over serial line (kermit mode) |
| 85 | md - memory display |
| 86 | mm - memory modify (auto-incrementing) |
| 87 | nm - memory modify (constant address) |
| 88 | mw - memory write (fill) |
| 89 | cp - memory copy |
| 90 | cmp - memory compare |
| 91 | crc32 - checksum calculation |
| 92 | base - print or set address offset |
| 93 | printenv- print environment variables |
| 94 | setenv - set environment variables |
| 95 | saveenv - save environment variables to persistent storage |
| 96 | protect - enable or disable FLASH write protection |
| 97 | erase - erase FLASH memory |
| 98 | flinfo - print FLASH memory information |
| 99 | bdinfo - print Board Info structure |
| 100 | iminfo - print header information for application image |
| 101 | coninfo - print console devices and informations |
| 102 | eeprom - EEPROM sub-system |
| 103 | loop - infinite loop on address range |
| 104 | mtest - simple RAM test |
| 105 | icache - enable or disable instruction cache |
| 106 | dcache - enable or disable data cache |
| 107 | reset - Perform RESET of the CPU |
| 108 | echo - echo args to console |
| 109 | version - print monitor version |
| 110 | help - print online help |
| 111 | ? - alias for 'help' |
| 112 | => |
| 113 | ------------------------------------------------------------------------------ |
| 114 | |
| 115 | |
| 116 | 2. Flash driver operation |
| 117 | |
| 118 | The following sequence was performed to test the "flinfo" command: |
| 119 | |
| 120 | ------------------------------------------------------------------------------ |
| 121 | => flinfo |
| 122 | |
| 123 | Bank # 1: AMD 29LV640D (64 M, uniform sector) |
| 124 | Size: 32 MB in 128 Sectors |
| 125 | Sector Start Addresses: |
| 126 | 40000000 40040000 (RO) 40080000 400C0000 40100000 |
| 127 | 40140000 40180000 401C0000 40200000 40240000 |
| 128 | 40280000 402C0000 40300000 40340000 40380000 |
| 129 | 403C0000 40400000 40440000 40480000 404C0000 |
| 130 | 40500000 40540000 40580000 405C0000 40600000 |
| 131 | 40640000 40680000 406C0000 40700000 40740000 |
| 132 | 40780000 407C0000 40800000 40840000 40880000 |
| 133 | 408C0000 40900000 40940000 40980000 409C0000 |
| 134 | 40A00000 40A40000 40A80000 40AC0000 40B00000 |
| 135 | 40B40000 40B80000 40BC0000 40C00000 40C40000 |
| 136 | 40C80000 40CC0000 40D00000 40D40000 40D80000 |
| 137 | 40DC0000 40E00000 40E40000 40E80000 40EC0000 |
| 138 | 40F00000 40F40000 40F80000 40FC0000 41000000 |
| 139 | 41040000 41080000 410C0000 41100000 41140000 |
| 140 | 41180000 411C0000 41200000 41240000 41280000 |
| 141 | 412C0000 41300000 41340000 41380000 413C0000 |
| 142 | 41400000 41440000 41480000 414C0000 41500000 |
| 143 | 41540000 41580000 415C0000 41600000 41640000 |
| 144 | 41680000 416C0000 41700000 41740000 41780000 |
| 145 | 417C0000 41800000 41840000 41880000 418C0000 |
| 146 | 41900000 41940000 41980000 419C0000 41A00000 |
| 147 | 41A40000 41A80000 41AC0000 41B00000 41B40000 |
| 148 | 41B80000 41BC0000 41C00000 41C40000 41C80000 |
| 149 | 41CC0000 41D00000 41D40000 41D80000 41DC0000 |
| 150 | 41E00000 41E40000 41E80000 41EC0000 41F00000 |
| 151 | 41F40000 41F80000 41FC0000 |
| 152 | => |
| 153 | ------------------------------------------------------------------------------ |
| 154 | |
| 155 | |
| 156 | The following sequence was performed to test the erase command: |
| 157 | |
| 158 | ------------------------------------------------------------------------------ |
| 159 | => cp 0 40080000 10 |
| 160 | Copy to Flash... done |
| 161 | => erase 40080000 400bffff |
| 162 | Erase Flash from 0x40080000 to 0x400bffff |
| 163 | .. done |
| 164 | Erased 1 sectors |
| 165 | => md 40080000 |
| 166 | 40080000: ffffffff ffffffff ffffffff ffffffff ................ |
| 167 | 40080010: ffffffff ffffffff ffffffff ffffffff ................ |
| 168 | 40080020: ffffffff ffffffff ffffffff ffffffff ................ |
| 169 | 40080030: ffffffff ffffffff ffffffff ffffffff ................ |
| 170 | 40080040: ffffffff ffffffff ffffffff ffffffff ................ |
| 171 | 40080050: ffffffff ffffffff ffffffff ffffffff ................ |
| 172 | 40080060: ffffffff ffffffff ffffffff ffffffff ................ |
| 173 | 40080070: ffffffff ffffffff ffffffff ffffffff ................ |
| 174 | 40080080: ffffffff ffffffff ffffffff ffffffff ................ |
| 175 | 40080090: ffffffff ffffffff ffffffff ffffffff ................ |
| 176 | 400800a0: ffffffff ffffffff ffffffff ffffffff ................ |
| 177 | 400800b0: ffffffff ffffffff ffffffff ffffffff ................ |
| 178 | 400800c0: ffffffff ffffffff ffffffff ffffffff ................ |
| 179 | 400800d0: ffffffff ffffffff ffffffff ffffffff ................ |
| 180 | 400800e0: ffffffff ffffffff ffffffff ffffffff ................ |
| 181 | 400800f0: ffffffff ffffffff ffffffff ffffffff ................ |
| 182 | => cp 0 40080000 10 |
| 183 | Copy to Flash... done |
| 184 | => erase 1:2 |
| 185 | Erase Flash Sectors 2-2 in Bank # 1 |
| 186 | .. done |
| 187 | => md 40080000 |
| 188 | 40080000: ffffffff ffffffff ffffffff ffffffff ................ |
| 189 | 40080010: ffffffff ffffffff ffffffff ffffffff ................ |
| 190 | 40080020: ffffffff ffffffff ffffffff ffffffff ................ |
| 191 | 40080030: ffffffff ffffffff ffffffff ffffffff ................ |
| 192 | 40080040: ffffffff ffffffff ffffffff ffffffff ................ |
| 193 | 40080050: ffffffff ffffffff ffffffff ffffffff ................ |
| 194 | 40080060: ffffffff ffffffff ffffffff ffffffff ................ |
| 195 | 40080070: ffffffff ffffffff ffffffff ffffffff ................ |
| 196 | 40080080: ffffffff ffffffff ffffffff ffffffff ................ |
| 197 | 40080090: ffffffff ffffffff ffffffff ffffffff ................ |
| 198 | 400800a0: ffffffff ffffffff ffffffff ffffffff ................ |
| 199 | 400800b0: ffffffff ffffffff ffffffff ffffffff ................ |
| 200 | 400800c0: ffffffff ffffffff ffffffff ffffffff ................ |
| 201 | 400800d0: ffffffff ffffffff ffffffff ffffffff ................ |
| 202 | 400800e0: ffffffff ffffffff ffffffff ffffffff ................ |
| 203 | 400800f0: ffffffff ffffffff ffffffff ffffffff ................ |
| 204 | => cp 0 40080000 10 |
| 205 | Copy to Flash... done |
| 206 | => cp 0 400c0000 10 |
| 207 | Copy to Flash... done |
| 208 | => erase 1:2-3 |
| 209 | Erase Flash Sectors 2-3 in Bank # 1 |
| 210 | ... done |
| 211 | => md 40080000 |
| 212 | 40080000: ffffffff ffffffff ffffffff ffffffff ................ |
| 213 | 40080010: ffffffff ffffffff ffffffff ffffffff ................ |
| 214 | 40080020: ffffffff ffffffff ffffffff ffffffff ................ |
| 215 | 40080030: ffffffff ffffffff ffffffff ffffffff ................ |
| 216 | 40080040: ffffffff ffffffff ffffffff ffffffff ................ |
| 217 | 40080050: ffffffff ffffffff ffffffff ffffffff ................ |
| 218 | 40080060: ffffffff ffffffff ffffffff ffffffff ................ |
| 219 | 40080070: ffffffff ffffffff ffffffff ffffffff ................ |
| 220 | 40080080: ffffffff ffffffff ffffffff ffffffff ................ |
| 221 | 40080090: ffffffff ffffffff ffffffff ffffffff ................ |
| 222 | 400800a0: ffffffff ffffffff ffffffff ffffffff ................ |
| 223 | 400800b0: ffffffff ffffffff ffffffff ffffffff ................ |
| 224 | 400800c0: ffffffff ffffffff ffffffff ffffffff ................ |
| 225 | 400800d0: ffffffff ffffffff ffffffff ffffffff ................ |
| 226 | 400800e0: ffffffff ffffffff ffffffff ffffffff ................ |
| 227 | 400800f0: ffffffff ffffffff ffffffff ffffffff ................ |
| 228 | => md 400c0000 |
| 229 | 400c0000: ffffffff ffffffff ffffffff ffffffff ................ |
| 230 | 400c0010: ffffffff ffffffff ffffffff ffffffff ................ |
| 231 | 400c0020: ffffffff ffffffff ffffffff ffffffff ................ |
| 232 | 400c0030: ffffffff ffffffff ffffffff ffffffff ................ |
| 233 | 400c0040: ffffffff ffffffff ffffffff ffffffff ................ |
| 234 | 400c0050: ffffffff ffffffff ffffffff ffffffff ................ |
| 235 | 400c0060: ffffffff ffffffff ffffffff ffffffff ................ |
| 236 | 400c0070: ffffffff ffffffff ffffffff ffffffff ................ |
| 237 | 400c0080: ffffffff ffffffff ffffffff ffffffff ................ |
| 238 | 400c0090: ffffffff ffffffff ffffffff ffffffff ................ |
| 239 | 400c00a0: ffffffff ffffffff ffffffff ffffffff ................ |
| 240 | 400c00b0: ffffffff ffffffff ffffffff ffffffff ................ |
| 241 | 400c00c0: ffffffff ffffffff ffffffff ffffffff ................ |
| 242 | 400c00d0: ffffffff ffffffff ffffffff ffffffff ................ |
| 243 | 400c00e0: ffffffff ffffffff ffffffff ffffffff ................ |
| 244 | 400c00f0: ffffffff ffffffff ffffffff ffffffff ................ |
| 245 | => |
| 246 | ------------------------------------------------------------------------------ |
| 247 | |
| 248 | |
| 249 | The following sequence was performed to test the Flash programming commands: |
| 250 | |
| 251 | ------------------------------------------------------------------------------ |
| 252 | => erase 40080000 400bffff |
| 253 | Erase Flash from 0x40080000 to 0x400bffff |
| 254 | .. done |
| 255 | Erased 1 sectors |
| 256 | => cp 0 40080000 10 |
| 257 | Copy to Flash... done |
| 258 | => md 0 |
| 259 | 00000000: 00000000 00000104 61100200 01000000 ........a....... |
| 260 | 00000010: 00000000 00000000 81140000 82000100 ................ |
| 261 | 00000020: 01080000 00004000 22800000 00000600 ......@."....... |
| 262 | 00000030: 00200800 00000000 10000100 00008000 . .............. |
| 263 | 00000040: 00812000 00000200 00020000 80000000 .. ............. |
| 264 | 00000050: 00028001 00001000 00040400 00000200 ................ |
| 265 | 00000060: 20480000 00000000 20090000 00142000 H...... ..... . |
| 266 | 00000070: 00000000 00004000 24210000 10000000 ......@.$!...... |
| 267 | 00000080: 02440002 10000000 00200008 00000000 .D....... ...... |
| 268 | 00000090: 02440900 00000000 30a40000 00004400 .D......0.....D. |
| 269 | 000000a0: 04420800 00000000 00000040 00020000 .B.........@.... |
| 270 | 000000b0: 05020000 00100000 00060000 00000000 ................ |
| 271 | 000000c0: 00400000 00000000 00080000 00040000 .@.............. |
| 272 | 000000d0: 10400000 00800004 00000000 00000200 .@.............. |
| 273 | 000000e0: 80890000 00010004 00080000 00000020 ............... |
| 274 | 000000f0: 08000000 10000000 00010000 00000000 ................ |
| 275 | => md 40080000 |
| 276 | 40080000: 00000000 00000104 61100200 01000000 ........a....... |
| 277 | 40080010: 00000000 00000000 81140000 82000100 ................ |
| 278 | 40080020: 01080000 00004000 22800000 00000600 ......@."....... |
| 279 | 40080030: 00200800 00000000 10000100 00008000 . .............. |
| 280 | 40080040: ffffffff ffffffff ffffffff ffffffff ................ |
| 281 | 40080050: ffffffff ffffffff ffffffff ffffffff ................ |
| 282 | 40080060: ffffffff ffffffff ffffffff ffffffff ................ |
| 283 | 40080070: ffffffff ffffffff ffffffff ffffffff ................ |
| 284 | 40080080: ffffffff ffffffff ffffffff ffffffff ................ |
| 285 | 40080090: ffffffff ffffffff ffffffff ffffffff ................ |
| 286 | 400800a0: ffffffff ffffffff ffffffff ffffffff ................ |
| 287 | 400800b0: ffffffff ffffffff ffffffff ffffffff ................ |
| 288 | 400800c0: ffffffff ffffffff ffffffff ffffffff ................ |
| 289 | 400800d0: ffffffff ffffffff ffffffff ffffffff ................ |
| 290 | 400800e0: ffffffff ffffffff ffffffff ffffffff ................ |
| 291 | 400800f0: ffffffff ffffffff ffffffff ffffffff ................ |
| 292 | => |
| 293 | ------------------------------------------------------------------------------ |
| 294 | |
| 295 | |
| 296 | The following sequence was performed to test storage of the environment |
| 297 | variables in Flash: |
| 298 | |
| 299 | ------------------------------------------------------------------------------ |
| 300 | => setenv foo bar |
| 301 | => saveenv |
| 302 | Un-Protected 1 sectors |
| 303 | Erasing Flash... |
| 304 | .. done |
| 305 | Erased 1 sectors |
| 306 | Saving Environment to Flash... |
| 307 | Protected 1 sectors |
| 308 | => reset |
| 309 | ... |
| 310 | => printenv |
| 311 | bootdelay=CONFIG_BOOTDELAY |
| 312 | baudrate=9600 |
| 313 | ipaddr=192.168.4.7 |
| 314 | serverip=192.168.4.1 |
| 315 | ethaddr=66:55:44:33:22:11 |
| 316 | foo=bar |
| 317 | stdin=serial |
| 318 | stdout=serial |
| 319 | stderr=serial |
| 320 | |
| 321 | Environment size: 170/262140 bytes |
| 322 | => |
| 323 | ------------------------------------------------------------------------------ |
| 324 | |
| 325 | |
| 326 | The following sequence was performed to test image download and run over |
| 327 | Ethernet interface (both interfaces were tested): |
| 328 | |
| 329 | ------------------------------------------------------------------------------ |
| 330 | => tftpboot 40000 hello_world.bin |
| 331 | ARP broadcast 1 |
| 332 | TFTP from server 192.168.2.2; our IP address is 192.168.2.7 |
| 333 | Filename 'hello_world.bin'. |
| 334 | Load address: 0x40000 |
| 335 | Loading: ############# |
| 336 | done |
| 337 | Bytes transferred = 65912 (10178 hex) |
| 338 | => go 40004 |
| 339 | ## Starting application at 0x00040004 ... |
| 340 | Hello World |
| 341 | argc = 1 |
| 342 | argv[0] = "40004" |
| 343 | argv[1] = "<NULL>" |
| 344 | Hit any key to exit ... |
| 345 | |
| 346 | ## Application terminated, rc = 0x0 |
| 347 | => |
| 348 | ------------------------------------------------------------------------------ |
| 349 | |
| 350 | |
| 351 | The following sequence was performed to test eeprom read/write commands: |
| 352 | |
| 353 | ------------------------------------------------------------------------------ |
| 354 | => md 40000 |
| 355 | 00040000: 00018148 9421ffe0 7c0802a6 bf61000c ...H.!..|....a.. |
| 356 | 00040010: 90010024 48000005 7fc802a6 801effe8 ...$H........... |
| 357 | 00040020: 7fc0f214 7c7f1b78 813f004c 7c9c2378 ....|..x.?.L|.#x |
| 358 | 00040030: 807e8000 7cbd2b78 80090010 3b600000 .~..|.+x....;`.. |
| 359 | 00040040: 7c0803a6 4e800021 813f004c 7f84e378 |...N..!.?.L...x |
| 360 | 00040050: 807e8004 80090010 7c0803a6 4e800021 .~......|...N..! |
| 361 | 00040060: 7c1be000 4181003c 80bd0000 813f004c |...A..<.....?.L |
| 362 | 00040070: 3bbd0004 2c050000 40820008 80be8008 ;...,...@....... |
| 363 | 00040080: 80090010 7f64db78 807e800c 3b7b0001 .....d.x.~..;{.. |
| 364 | 00040090: 7c0803a6 4e800021 7c1be000 4081ffcc |...N..!|...@... |
| 365 | 000400a0: 813f004c 807e8010 80090010 7c0803a6 .?.L.~......|... |
| 366 | 000400b0: 4e800021 813f004c 80090004 7c0803a6 N..!.?.L....|... |
| 367 | 000400c0: 4e800021 2c030000 4182ffec 813f004c N..!,...A....?.L |
| 368 | 000400d0: 80090000 7c0803a6 4e800021 813f004c ....|...N..!.?.L |
| 369 | 000400e0: 807e8014 80090010 7c0803a6 4e800021 .~......|...N..! |
| 370 | 000400f0: 38600000 80010024 7c0803a6 bb61000c 8`.....$|....a.. |
| 371 | => eeprom write 40000 0 40 |
| 372 | |
| 373 | EEPROM write: addr 00040000 off 0000 count 64 ... done |
| 374 | => mw 50000 0 1000 |
| 375 | => eeprom read 50000 0 40 |
| 376 | |
| 377 | EEPROM read: addr 00050000 off 0000 count 64 ... done |
| 378 | => md 50000 |
| 379 | 00050000: 00018148 9421ffe0 7c0802a6 bf61000c ...H.!..|....a.. |
| 380 | 00050010: 90010024 48000005 7fc802a6 801effe8 ...$H........... |
| 381 | 00050020: 7fc0f214 7c7f1b78 813f004c 7c9c2378 ....|..x.?.L|.#x |
| 382 | 00050030: 807e8000 7cbd2b78 80090010 3b600000 .~..|.+x....;`.. |
| 383 | 00050040: 00000000 00000000 00000000 00000000 ................ |
| 384 | 00050050: 00000000 00000000 00000000 00000000 ................ |
| 385 | 00050060: 00000000 00000000 00000000 00000000 ................ |
| 386 | 00050070: 00000000 00000000 00000000 00000000 ................ |
| 387 | 00050080: 00000000 00000000 00000000 00000000 ................ |
| 388 | 00050090: 00000000 00000000 00000000 00000000 ................ |
| 389 | 000500a0: 00000000 00000000 00000000 00000000 ................ |
| 390 | 000500b0: 00000000 00000000 00000000 00000000 ................ |
| 391 | 000500c0: 00000000 00000000 00000000 00000000 ................ |
| 392 | 000500d0: 00000000 00000000 00000000 00000000 ................ |
| 393 | 000500e0: 00000000 00000000 00000000 00000000 ................ |
| 394 | 000500f0: 00000000 00000000 00000000 00000000 ................ |
| 395 | => |
| 396 | ------------------------------------------------------------------------------ |
| 397 | |
| 398 | |
| 399 | Patch per Mon, 06 Aug 2001 17:57:27: |
| 400 | |
| 401 | - upgraded Flash support (added support for the following chips: |
| 402 | AM29LV800T/B, AM29LV160T/B, AM29DL322T/B, AM29DL323T/B) |
| 403 | - BCR tweakage for the 8260 bus mode |
| 404 | - SIUMCR tweakage enabling the MI interrupt (IRQ7) |
| 405 | |
| 406 | To simplify switching between the bus modes, a new configuration |
| 407 | option (CONFIG_BUSMODE_60x) has been added to the "config_TQM8260.h" |
| 408 | file. If it is defined, BCR will be configured for the 60x mode, |
| 409 | otherwise - for the 8260 mode. |
| 410 | |
| 411 | Concerning the SIUMCR modification: it's hard to predict whether it |
| 412 | will induce any problems on the other (60x mode) board. However, the |
| 413 | problems (if they appear) should be easy to notice - if the board |
| 414 | does not boot, it's most likely caused by the DPPC configuration in |
| 415 | SIUMCR. |