snps_hsdk.cfg 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # SPDX-License-Identifier: GPL-2.0-or-later
  2. # Copyright (C) 2019,2020 Synopsys, Inc.
  3. # Anton Kolesov <anton.kolesov@synopsys.com>
  4. # Didin Evgeniy <didin@synopsys.com>
  5. #
  6. # HS Development Kit SoC.
  7. #
  8. # Contains quad-core ARC HS38.
  9. #
  10. source [find cpu/arc/hs.tcl]
  11. set _coreid 0
  12. set _dbgbase [expr {$_coreid << 13}]
  13. # CHIPNAME will be used to choose core family (600, 700 or EM). As far as
  14. # OpenOCD is concerned EM and HS are identical.
  15. set _CHIPNAME arc-em
  16. # OpenOCD discovers JTAG TAPs in reverse order.
  17. # ARC HS38 core 4
  18. set _TARGETNAME $_CHIPNAME.cpu4
  19. jtag newtap $_CHIPNAME cpu4 -irlen 4 -ircapture 0x1 -expected-id 0x200c24b1
  20. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  21. $_TARGETNAME configure -coreid $_coreid
  22. $_TARGETNAME configure -dbgbase $_dbgbase
  23. # Flush L2$.
  24. $_TARGETNAME configure -event reset-assert "arc_hs_reset $_TARGETNAME"
  25. set _coreid [expr {$_coreid + 1}]
  26. set _dbgbase [expr {$_coreid << 13}]
  27. arc_hs_init_regs
  28. # Enable L2 cache support for core 4.
  29. $_TARGETNAME arc cache l2 auto 1
  30. # ARC HS38 core 3
  31. set _TARGETNAME $_CHIPNAME.cpu3
  32. jtag newtap $_CHIPNAME cpu3 -irlen 4 -ircapture 0x1 -expected-id 0x200824b1
  33. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  34. $_TARGETNAME configure -coreid $_coreid
  35. $_TARGETNAME configure -dbgbase $_dbgbase
  36. $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
  37. set _coreid [expr {$_coreid + 1}]
  38. set _dbgbase [expr {$_coreid << 13}]
  39. arc_hs_init_regs
  40. # Enable L2 cache support for core 3.
  41. $_TARGETNAME arc cache l2 auto 1
  42. # ARC HS38 core 2
  43. set _TARGETNAME $_CHIPNAME.cpu2
  44. jtag newtap $_CHIPNAME cpu2 -irlen 4 -ircapture 0x1 -expected-id 0x200424b1
  45. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  46. $_TARGETNAME configure -coreid $_coreid
  47. $_TARGETNAME configure -dbgbase $_dbgbase
  48. $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
  49. set _coreid [expr {$_coreid + 1}]
  50. set _dbgbase [expr {$_coreid << 13}]
  51. arc_hs_init_regs
  52. # Enable L2 cache support for core 2.
  53. $_TARGETNAME arc cache l2 auto 1
  54. # ARC HS38 core 1
  55. set _TARGETNAME $_CHIPNAME.cpu1
  56. jtag newtap $_CHIPNAME cpu1 -irlen 4 -ircapture 0x1 -expected-id 0x200024b1
  57. target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
  58. $_TARGETNAME configure -coreid $_coreid
  59. $_TARGETNAME configure -dbgbase $_dbgbase
  60. $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
  61. set _coreid [expr {$_coreid + 1}]
  62. set _dbgbase [expr {0x00000000 | ($_coreid << 13)}]
  63. arc_hs_init_regs
  64. # Enable L2 cache support for core 1.
  65. $_TARGETNAME arc cache l2 auto 1