Path: blob/master/arch/arm/mach-bcmring/include/mach/reg_nand.h
10820 views
/*****************************************************************************1* Copyright 2001 - 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/*15*16*****************************************************************************17*18* REG_NAND.h19*20* PURPOSE:21*22* This file contains definitions for the nand registers:23*24* NOTES:25*26*****************************************************************************/2728#if !defined(__ASM_ARCH_REG_NAND_H)29#define __ASM_ARCH_REG_NAND_H3031/* ---- Include Files ---------------------------------------------------- */32#include <csp/reg.h>33#include <mach/reg_umi.h>3435/* ---- Constants and Types ---------------------------------------------- */3637#define HW_NAND_BASE MM_IO_BASE_NAND /* NAND Flash */3839/* DMA accesses by the bootstrap need hard nonvirtual addresses */40#define REG_NAND_CMD __REG16(HW_NAND_BASE + 0)41#define REG_NAND_ADDR __REG16(HW_NAND_BASE + 4)4243#define REG_NAND_PHYS_DATA16 (HW_NAND_BASE + 8)44#define REG_NAND_PHYS_DATA8 (HW_NAND_BASE + 8)45#define REG_NAND_DATA16 __REG16(REG_NAND_PHYS_DATA16)46#define REG_NAND_DATA8 __REG8(REG_NAND_PHYS_DATA8)4748/* use appropriate offset to make sure it start at the 1K boundary */49#define REG_NAND_PHYS_DATA_DMA (HW_NAND_BASE + 0x400)50#define REG_NAND_DATA_DMA __REG32(REG_NAND_PHYS_DATA_DMA)5152/* Linux DMA requires physical address of the data register */53#define REG_NAND_DATA16_PADDR HW_IO_VIRT_TO_PHYS(REG_NAND_PHYS_DATA16)54#define REG_NAND_DATA8_PADDR HW_IO_VIRT_TO_PHYS(REG_NAND_PHYS_DATA8)55#define REG_NAND_DATA_PADDR HW_IO_VIRT_TO_PHYS(REG_NAND_PHYS_DATA_DMA)5657#define NAND_BUS_16BIT() (0)58#define NAND_BUS_8BIT() (!NAND_BUS_16BIT())5960/* Register offsets */61#define REG_NAND_CMD_OFFSET (0)62#define REG_NAND_ADDR_OFFSET (4)63#define REG_NAND_DATA8_OFFSET (8)6465#endif666768