mt6735m-fpga.cmm 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ;*****************************************************************************
  2. ; Copyright Statement:
  3. ; --------------------
  4. ; This software is protected by Copyright and the information contained
  5. ; herein is confidential. The software may not be copied and the information
  6. ; contained herein may not be used or disclosed except with the written
  7. ; permission of MediaTek Inc. (C) 2011
  8. ;
  9. ;*****************************************************************************
  10. ;;================================================
  11. ;; PURPOSE: FPGA Bring Up
  12. ;; CREATE_DATE: 2014/08/28
  13. ;; NOTE:
  14. ;;================================================
  15. ; Specify Core Number
  16. ;=================================================
  17. &NR_CPUS=1
  18. ; cluster 0 corebase: 0x8007000, 0x8007200, 0x8007400, 0x8007600
  19. ; cluster 1 corebase: 0x8009000, 0x8009200, 0x8009400, 0x8009600
  20. ;=================================================
  21. ; Initialize CPU
  22. ;=================================================
  23. &WDT_TEST=0
  24. if &WDT_TEST==0
  25. (
  26. RESET
  27. SYSTEM.OPTION ENRESET ON
  28. )
  29. SYSTEM.RESET
  30. SYSTEM.OPTION ENRESET ON
  31. SYSTEM.OPTION RESBREAK OFF
  32. SYSTEM.OPTION WAITRESET OFF
  33. SYSTEM.JTAGCLOCK 10.MHz;
  34. ;SYSTEM.CPU CortexA7MPCore
  35. SYStem.CPU CORTEXA53;
  36. ;R-T Memory Access
  37. SYSTEM.MULTICORE MEMORYACCESSPORT 0
  38. SYSTEM.MULTICORE DEBUGACCESSPORT 1
  39. ;SYSTEM.MULTICORE COREBASE APB:0x80070000
  40. ;Setting Core debug register access
  41. if &NR_CPUS==1
  42. (
  43. SYStem.CONFIG CORENUMBER 1;
  44. SYStem.CONFIG COREBASE 0x80810000;
  45. SYStem.CONFIG CTIBASE 0x80820000;
  46. )
  47. else
  48. (
  49. SYSTEM.CONFIG CORENUMBER 2;
  50. SYSTEM.CONFIG COREBASE 0x80810000 0x80910000;
  51. SYStem.CONFIG CTIBASE 0x80820000 0x80920000;
  52. )
  53. ;=================================================
  54. ; Attach and Stop CPU
  55. ;=================================================
  56. SYStem.Up
  57. wait 200.us
  58. SETUP.IMASKHLL ON
  59. SETUP.IMASKASM ON
  60. ;Disable acinactm
  61. ;d.s c:0x1020002c %le %long 0x8
  62. ;d.s c:0x1020022c %le %long 0x8
  63. ;D.S SD:0x00000000 %LE %LONG 0xEAFFFFFE
  64. ;D.S SD:0x10006000 %LE %LONG 0x0b160001
  65. ;D.S SD:0x100062A0 %LE %LONG 0x7C
  66. ;D.S SD:0x100062B0 %LE %LONG 0x7C
  67. ;enable L2C 128KB
  68. D.S SD:0x10200000 %LE %LONG 0x00000000 ;Set L2C size to 128 KB
  69. D.S SD:0x10200000 %LE %LONG 0x00001000 ;Enable L2C share SRAM
  70. ; MSDC FPGA DTB: Card power(GPIO3), MSDC Bus 3.3V(GPIO2), MSDC Bus 1.8V(GPIO1) control
  71. ; Set GPIO direction
  72. ;D.S SD:0x10001E88 %LE %LONG 0xFF00
  73. ; Set GPIO output value
  74. ;D.S SD:0x10001E84 %LE %LONG 0x5500
  75. ; set_hw_breakpoint_by_def
  76. ; setting attribute of breakpoints
  77. Break.Select Program OnChip
  78. Break.Select Hll OnChip
  79. Break.Select Spot OnChip
  80. Break.Select Read OnChip
  81. Break.Select Write OnChip
  82. D.S C15:0x1 0 ; Turn off MMU
  83. ; disable wdt (debug purpose)
  84. D.S SD:0x10212000 %LE %LONG 0x22000000
  85. ; board init
  86. print "loading pre-loader image"
  87. d.load.elf ../../bin/preloader.elf
  88. ; ABTC change the ouput folder
  89. ;d.load.elf ../../../../out/target/product/mt6752_fpga/obj/PRELOADER_OBJ/bin/preloader.elf
  90. ;d.load.elf ../../../../out/target/product/mt6752_fpga/obj/PRELOADER_OBJ/bin/preloader.elf /nocode
  91. Y.SPATH.RESET ; reset all source path
  92. Y.SPATH.SRD ../../platform/mt6735/src/init
  93. Y.SPATH.SRD ../../platform/mt6735/src/core
  94. Y.SPATH.SRD ../../platform/mt6735/src/drivers
  95. Y.SPATH.SRD ../../platform/mt6735/src/security
  96. Y.SPATH.SRD ../../custom/fpga6735m_64
  97. ;Y.SPATH.SRD ../../protect-private/security/ASF/preloader
  98. Break.Select Program OnChip
  99. Break.Select Hll OnChip
  100. Break.Select Spot OnChip
  101. Break.Select Read OnChip
  102. Break.Select Write OnChip
  103. R.S T 0
  104. ;winclear
  105. d.l
  106. enddo