Path: blob/master/arch/arm/mach-davinci/include/mach/nand.h
17683 views
/*1* mach-davinci/nand.h2*3* Copyright © 2006 Texas Instruments.4*5* Ported to 2.6.23 Copyright © 2008 by6* Sander Huijsen <[email protected]>7* Troy Kisky <[email protected]>8* Dirk Behme <[email protected]>9*10* --------------------------------------------------------------------------11*12* This program is free software; you can redistribute it and/or modify13* it under the terms of the GNU General Public License as published by14* the Free Software Foundation; either version 2 of the License, or15* (at your option) any later version.16*17* This program is distributed in the hope that it will be useful,18* but WITHOUT ANY WARRANTY; without even the implied warranty of19* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the20* GNU General Public License for more details.21*22* You should have received a copy of the GNU General Public License23* along with this program; if not, write to the Free Software24* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.25*/2627#ifndef __ARCH_ARM_DAVINCI_NAND_H28#define __ARCH_ARM_DAVINCI_NAND_H2930#include <linux/mtd/nand.h>3132#define NANDFCR_OFFSET 0x6033#define NANDFSR_OFFSET 0x6434#define NANDF1ECC_OFFSET 0x703536/* 4-bit ECC syndrome registers */37#define NAND_4BIT_ECC_LOAD_OFFSET 0xbc38#define NAND_4BIT_ECC1_OFFSET 0xc039#define NAND_4BIT_ECC2_OFFSET 0xc440#define NAND_4BIT_ECC3_OFFSET 0xc841#define NAND_4BIT_ECC4_OFFSET 0xcc42#define NAND_ERR_ADD1_OFFSET 0xd043#define NAND_ERR_ADD2_OFFSET 0xd444#define NAND_ERR_ERRVAL1_OFFSET 0xd845#define NAND_ERR_ERRVAL2_OFFSET 0xdc4647/* NOTE: boards don't need to use these address bits48* for ALE/CLE unless they support booting from NAND.49* They're used unless platform data overrides them.50*/51#define MASK_ALE 0x0852#define MASK_CLE 0x105354struct davinci_nand_pdata { /* platform_data */55uint32_t mask_ale;56uint32_t mask_cle;5758/* for packages using two chipselects */59uint32_t mask_chipsel;6061/* board's default static partition info */62struct mtd_partition *parts;63unsigned nr_parts;6465/* none == NAND_ECC_NONE (strongly *not* advised!!)66* soft == NAND_ECC_SOFT67* else == NAND_ECC_HW, according to ecc_bits68*69* All DaVinci-family chips support 1-bit hardware ECC.70* Newer ones also support 4-bit ECC, but are awkward71* using it with large page chips.72*/73nand_ecc_modes_t ecc_mode;74u8 ecc_bits;7576/* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */77unsigned options;7879/* Main and mirror bbt descriptor overrides */80struct nand_bbt_descr *bbt_td;81struct nand_bbt_descr *bbt_md;8283/* Access timings */84struct davinci_aemif_timing *timing;85};8687#endif /* __ARCH_ARM_DAVINCI_NAND_H */888990