README.txt 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. HCU5 configuration details and startup sequence
  2. (C) Copyright 2007 Netstal Maschinen AG
  3. Niklaus Giger (Niklaus.Giger@netstal.com)
  4. TODO:
  5. -----
  6. - Fix error: Waiting for PHY auto negotiation to complete..... TIMEOUT !
  7. - Does not occur if both EMAC are connected
  8. - Fix RTS/CTS problem (HW?)
  9. CONFIG_SERIAL_MULTI/CONFIG_SERIAL_SOFTWARE_FIFO hangs after
  10. Switching to interrupt driven serial input mode
  11. - Make vxWorks start from u-boot. Possible reasons
  12. - Does vxWorks need an entry for the Machine Check interrupt like this
  13. tlbentry( 0x40000000, SZ_256M, 0, 1, AC_R|AC_W|AC_X|SA_G|SA_I ) ?
  14. Caveats:
  15. --------
  16. Errata CHIP_8: Incorrect Write to DDR SDRAM. (was not applied to sequoia.c)
  17. see hcu5.c.
  18. Memory Bank 0 -- Flash chip
  19. ---------------------------
  20. 0xfff00000 - 0xffffffff
  21. The flash chip is really only 512Kbytes, but the high address bit of
  22. the 1Meg region is ignored, so the flash is replicated through the
  23. region. Thus, this is consistent with a flash base address 0xfff80000.
  24. The placement at the end is to be consistent with reset behavior,
  25. where the processor itself initially uses this bus to load the branch
  26. vector and start running.
  27. On-Chip Memory
  28. --------------
  29. 0xe0010000- 0xe0013fff CFG_OCM_BASE
  30. The 440EPx includes a 16K on-chip memory that can be placed however
  31. software chooses.
  32. Internal Peripherals
  33. --------------------
  34. 0xef600300 - 0xef6008ff
  35. These are scattered various peripherals internal to the PPC440EPX
  36. chip.
  37. Chip-Select 2: Flash Memory
  38. ---------------------------
  39. Not used
  40. Chip-Select 3: CAN Interface
  41. ----------------------------
  42. 0xc800000: 2 Intel 82527 CAN-Controller
  43. Chip-Select 4: IMC-bus standard
  44. -------------------------------
  45. 0xcc00000: Netstal specific IO-Bus
  46. Chip-Select 5: IMC-bus fast (inactive)
  47. --------------------------------------
  48. 0xce00000: Netstal specific IO-Bus (fast, but not yet used)
  49. Memory Bank 1 -- DDR2
  50. -------------------------------------
  51. 0x00000000 - 0xfffffff # Default 256 MB
  52. PCI ??
  53. USB ??
  54. Only USB_STORAGE is enabled to load vxWorks
  55. from a memory stick.
  56. System-LEDs ??? (Analog zu HCU4 ???)
  57. Startup sequence
  58. ----------------
  59. (cpu/ppc4xx/resetvec.S)
  60. depending on configs option
  61. call _start_440 _start_pci oder _start
  62. (cpu/ppc4xx/start.S)
  63. _start_440:
  64. initialize register like
  65. CCR0
  66. debug
  67. setup interrupt vectors
  68. configure cache regions
  69. clear and setup TLB
  70. enable internal RAM
  71. jump start_ram
  72. which in turn will jump to start
  73. _start:
  74. Clear and set up some registers.
  75. Debug setup
  76. Setup the internal SRAM
  77. Setup the stack in internal SRAM
  78. setup stack pointer (r1)
  79. setup GOT
  80. call cpu_init_f /* run low-level CPU init code (from Flash) */
  81. call cpu_init_f
  82. board_init_f: (lib_ppc\board.c)
  83. init_sequence defines a list of function to be called
  84. board_early_init_f: (board/netstal/hcu5/hcu5.c)
  85. We are using Bootstrap-Option A
  86. if CPR0_ICFG_RLI_MASK == 0 then set some registers and reboot
  87. Setup the GPIO pins
  88. Setup the interrupt controller polarities, triggers, etc.
  89. Ethernet, PCI, USB enable
  90. setup BOOT FLASH (Chip timing)
  91. init_baudrate,
  92. serial_init
  93. checkcpu
  94. misc_init_f #ifdef
  95. init_func_i2c #ifdef
  96. post_init_f #ifdef
  97. init_func_ram -> calls init_dram board/netstal/hcu5/sdram.c
  98. (EYE function removed!!)
  99. test_dram call
  100. * Reserve memory at end of RAM for (top down in that order):
  101. * - kernel log buffer
  102. * - protected RAM
  103. * - LCD framebuffer
  104. * - monitor code
  105. * - board info struct
  106. Save local variables to board info struct
  107. call relocate_code() does not return
  108. relocate_code: (cpu/ppc4xx/start.S)
  109. -------------------------------------------------------
  110. From now on our copy is in RAM and we will run from there,
  111. starting with board_init_r
  112. -------------------------------------------------------
  113. board_init_r: (lib_ppc\board.c)
  114. setup bd function pointers
  115. trap_init
  116. flash_init: (board/netstal/hcu5/flash.c)
  117. /* setup for u-boot erase, update */
  118. setup bd flash info
  119. cpu_init_r: (cpu/ppc4xx/cpu_init.c)
  120. peripheral chip select in using defines like
  121. CFG_EBC_PB0A, CFG_EBC_PB0C from hcu5.h
  122. mem_malloc_init
  123. malloc_bin_reloc
  124. spi_init (r or f)??? (CFG_ENV_IS_IN_EEPROM)
  125. env_relocated
  126. misc_init_r(bd): (board/netstal/hcu5.c)
  127. ethaddr mit serial number ergänzen
  128. Then we will somehow go into the command loop
  129. Most of the HW specific code for the HCU5 may be found in
  130. include/configs/hcu5.h
  131. board/netstal/hcu5/*
  132. cpu/ppc4xx/*
  133. lib_ppc/*
  134. include/ppc440.h
  135. Drivers for serial etc are found under drivers/
  136. Don't ask question if you did not look at the README !!
  137. Most CFG_* and CONFIG_* switches are mentioned/explained there.