📄 jnand_msm_init.cmm
字号:
;============================================================================
; Name:
; JNAND_MSM_INIT.CMM for Saber
;
; Description:
; Script to initialize the MSM for JNAND program to run. No h/w init
; is done in JNAND
;
; Execution:
; Called by jnand.cmm and jnandtest.cmm to init the MSM
;
; Copyright (c) 2003 by QUALCOMM, Incorporated. All Rights Reserved.
;----------------------------------------------------------------------------
;============================================================================
;
; EDIT HISTORY FOR MODULE
;
; $Header: //depot/asic/msm6250/tools/jnand/jnand_msm_init.cmm#8 $ $DateTime: 2003/10/30 07:41:25 $ $Author: dionh $
;
; when who what, where, why
; ------- --- --------------------------------------------------------
; 10/30/03 drh Save current directory so we can return to it.
; 07/28/03 drh Minor cosmetic cleanup, no functional changes
; 07/23/03 sr Added call to setupgpll.cmm as a workaround for enabling
; searcher RAM after power UP. Also changed script to run
; common .cmm files like constants.cmm, setupebi2.cmm,
; setupmemmap.cmm and setupxmemc.cmm from build/ms directory
; 07/08/03 drh Integrate change by dl to turn off camera flash
; Remove erroneous error message
; 06/10/03 drh Saber - taken from Jaguar jnand_msm_init.cmm
; ------- --- --------------------------------------------------------
; ------- --- --------------------------------------------------------
; 07/05/02 drh Created - taken from Cougar JFINIT.CMM directly with
; minor changes to account for NAND
;============================================================================;
; --------------------------------------------
; --- Debugger System Setup ---
; --------------------------------------------
; Turbo mode of debug state accesses - CPU makes no checks of
; memory access in debug mode.
System.Option TURBO off
; Usage of TRST in system - Must be off if reset tied to trst.
System.Option.TRST on
System.Option.CFLUSH on
System.Option.ResBreak on
System.Option.ENRESET on
System.Option.WAITRESET on
SYSTEM.CPU ARM926EJ
SYSTEM.OPTION BIGENDIAN OFF
SYSTEM.JtagClock RTCK
; Disable "Emulator berr error"
System.Option ShowError off
; Disassembler selection - Automatically selects correct one.
System.Option DisMode Auto
; Generate a reset
SYSTEM.DOWN
SYSTEM.UP
;Because MSM does not always reset to correct address
r.s PC 0xFFFF0000
;------------------------------------------------------------
; MSM configuration
;------------------------------------------------------------
global &CMM_DIR
global &currdir
&CMM_DIR="."
; save the current directory so we can come back to it
; allows running of jnand from a directory other than tools\jnand
&currdir=OS.PWD()
do &CMM_DIR\constants.cmm
; Workaround to enable searcher RAM after power up of SURF
do &CMM_DIR\setupgpll.cmm
; establish rudimentary setup information -- modify this on a target-by-target basis
&TARGET_TYPE="MASTODON_SURF&MSM6250"
&BOOT_MODE="NAND"
&SHADOW_MODE=0
; get clock rates setup. later feature: crank up clock for load of code.
&MCLK_RATE=19200000. // don't forget the decimal or you'll be using 19.2mil hex
&HCLK_RATE=19200000.
&MEM_CTL_MARGIN_NS=30. // timing margin for memory controller settings, in nanoseconds
; 5ns is a reasonable number when things are stable
; setup clocks
do &CMM_DIR\setupMemMap
; because setupmems calls setupMPMC and expects it to
; be in the current directory
cd &CMM_DIR
do setupmems
cd &currdir
; Now setup GPIO function selects
;
;
; GPIO_OE_0 - Turn on GPIO13 to turn off camera flash
;d.out &GPIO_OE_0 %LONG 0x00002000
; GPIO_FUNC_SEL_0 - no alternate function
d.out &GPIO_FUNC_SEL0 %LONG 0x00000000
; GPIO_FUNC_SEL_1 - gpio[38:33] alternate fct.
;d.out &GPIO_FUNC_SEL1 %LONG 0x0000007E
d.out &GPIO_FUNC_SEL1 %LONG 0x00000002
; GPIO_FUNC_SEL_4 - gpio[67:79] alternate fct.
;d.out &GPIO_FUNC_SEL4 %LONG 0x00001FFF
d.out &GPIO_FUNC_SEL4 %LONG 0x00001DFF
; GPIO_ALT_FUNC_SEL - default value
d.out &GPIO_ALT_FUNC_SEL %LONG 0x00000000
enddo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -