README.TQM8260 17 KB

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