hilscher_netx50.cfg 1.2 KB

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