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.
 
 
 
 
 
 

70 lines
1.7 KiB

  1. source [find target/alphascale_asm9260t.cfg]
  2. reset_config trst_and_srst
  3. $_TARGETNAME configure -event reset-init {
  4. echo "Configure clock"
  5. # Enable SRAM clk
  6. mww 0x80040024 0x4
  7. # Enable IRQ clk
  8. mww 0x80040034 0x100
  9. # Enable DMA0,1 clk
  10. mww 0x80040024 0x600
  11. # Make sysre syspll is enabled
  12. mww 0x80040238 0x750
  13. #CPU = PLLCLK/2
  14. mww 0x8004017C 0x2
  15. #SYSAHBCLK = CPUCLK/2
  16. mww 0x80040180 0x2
  17. # Set PLL freq to 480MHz
  18. mww 0x80040100 480
  19. # normally we shoul waiting here until we get 0x1 (0x80040104)&0x1)==0x0)
  20. sleep 100
  21. # select PLL as main source
  22. mww 0x80040120 0x1
  23. # disable and enable main clk to update changes?
  24. mww 0x80040124 0x0
  25. mww 0x80040124 0x1
  26. echo "Configure memory"
  27. #enable EMI CLK
  28. mww 0x80040024 0x40
  29. # configure memory controller for internal SRAM
  30. mww 0x80700000 0x1188
  31. # change default emi clk delay
  32. mww 0x8004034C 0xA0503
  33. # make sure chip_select_register2_low has correct value (why?)
  34. mww 0x8070001c 0x20000000
  35. # set type to sdram and size to 32MB
  36. mww 0x8070005c 0xa
  37. # configure internal SDRAM timing
  38. mww 0x80700004 0x024996d9
  39. # configure Static Memory timing
  40. mww 0x80700094 0x00542b4f
  41. echo "Configure uart4"
  42. # enable pinctrl clk
  43. mww 0x80040024 0x2000000
  44. # mux GPIO3_0 and GPIO3_1 to UART4
  45. mww 0x80044060 0x2
  46. mww 0x80044064 0x2
  47. # configure UART4CLKDIV
  48. mww 0x800401a8 0x1
  49. # enable uart4 clk
  50. mww 0x80040024 0x8000
  51. # clear softrst and clkgate on uart4
  52. mww 0x80010008 0xC0000000
  53. # set bandrate 115200 12M
  54. mww 0x80010030 0x00062070
  55. # enable Rx&Tx
  56. mww 0x80010024 0x301
  57. # clear hw control
  58. mww 0x80010028 0xc000
  59. }
  60. $_TARGETNAME configure -work-area-phys 0x21ffe000 -work-area-virt 0xc1ffe000 -work-area-size 0x1000
  61. $_TARGETNAME arm7_9 fast_memory_access enable
  62. $_TARGETNAME arm7_9 dcc_downloads enable