You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1.3 KiB

  1. # Configuration for the ST SPEAr320 CPU board
  2. # EVAL_SPEAr320CPU Rev. 2.0
  3. # http://www.st.com/spear
  4. #
  5. # Date: 2011-11-18
  6. # Author: Antonio Borneo <borneo.antonio@gmail.com>
  7. # The standard board has JTAG SRST not connected.
  8. # This script targets such boards using quirky code to bypass the issue.
  9. source [find mem_helper.tcl]
  10. source [find target/spear3xx.cfg]
  11. source [find chip/st/spear/spear3xx_ddr.tcl]
  12. source [find chip/st/spear/spear3xx.tcl]
  13. arm7_9 dcc_downloads enable
  14. arm7_9 fast_memory_access enable
  15. # Serial NOR on SMI CS0. 8Mbyte.
  16. set _FLASHNAME1 $_CHIPNAME.snor
  17. flash bank $_FLASHNAME1 stmsmi 0xf8000000 0 0 0 $_TARGETNAME
  18. if { [info exists BOARD_HAS_SRST] } {
  19. # Modified board has SRST on JTAG connector
  20. reset_config trst_and_srst separate srst_gates_jtag \
  21. trst_push_pull srst_open_drain
  22. } else {
  23. # Standard board has no SRST on JTAG connector
  24. reset_config trst_only separate srst_gates_jtag trst_push_pull
  25. source [find chip/st/spear/quirk_no_srst.tcl]
  26. }
  27. $_TARGETNAME configure -event reset-init { spear320cpu_init }
  28. if { [info exists DDR_CHIPS] } {
  29. set _DDR_CHIPS $DDR_CHIPS
  30. } else {
  31. set _DDR_CHIPS 1
  32. }
  33. proc spear320cpu_init {} {
  34. global _DDR_CHIPS
  35. reg pc 0xffff0020; # loop forever
  36. sp3xx_clock_default
  37. sp3xx_common_init
  38. sp3xx_ddr_init "mt47h64m16_3_333_cl5_async" $_DDR_CHIPS
  39. sp320_init
  40. }