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.
 
 
 
 
 
 

36 lines
1.0 KiB

  1. source [find target/atheros_ar2313.cfg]
  2. reset_config trst_and_srst
  3. $_TARGETNAME configure -event reset-init {
  4. mips32 cp0 12 0 0x10400000
  5. # configure sdram controller
  6. mww 0xb8300004 0x0e03
  7. sleep 100
  8. mww 0xb8300004 0x0e01
  9. mww 0xb8300008 0x10
  10. sleep 500
  11. mww 0xb8300004 0x0e02
  12. mww 0xb8300000 0x6c0088
  13. mww 0xb8300008 0x57e
  14. mww 0xb8300004 0x0e00
  15. mww 0xb8300004 0xb00
  16. # configure flash
  17. # 0x00000001 - 0x01 << FLASHCTL_IDCY_S
  18. # 0x000000e0 - 0x07 << FLASHCTL_WST1_S
  19. # FLASHCTL_RBLE 0x00000400 - Read byte lane enable
  20. # 0x00003800 - 0x07 << FLASHCTL_WST2_S
  21. # FLASHCTL_AC_8M 0x00060000 - Size of flash
  22. # FLASHCTL_E 0x00080000 - Flash bank enable (added)
  23. # FLASHCTL_WP 0x04000000 - write protect. If used, CFI mode wont work!!
  24. # FLASHCTL_MWx16 0x10000000 - 16bit mode. Do not use it!!
  25. # FLASHCTL_MWx8 0x00000000 - 8bit mode.
  26. mww 0xb8400000 0x000d3ce1
  27. }
  28. set _FLASHNAME $_CHIPNAME.flash
  29. flash bank $_FLASHNAME cfi 0xbe000000 0x00400000 1 1 $_TARGETNAME x16_as_x8