README.txt 4.5 KB

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