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.
 
 
 
 
 
 

51 lines
1.2 KiB

  1. ################################################################################
  2. # Author: Michael Trensch (MTrensch@googlemail.com)
  3. ################################################################################
  4. #Hilscher netX 50 CPU
  5. if { [info exists CHIPNAME] } {
  6. set _CHIPNAME $CHIPNAME
  7. } else {
  8. set _CHIPNAME netx50
  9. }
  10. if { [info exists ENDIAN] } {
  11. set _ENDIAN $ENDIAN
  12. } else {
  13. set _ENDIAN little
  14. }
  15. if { [info exists CPUTAPID] } {
  16. set _CPUTAPID $CPUTAPID
  17. } else {
  18. set _CPUTAPID 0x25966021
  19. }
  20. # jtag scan chain
  21. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  22. # that TAP is associated with a target
  23. set _TARGETNAME $_CHIPNAME.cpu
  24. target create $_TARGETNAME arm966e -endian $_ENDIAN -chain-position $_TARGETNAME
  25. # On netX50 SDRAM is not accessible at offset 0xDEAD0-0xDEADF as it is busy from
  26. # DMA controller at init. This function will setup a dummy DMA to free this ares
  27. # and must be called before using SDRAM
  28. proc sdram_fix { } {
  29. mww 0x1c005830 0x00000001
  30. mww 0x1c005104 0xBFFFFFFC
  31. mww 0x1c00510c 0x00480001
  32. mww 0x1c005110 0x00000001
  33. sleep 100
  34. mww 0x1c00510c 0
  35. mww 0x1c005110 0
  36. mww 0x1c005830 0x00000000
  37. puts "SDRAM Fix executed!"
  38. }