📄 custom_emi.h
字号:
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2006
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* custom_emi.h
*
* Project:
* --------
* Maui_Software
*
* Description:
* ------------
* This Module defines the EMI (external memory interface) related setting.
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef __CUSTOM_EMI__
#define __CUSTOM_EMI__
/*
****************************************************************************
Specify the chip select configuration
Possible choices, NOR_FLASH, RAM, LPSDRAM, UNUSED
****************************************************************************
*/
const ExtMemoryType_T EMI_CSConfiguration[4] =
{
NOR_FLASH,
RAM,
UNUSED,
UNUSED
};
/*
****************************************************************************
Specify RAM size in Bytes
****************************************************************************
*/
const kal_uint32 EMI_EXTSRAM_SIZE = ((32)<<20)>> 3;
/*
****************************************************************************
Define the driving and cache/prefetch setting (optional)
****************************************************************************
*/
#if ( defined(MT6205B) || defined(MT6208) )
#define EMI_GENERAL_CONTROL 0x0100
#elif ( defined(MT6228) )
#define EMI_GENERAL_CONTROL_0 0x4a808000
#define EMI_GENERAL_CONTROL_1 0x63186318
#elif ( defined(MT6229) || defined(MT6230) )
#define EMI_GENERAL_CONTROL_0 0x4100812e
#define EMI_GENERAL_CONTROL_1 0x0a011818
#define EMI_GENERAL_CONTROL_2 0x18181818
#elif ( defined(MT6218B) || defined(MT6217) || defined(MT6219) )
#define EMI_GENERAL_CONTROL 0xeeee0780
#define EMI_CACHE_PREFETCH 0x03030107
#else
#define EMI_GENERAL_CONTROL 0xeeeefb80
#define EMI_CACHE_PREFETCH 0x03030107
#endif
/*
****************************************************************************
Specify the related EMI Setting
****************************************************************************
*/
#if ( defined(MT6205B) || defined(MT6208) )
const kal_uint16 EMI_SettingOnCS[4] =
{
0x4102,
0x4102,
0,
0
};
#elif ( defined(MT6218B) || defined(MT6217) || defined(MT6219) )
const kal_uint32 EMI_SettingOnCS[4] =
{
0x44004324,
0x440a4324,
0,
0
};
#elif ( defined(MT6227) || defined(MT6226) || defined(MT6226M) )
const kal_uint32 EMI_SettingOnCS[4] =
{
0x44004324,
0x44C94324,
0,
0
};
#elif ( defined(MT6228) || defined(MT6229) || defined(MT6230))
const kal_uint32 EMI_SettingOnCS[4] =
{
0x40404648,
0x40514648,
0,
0
};
#endif
/*
****************************************************************************
Specify additional information
****************************************************************************
*/
#define DEV_CONFIG_FLASH_PMODE_ADDR_1 0x00
#define DEV_CONFIG_FLASH_PMODE_DATA_1 0xF3
#if ( defined(MT6218B) || defined(MT6217) || defined(MT6219) )
#define EMI_FLASH_PAGE_MODE 0x44094324
#elif ( defined(MT6226) || defined(MT6227) || defined(MT6226M) )
#define EMI_FLASH_PAGE_MODE 0x44094324
#elif ( defined(MT6228) || defined(MT6229) || defined(MT6230) )
#define EMI_FLASH_PAGE_MODE 0x40514648
#else
#define EMI_FLASH_PAGE_MODE 0x4102
#endif
/*
*******************************************************************************
Follow the steps below to configure flash memory for FAT
Note : All sectors allocated for FAT MUST be continuous sectors.
*******************************************************************************
*/
/*******************************************************************************
Step 1. Modify the value of FLASH_BASE_ADDRESS, which is the starting address
of the flash memory allocated for FAT
*******************************************************************************/
#define FLASH_BASE_ADDRESS 0x00F00000
/*******************************************************************************
Step 2. Modify the value of ALLOCATED_FAT_SPACE, which is the total flash
space allocated for FAT
*******************************************************************************/
#define ALLOCATED_FAT_SPACE 0x00100000
/*******************************************************************************
Step 3. Fill the flash region information table, a region is the memory space
that contains continuous sectors of equal size. Each region element
in the table is the format as below:
{S_sector, N_sector},
S_sector: the size of sector in the region
N_sector: the number of sectors in the region
*******************************************************************************/
#ifdef _LOW_COST_SINGLE_BANK_FLASH_
static FlashRegionInfo RegionInfo[] =
{
{0x10000, 15},
{0x2000, 8},
EndRegionInfo /* Don't modify this line */
};
#else /* _LOW_COST_SINGLE_BANK_FLASH_ */
static const FlashRegionInfo RegionInfo[] =
{
{0x10000, 15},
{0x2000, 8},
EndRegionInfo /* Don't modify this line */
};
#endif /* _LOW_COST_SINGLE_BANK_FLASH_ */
/*******************************************************************************
Step 4. Modify the value of TOTAL_BLOCKS, which is the sum of the number of
sectors in all regions.
Note : The Maximum value of TOTAL_BLOCKS is (127).
*******************************************************************************/
#define TOTAL_BLOCKS 23
/*******************************************************************************
Step 5. Modify the value of page buffer size in WORD for page buffer program
*******************************************************************************/
kal_uint32 PAGE_BUFFER_SIZE = 128;
#endif /* __CUSTOM_EMI__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -