README.alaska8220 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. Freescale Alaska MPC8220 board
  2. ==============================
  3. TsiChung Liew(Tsi-Chung.Liew@freescale.com)
  4. Created 9/21/04
  5. ===========================================
  6. Changed files:
  7. ==============
  8. - Makefile added MPC8220 and Alaska8220_config
  9. - MAKEALL added MPC8220 and Alaska8220
  10. - README added CONFIG_MPC8220, Alaska8220_config
  11. - common/cmd_bdinfo.c added board information members for MPC8220
  12. - common/cmd_bootm.c added clocks for MPC8220 in do_bootm_linux()
  13. - include/common.h added CONFIG_MPC8220
  14. - include/asm-ppc/u-boot.h added board information members for MPC8220
  15. - include/asm-ppc/global_data.h added global variables - inp_clk, pci_clk,
  16. vco_clk, pev_clk, flb_clk, and bExtUart
  17. - lib_ppc/board.c added CONFIG_MPC8220 support
  18. - net/eth.c added FEC support for MPC8220
  19. Added files:
  20. ============
  21. - board/alaska directory for Alaska MPC8220
  22. - board/alaska/alaska.c Alaska dram and BATs setup
  23. - board/alaska/extserial.c external serial (debug card serial) support
  24. - board/alaska/flash.c Socket (AMD) and Onboard (INTEL) flash support
  25. - board/alaska/serial.c to determine which int/ext serial to use
  26. - board/alaska/Makefile Makefile
  27. - board/alaska/config.mk config make
  28. - board/alaska/u-boot.lds Linker description
  29. - cpu/mpc8220/dma.h multi-channel dma header file
  30. - cpu/mpc8220/dramSetup.h dram setup header file
  31. - cpu/mpc8220/fec.h MPC8220 FEC header file
  32. - cpu/mpc8220/cpu.c cpu specific code
  33. - cpu/mpc8220/cpu_init.c Flexbus ChipSelect and Mux pins setup
  34. - cpu/mpc8220/dramSetup.c MPC8220 DDR SDRAM setup
  35. - cpu/mpc8220/fec.c MPC8220 FEC driver
  36. - cpu/mpc8220/i2c.c MPC8220 I2C driver
  37. - cpu/mpc8220/interrupts.c interrupt support (not enable)
  38. - cpu/mpc8220/loadtask.c load dma
  39. - cpu/mpc8220/speed.c system, pci, flexbus, pev, and cpu clock
  40. - cpu/mpc8220/traps.c exception
  41. - cpu/mpc8220/uart.c MPC8220 UART driver
  42. - cpu/mpc8220/Makefile Makefile
  43. - cpu/mpc8220/config.mk config make
  44. - cpu/mpc8220/fec_dma_task.S MPC8220 FEC multi-channel dma program
  45. - cpu/mpc8220/io.S io functions
  46. - cpu/mpc8220/start.S start up
  47. - include/mpc8220.h
  48. - include/asm-ppc/immap_8220.h
  49. - include/configs/Alaska8220.h
  50. 1. SWITCH SETTINGS
  51. ==================
  52. 1.1 SW1: 0 - Boot from Socket Flash (AMD) or 1 - Onboard Flash (INTEL)
  53. SW2: 0 - Select MPC8220 UART or 1 - Debug Card UART
  54. SW3: unsed
  55. SW4: 0 - 1284 or 1 - FEC1
  56. SW5: 0 - PEV or 1 - FEC2
  57. 2. MEMORY MAP UNDER U-BOOT AND LINUX KERNEL
  58. ===========================================
  59. 2.1. For the initial bringup, we adopted a consistent memory scheme between u-boot and
  60. linux kernel, you can customize it based on your system requirements:
  61. DDR: 0x00000000-0x1fffffff (max 512MB)
  62. MBAR: 0xf0000000-0xf0027fff (128KB)
  63. CPLD: 0xf1000000-0xf103ffff (256KB)
  64. FPGA: 0xf2000000-0xf203ffff (256KB)
  65. Flash: 0xfe000000-0xffffffff (max 32MB)
  66. 3. DEFINITIONS AND COMPILATION
  67. ==============================
  68. 3.1 Explanation on NEW definitions in include/configs/alaska8220.h
  69. CONFIG_MPC8220 MPC8220 specific
  70. CONFIG_ALASKA8220 Alaska board specific
  71. CONFIG_SYS_MPC8220_CLKIN Define Alaska Input Clock
  72. CONFIG_PSC_CONSOLE Enable MPC8220 UART
  73. CONFIG_EXTUART_CONSOLE Enable External 16552 UART
  74. CONFIG_SYS_AMD_BOOT To determine the u-boot is booted from AMD or Intel
  75. CONFIG_SYS_MBAR MBAR base address
  76. CONFIG_SYS_DEFAULT_MBAR Reset MBAR base address
  77. 3.2 Compilation
  78. export CROSS_COMPILE=cross-compile-prefix
  79. cd u-boot-1-1-x
  80. make distclean
  81. make Alaska8220_config
  82. make
  83. 4. SCREEN DUMP
  84. ==============
  85. 4.1 Alaska MPC8220 board
  86. Boot from AMD (NOTE: May not show exactly the same)
  87. U-Boot 1.1.1 (Sep 22 2004 - 22:14:41)
  88. CPU: MPC8220 (JTAG ID 1640301d) at 300 MHz
  89. Bus 120 MHz, CPU 300 MHz, PCI 30 MHz, VCO 480 MHz
  90. Board: Alaska MPC8220 Evaluation Board
  91. I2C: 93 kHz, ready
  92. DRAM: 256 MB
  93. Reserving 167k for U-Boot at: 0ffd6000
  94. FLASH: 16.5 MB
  95. *** Warning - bad CRC, using default environment
  96. In: serial
  97. Out: serial
  98. Err: serial
  99. Net: FEC ETHERNET
  100. => flinfo
  101. Bank # 1: INTEL 28F128J3A
  102. Size: 8 MB in 64 Sectors
  103. Sector Start Addresses:
  104. FE000000 FE020000 FE040000 FE060000 FE080000
  105. FE0A0000 FE0C0000 FE0E0000 FE100000 FE120000
  106. FE140000 FE160000 FE180000 FE1A0000 FE1C0000
  107. FE1E0000 FE200000 FE220000 FE240000 FE260000
  108. FE280000 FE2A0000 FE2C0000 FE2E0000 FE300000
  109. FE320000 FE340000 FE360000 FE380000 FE3A0000
  110. FE3C0000 FE3E0000 FE400000 FE420000 FE440000
  111. FE460000 FE480000 FE4A0000 FE4C0000 FE4E0000
  112. FE500000 FE520000 FE540000 FE560000 FE580000
  113. FE5A0000 FE5C0000 FE5E0000 FE600000 FE620000
  114. FE640000 FE660000 FE680000 FE6A0000 FE6C0000
  115. FE6E0000 FE700000 FE720000 FE740000 FE760000
  116. FE780000 FE7A0000 FE7C0000 FE7E0000
  117. Bank # 2: INTEL 28F128J3A
  118. Size: 8 MB in 64 Sectors
  119. Sector Start Addresses:
  120. FE800000 FE820000 FE840000 FE860000 FE880000
  121. FE8A0000 FE8C0000 FE8E0000 FE900000 FE920000
  122. FE940000 FE960000 FE980000 FE9A0000 FE9C0000
  123. FE9E0000 FEA00000 FEA20000 FEA40000 FEA60000
  124. FEA80000 FEAA0000 FEAC0000 FEAE0000 FEB00000
  125. FEB20000 FEB40000 FEB60000 FEB80000 FEBA0000
  126. FEBC0000 FEBE0000 FEC00000 FEC20000 FEC40000
  127. FEC60000 FEC80000 FECA0000 FECC0000 FECE0000
  128. FED00000 FED20000 FED40000 FED60000 FED80000
  129. FEDA0000 FEDC0000 FEDE0000 FEE00000 FEE20000
  130. FEE40000 FEE60000 FEE80000 FEEA0000 FEEC0000
  131. FEEE0000 FEF00000 (RO) FEF20000 (RO) FEF40000 FEF60000
  132. FEF80000 FEFA0000 FEFC0000 FEFE0000 (RO)
  133. Bank # 3: AMD AMD29F040B
  134. Size: 0 MB in 7 Sectors
  135. Sector Start Addresses:
  136. FFF00000 (RO) FFF10000 (RO) FFF20000 (RO) FFF30000 FFF40000
  137. FFF50000 FFF60000
  138. Bank # 4: AMD AMD29F040B
  139. Size: 0 MB in 1 Sectors
  140. Sector Start Addresses:
  141. FFF70000 (RO)
  142. => bdinfo
  143. memstart = 0xF0009800
  144. memsize = 0x10000000
  145. flashstart = 0xFFF00000
  146. flashsize = 0x01080000
  147. flashoffset = 0x00025000
  148. sramstart = 0xF0020000
  149. sramsize = 0x00008000
  150. bootflags = 0x00000001
  151. intfreq = 300 MHz
  152. busfreq = 120 MHz
  153. inpfreq = 30 MHz
  154. flbfreq = 30 MHz
  155. pcifreq = 30 MHz
  156. vcofreq = 480 MHz
  157. pevfreq = 81 MHz
  158. ethaddr = 00:E0:0C:BC:E0:60
  159. eth1addr = 00:E0:0C:BC:E0:61
  160. IP addr = 192.162.1.2
  161. baudrate = 115200 bps
  162. => printenv
  163. bootargs=root=/dev/ram rw
  164. bootdelay=5
  165. baudrate=115200
  166. ethaddr=00:e0:0c:bc:e0:60
  167. eth1addr=00:e0:0c:bc:e0:61
  168. ipaddr=192.162.1.2
  169. serverip=192.162.1.1
  170. gatewayip=192.162.1.1
  171. netmask=255.255.255.0
  172. hostname=Alaska
  173. stdin=serial
  174. stdout=serial
  175. stderr=serial
  176. ethact=FEC ETHERNET
  177. Environment size: 268/65532 bytes
  178. => setenv ipaddr 192.160.1.2
  179. => setenv serverip 192.160.1.1
  180. => setenv gatewayip 192.160.1.1
  181. => saveenv
  182. Saving Environment to Flash...
  183. .
  184. Un-Protected 1 sectors
  185. Erasing Flash...
  186. Erasing sector 0 ... done
  187. Erased 1 sectors
  188. Writing to Flash... done
  189. .
  190. Protected 1 sectors
  191. => tftp 0x10000 linux.elf
  192. Using FEC ETHERNET device
  193. TFTP from server 192.160.1.1; our IP address is 192.160.1.2; sending through gateway 192.160.1.1
  194. Filename 'linux.elf'.
  195. Load address: 0x10000
  196. Loading: invalid RARP header
  197. #################################################################
  198. #################################################################
  199. #################################################################
  200. #################################################################
  201. #################################################################
  202. #################################################################
  203. #################################################################
  204. #################################################################
  205. ##################################################
  206. done
  207. Bytes transferred = 2917494 (2c8476 hex)
  208. => bootelf
  209. Loading .text @ 0x00a00000 (23820 bytes)
  210. Loading .data @ 0x00a06000 (2752512 bytes)
  211. Clearing .bss @ 0x00ca6000 (12764 bytes)
  212. ## Starting application at 0x00a00000 ...
  213. Collect some entropy from RAM........done
  214. loaded at: 00A00000 00CA91DC
  215. zimage at: 00A06A93 00AD7756
  216. initrd at: 00AD8000 00CA5565
  217. avail ram: 00CAA000 014AA000
  218. Linux/PPC load: ip=off console=ttyS0,115200
  219. Uncompressing Linux...done.
  220. Now booting the kernel
  221. Total memory in system: 256 MB
  222. Memory BAT mapping: BAT2=256Mb, BAT3=0Mb, residual: 0Mb
  223. Linux version 2.4.21-rc1 (r61688@bluesocks.sps.mot.com) (gcc version 3.3.1) #17 Wed Sep 8 11:49:16 CDT 2004
  224. Motorola Alaska port (C) 2003 Motorola, Inc.
  225. CPLD rev 3
  226. CPLD switches 0x1b
  227. Set Pin Mux for FEC1
  228. Set Pin Mux for FEC2
  229. Alaska Pin Multiplexing:
  230. Port Configuration Register 0 = 0
  231. Port Configuration Register 1 = 0
  232. Port Configuration Register 2 = 0
  233. Port Configuration Register 3 = 50000000
  234. Port Configuration Register 3 - PCI = 51400180
  235. Setup Alaska FPGA PIC:
  236. Interrupt Enable Register *(u32) = 0
  237. Interrupt Status Register = 2f0000
  238. Interrupt Enable Register in_be32 = 0
  239. Interrupt Status Register = 2f0000
  240. Interrupt Enable Register in_le32 = 0
  241. Interrupt Status Register = 2f00
  242. Interrupt Enable Register readl = 0
  243. Interrupt Status Register = 2f00
  244. Interrupt Enable Register = 0
  245. Interrupt Status Register = 2f0000
  246. Setup Alaska PCI Controller:
  247. On node 0 totalpages: 65536
  248. zone(0): 65536 pages.
  249. zone(1): 0 pages.
  250. zone(2): 0 pages.
  251. Kernel command line: ip=off console=ttyS0,115200
  252. Using XLB clock (120.00 MHz) to set up decrementer
  253. Calibrating delay loop... 199.88 BogoMIPS
  254. Memory: 254792k available (1476k kernel code, 708k data, 228k init, 0k highmem)
  255. Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
  256. Inode cache hash table entries: 16384 (order: 5, 131072 bytes)
  257. Mount cache hash table entries: 512 (order: 0, 4096 bytes)
  258. Buffer-cache hash table entries: 16384 (order: 4, 65536 bytes)
  259. Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
  260. POSIX conformance testing by UNIFIX
  261. PCI: Probing PCI hardware
  262. PCI: (pcibios_init) Global-Hose = 0xc029d000
  263. Scanning bus 00
  264. Fixups for bus 00
  265. Bus scan for 00 returning with max=00
  266. PCI: (pcibios_init) finished pci_scan_bus(hose->first_busno = 0, hose->ops = c01a1a74, hose = c029d000)
  267. PCI: (pcibios_init) PCI Bus Count = 0 =?= Next Bus# = 1
  268. PCI: (pcibios_init@pci_fixup_irqs) finished machine dependent PCI interrupt routing!
  269. PCI: bridge rsrc 81000000..81ffffff (100), parent c01a7f88
  270. PCI: bridge rsrc 84000000..87ffffff (200), parent c01a7fa4
  271. PCI: (pcibios_init) finished allocating and assigning resources!
  272. initDma!
  273. Using 90 DMA buffer descriptors
  274. descUsed f0023600, descriptors f002360c freeSram f0024140
  275. unmask SDMA tasks: 0xf0008018 = 0x6f000000
  276. Linux NET4.0 for Linux 2.4
  277. Based upon Swansea University Computer Society NET3.039
  278. Initializing RT netlink socket
  279. Starting kswapd
  280. Journalled Block Device driver loaded
  281. JFFS version 1.0, (C) 1999, 2000 Axis Communications AB
  282. JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.
  283. pty: 256 Unix98 ptys configured
  284. tracek: Copyright (C) Motorola, 2003.
  285. Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
  286. ttyS00 at 0xf1001008 (irq = 73) is a ST16650
  287. ttyS01 at 0xf1001010 (irq = 74) is a ST16650
  288. elp-fpanel: Copyright (C) Motorola, 2003.
  289. fpanel: fpanelWait timeout
  290. elp-engine: Copyright (C) Motorola, 2003.
  291. Video disabled due to configuration switch 4
  292. Alpine 1284 driver: Copyright (C) Motorola, 2003.
  293. 1284 disabled due to configuration switch 5
  294. Alpine USB driver: Copyright (C) Motorola, 2003.
  295. OK
  296. USB: Descriptor download completed OK
  297. enable_irq(41) unbalanced
  298. enable_irq(75) unbalanced
  299. elp-dmaram: Copyright (C) Motorola, 2003.
  300. Total memory in system: 256 MB
  301. elp_dmaram: offset is 0x10000000, size is 0
  302. Xicor NVRAM driver: Copyright (C) Motorola, 2003.
  303. elp-video: Copyright (C) Motorola, 2003.
  304. Video disabled due to configuration switch 4
  305. elp-pfm: Copyright (C) Motorola, 2003.
  306. paddle: Copyright (C) Motorola, 2001, present.
  307. RAMDISK driver initialized: 16 RAM disks of 12288K size 1024 blocksize
  308. loop: loaded (max 8 devices)
  309. PPP generic driver version 2.4.2
  310. PPP Deflate Compression module registered
  311. Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
  312. ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
  313. init_alaska_mtd: chip probing count 0
  314. cfi_cmdset_0001: Erase suspend on write enabled
  315. Using buffer write method
  316. init_alaska_mtd: bank1, name:ALASKA0, size:16777216bytes
  317. ALASKA flash0: Using Static image partition definition
  318. Creating 3 MTD partitions on "ALASKA0":
  319. 0x00000000-0x00280000 : "kernel"
  320. 0x00280000-0x00fe0000 : "user"
  321. 0x00fe0000-0x01000000 : "signature"
  322. mgt_fec_module_init
  323. mgt_fec_init()
  324. mgt_fec_init
  325. mgt_init_fec_dev(0xc05f6000,0)
  326. dev c05f6000 fec_priv c05f6160 fec f0009000
  327. mgt_init_fec_dev(0xc05f6800,1)
  328. dev c05f6800 fec_priv c05f6960 fec f0009800
  329. NET4: Linux TCP/IP 1.0 for NET4.0
  330. IP Protocols: ICMP, UDP, TCP, IGMP
  331. IP: routing cache hash table of 2048 buckets, 16Kbytes
  332. TCP: Hash tables configured (established 16384 bind 32768)
  333. NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
  334. RAMDISK: Compressed image found at block 0
  335. Freeing initrd memory: 1845k freed
  336. JFFS: Trying to mount a non-mtd device.
  337. VFS: Mounted root (romfs filesystem) readonly.
  338. Freeing unused kernel memory: 228k init
  339. INIT: version 2.78 booting
  340. INIT: Entering runlevel: 1
  341. "Space, a great big place of unknown stuff." -Dexter, for our MotD.
  342. [01/Jan/1970:00:00:01 +0000] boa: server version Boa/0.94.8.3
  343. [01/Jan/1970:00:00:01 +0000] boa: server built Sep 7 2004 at 17:40:55.
  344. [01/Jan/1970:00:00:01 +0000] boa: starting server pid=28, port 80
  345. Mounting flash filesystem, will take a minute...
  346. /etc/rc: line 30: /dev/lp0: No such devish-2.05b#
  347. sh-2.05b# ifup eth0
  348. client (v0.9.9-pre) started
  349. adapter index 2
  350. adapter hardware address 00:e0:0c:bc:e0:60
  351. execle'ing /usr/share/udhcpc/default.script
  352. /sbin/ifconfig eth0
  353. eth0 Link encap:Ethernet HWaddr 00:E0:0C:BC:E0:60
  354. BROADCAST MULTICAST MTU:1500 Metric:1
  355. mgt_fec_open
  356. Rfec request irq
  357. X fec_open: rcv_ring_size 8, xmt_ring_size 8
  358. packmgt_fec_open(): call netif_start_queue()
  359. ets:0 errors:0 dropped:0 overruns:0 frame:0
  360. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  361. collisions:0 txqueuelen:100
  362. RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
  363. Base address:0x9000
  364. /sbin/ifconfig eth0 up
  365. entering raw listen mode
  366. Opening raw socket on ifindex 2
  367. adding option 0x35
  368. adding option 0x3d
  369. adding option 0x3c
  370. Sending discover...
  371. Waiting on select...
  372. unrelated/bogus packet
  373. Waiting on select...
  374. oooooh!!! got some!
  375. adding option 0x35
  376. adding option 0x3d
  377. adding option 0x3c
  378. adding option 0x32
  379. adding option 0x36
  380. Sending select for 163.12.48.146...
  381. Waiting on select...
  382. oooooh!!! got some!
  383. Waiting on select...
  384. oooooh!!! got some!
  385. Lease of 163.12.48.146 obtained, lease time 345600
  386. execle'ing /usr/share/udhcpc/default.script
  387. /sbin/ifconfig eth0 163.12.48.146 netmask 255.255.254.0
  388. /sbin/ifconfig eth0 up
  389. deleting routers
  390. /sbin/route del default
  391. /sbin/route add default gw 163.12.49.254 dev eth0
  392. adding dns 163.12.252.230
  393. adding dns 192.55.22.4
  394. adding dns 192.5.249.4
  395. entering none listen mode
  396. sh-2.05b#
  397. 5. REPROGRAM U-BOOT
  398. ===================
  399. 5.1 Reprogram u-boot (boot from AMD)
  400. 1. Unprotect the boot sector
  401. => protect off bank 3
  402. 2. Download new u-boot binary file
  403. => tftp 0x10000 u-boot.bin
  404. 3. Erase bootsector (max 7 sectors)
  405. => erase 0xfff00000 0xfff6ffff
  406. 4. Program the u-boot to flash
  407. => cp.b 0x10000 0xfff00000
  408. 5. Reset for the new u-boot to take place
  409. => reset
  410. 5.2 Reprogram u-boot (boot from AMD program at INTEL)
  411. 1. Unprotect the boot sector
  412. => protect off bank 2
  413. 2. Download new u-boot binary file
  414. => tftp 0x10000 u-boot.bin
  415. 3. Erase bootsector (max 7 sectors)
  416. => erase 0xfef00000 0xfefdffff
  417. 4. Program the u-boot to flash
  418. => cp.b 0x10000 0xfef00000
  419. 5. Reset for the new u-boot to take place
  420. => reset
  421. 5.3 Reprogram u-boot (boot from INTEL)
  422. 1. Unprotect the boot sector
  423. => protect off bank 4
  424. 2. Download new u-boot binary file
  425. => tftp 0x10000 u-boot.bin
  426. 3. Erase bootsector (max 7 sectors)
  427. => erase 0xfff00000 0xfffdffff
  428. 4. Program the u-boot to flash
  429. => cp.b 0x10000 0xfff00000
  430. 5. Reset for the new u-boot to take place
  431. => reset
  432. 5.4 Reprogram u-boot (boot from INTEL program at AMD)
  433. 1. Unprotect the boot sector
  434. => protect off bank 1
  435. 2. Download new u-boot binary file
  436. => tftp 0x10000 u-boot.bin
  437. 3. Erase bootsector (max 7 sectors)
  438. => erase 0xfe080000 0xfe0effff
  439. 4. Program the u-boot to flash
  440. => cp.b 0x10000 0xfe080000
  441. 5. Reset for the new u-boot to take place
  442. => reset