⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nand.h

📁 Freescale ARM9系列CPU MX27的WINCE 5.0下的BSP
💻 H
字号:
;
; Copyright (c) Microsoft Corporation.  All rights reserved.
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;
; Copyright (C) 2003-2004, MOTOROLA, INC. All Rights Reserved
; THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
; BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
; MOTOROLA, INC.
;
; Copyright (C) 2004-2006, Freescale Semiconductor, Inc. All Rights Reserved.
; THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
; AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT

;
; File:     IPL/NANDLOADER/nand.h
; Purpose:  Implements the NAND flash specific defines for nandloader.s
;
; Notes:
;
; Author:   Swee Yee Fonn
; Date:     03/23/2004
;
; Modifications:
; MM/DD/YYYY        Initials    Change description
; 02/28/2005        SYF         Remove use of load info struct
;

    IF :LNOT: :DEF: _EBOOT_NANDLOADER_NAND_H
_EBOOT_NANDLOADER_NAND_H        EQU     1

; NAND Flash part defines
K9F1208Q0x                      EQU             1
K9F5616Q0x                      EQU             2
K9K1G08U0x			EQU             3

    GBLA        NAND_PART

; Note: Only enable one of these at any one time
;NAND_PART                      SETA    K9F1208Q0x
;NAND_PART                      SETA    K9F5616Q0x

NAND_PART                       SETA    K9K1G08U0x


; TRUE to enable sending 4th address cycle
    GBLL        SEND_4TH_ADDR_CYCLE

    IF NAND_PART = K9F1208Q0x
SEND_4TH_ADDR_CYCLE             SETL    {TRUE}
    ENDIF

    IF NAND_PART = K9F5616Q0x
SEND_4TH_ADDR_CYCLE             SETL    {FALSE}
    ENDIF

    IF NAND_PART = K9K1G08U0x
SEND_4TH_ADDR_CYCLE             SETL    {TRUE}
     ENDIF

; Set TRUE if device supports sequential page read
    GBLL        SEQUENTIAL_PAGE_READ_SUPPORT
SEQUENTIAL_PAGE_READ_SUPPORT    SETL    {FALSE}

; Nandloader defines
NAND_PAGE_SIZE_LSHIFT           EQU     9
NAND_NUM_PAGE_LSHIFT            EQU     5
NAND_BLOCK_SIZE_LSHIFT          EQU     (NAND_PAGE_SIZE_LSHIFT + NAND_NUM_PAGE_LSHIFT)
NAND_NUM_PAGES                  EQU     (1 << NAND_NUM_PAGE_LSHIFT)


    IF NAND_PART = K9F5616Q0x
NAND_NUM_BLOCKS                 EQU     2048
NAND_BAD_BLOCK_OFFSET           EQU     11  ; byte 11 of spare area
    ENDIF

    IF NAND_PART = K9F1208Q0x
NAND_NUM_BLOCKS                 EQU     4096
NAND_BAD_BLOCK_OFFSET           EQU     5   ; byte 5 of spare area
    ENDIF

    IF NAND_PART = K9K1G08U0x
NAND_NUM_BLOCKS                 EQU     8192
NAND_BAD_BLOCK_OFFSET           EQU     5   ; byte 5 of spare area
    ENDIF


NAND_INFO_LOAD_IMAGE_SIZE       EQU     0x00040000
NAND_INFO_LOAD_IMAGE_BLOCKS     EQU     (NAND_INFO_LOAD_IMAGE_SIZE >> NAND_BLOCK_SIZE_LSHIFT)

; NAND flash commands
NAND_CMD_READ                   EQU     0x00
NAND_CMD_READ2                  EQU     0x50

    ENDIF

    END

⌨️ 快捷键说明

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