setupxmemc.cmm

来自「QUALCOMM JNAND DRIVER」· CMM 代码 · 共 50 行

CMM
50
字号
;****************************************************************************
;**           SetupXMEMC.CMM                                               **
;**           This script sets up MSM6250's XMEMC on EBI1.                 **
;**                                                                        **
;**           Changes:                                                     **
;**           05-12-03   MSM6250 changes                                   **
;**           06-05-02   First version                                     **
;****************************************************************************

; BEWARE that this script has different behavior based on the value in &HCLK_RATE
; -- timing values are calculated on the fly, based off HCLK_RATE


;EBI1_MPMC_STDY_SEL, configures static or dynamic memory on RAMCS2 and RAMCS3
d.out &EBI1_MPMC_STDY_SEL %LONG 0x00 // static memory on both

; setup EBI1_CFG 
d.out &EBI1_CFG %LONG 0x200

;EBI1_PSRAM_CRE, controls the PSRAM CRE pin for synchronous Micron PSRAM
d.out &EBI1_PSRAM_CRE %byte 0x00

;EBI1_CSn_CFG0, configures timing and page size for CSn
d.out &EBI1_CS0_CFG0 %long 0x0033FC00 ; use the defaults for now
d.out &EBI1_CS1_CFG0 %long 0x0033FC00 ; use the defaults for now
d.out &EBI1_CS2_CFG0 %long 0x0033FC00 ; use the defaults for now
d.out &EBI1_CS3_CFG0 %long 0x0033FC00 ; use the defaults for now

;EBI1_CSn_CFG1, configures timing and burst data
d.out &EBI1_CS0_CFG1 %byte 0x00 ; default is 0
d.out &EBI1_CS1_CFG1 %byte 0x00 ; default is 0
d.out &EBI1_CS2_CFG1 %byte 0x00 ; default is 0
d.out &EBI1_CS3_CFG1 %byte 0x00 ; default is 0


; Switch the Memory controller if it is not set to XMEMC
;
;
local &MemCtrlrSwitch
; the space ahead of the data.word is required -- T32 bug
 &MemCtrlrSwitch=data.word(RD:&EBI1_MEM_CTLR_SEL_STATUS)
IF &MemCtrlrSwitch!=&EBI1_MEM_CTLR_SEL_STATUS_XMEMC
  (
  Print "memory controller set to MPMC-- setting back to XMEMC"
  d.out &EBI1_MEM_CTLR_SEL_CMD %byte 0x0
  wait 1.ms
  )
  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?