Path: blob/master/arch/arm/mach-bcmring/include/mach/memory_settings.h
10820 views
/*****************************************************************************1* Copyright 2004 - 2008 Broadcom Corporation. All rights reserved.2*3* Unless you and Broadcom execute a separate written software license4* agreement governing use of this software, this software is licensed to you5* under the terms of the GNU General Public License version 2, available at6* http://www.broadcom.com/licenses/GPLv2.php (the "GPL").7*8* Notwithstanding the above, under no circumstances may you combine this9* software in any way with any other Broadcom software provided under a10* license other than the GPL, without Broadcom's express prior written11* consent.12*****************************************************************************/1314#ifndef MEMORY_SETTINGS_H15#define MEMORY_SETTINGS_H1617/* ---- Include Files ---------------------------------------- */18/* ---- Constants and Types ---------------------------------- */1920/* Memory devices */21/* NAND Flash timing for 166 MHz setting */22#define HW_CFG_NAND_tBTA (5 << 16) /* Bus turnaround cycle (n) 0-7 (30 ns) */23#define HW_CFG_NAND_tWP (4 << 11) /* Write pulse width cycle (n+1) 0-31 (25 ns) */24#define HW_CFG_NAND_tWR (1 << 9) /* Write recovery cycle (n+1) 0-3 (10 ns) */25#define HW_CFG_NAND_tAS (0 << 7) /* Write address setup cycle (n+1) 0-3 ( 0 ns) */26#define HW_CFG_NAND_tOE (3 << 5) /* Output enable delay cycle (n) 0-3 (15 ns) */27#define HW_CFG_NAND_tRC (7 << 0) /* Read access cycle (n+2) 0-31 (50 ns) */2829#define HW_CFG_NAND_TCR (HW_CFG_NAND_tBTA \30| HW_CFG_NAND_tWP \31| HW_CFG_NAND_tWR \32| HW_CFG_NAND_tAS \33| HW_CFG_NAND_tOE \34| HW_CFG_NAND_tRC)3536/* NOR Flash timing for 166 MHz setting */37#define HW_CFG_NOR_TPRC_TWLC (0 << 19) /* Page read access cycle / Burst write latency (n+2 / n+1) (max 25ns) */38#define HW_CFG_NOR_TBTA (0 << 16) /* Bus turnaround cycle (n) (DNA) */39#define HW_CFG_NOR_TWP (6 << 11) /* Write pulse width cycle (n+1) (35ns) */40#define HW_CFG_NOR_TWR (0 << 9) /* Write recovery cycle (n+1) (0ns) */41#define HW_CFG_NOR_TAS (0 << 7) /* Write address setup cycle (n+1) (0ns) */42#define HW_CFG_NOR_TOE (0 << 5) /* Output enable delay cycle (n) (max 25ns) */43#define HW_CFG_NOR_TRC_TLC (0x10 << 0) /* Read access cycle / Burst read latency (n+2 / n+1) (100ns) */4445#define HW_CFG_FLASH0_TCR (HW_CFG_NOR_TPRC_TWLC \46| HW_CFG_NOR_TBTA \47| HW_CFG_NOR_TWP \48| HW_CFG_NOR_TWR \49| HW_CFG_NOR_TAS \50| HW_CFG_NOR_TOE \51| HW_CFG_NOR_TRC_TLC)5253#define HW_CFG_FLASH1_TCR HW_CFG_FLASH0_TCR54#define HW_CFG_FLASH2_TCR HW_CFG_FLASH0_TCR5556/* SDRAM Settings */57/* #define HW_CFG_SDRAM_CAS_LATENCY 5 Default 5, Values [3..6] */58/* #define HW_CFG_SDRAM_CHIP_SELECT_CNT 1 Default 1, Vaules [1..2] */59/* #define HW_CFG_SDRAM_SPEED_GRADE 667 Default 667, Values [400,533,667,800] */60/* #define HW_CFG_SDRAM_WIDTH_BITS 16 Default 16, Vaules [8,16] */61#define HW_CFG_SDRAM_SIZE_BYTES 0x10000000 /* Total memory, not per device size */6263/* ---- Variable Externs ------------------------------------- */64/* ---- Function Prototypes ---------------------------------- */6566#endif /* MEMORY_SETTINGS_H */676869