2 * (C) Copyright 2004-2008 Texas Instruments, <www.ti.com>
3 * Rohit Choraria <rohitkc@ti.com>
5 * (C) Copyright 2013 Andreas Bießmann <andreas.devel@googlemail.com>
7 * See file CREDITS for list of people who contributed to this
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 #ifndef __ASM_OMAP_GPMC_H
26 #define __ASM_OMAP_GPMC_H
28 #include <asm/arch/omap_gpmc.h>
30 #define GPMC_BUF_EMPTY 0
31 #define GPMC_BUF_FULL 1
33 #define ECCCLEAR (0x1 << 8)
34 #define ECCRESULTREG1 (0x1 << 0)
35 #define ECCSIZE512BYTE 0xFF
36 #define ECCSIZE1 (ECCSIZE512BYTE << 22)
37 #define ECCSIZE0 (ECCSIZE512BYTE << 12)
38 #define ECCSIZE0SEL (0x000 << 0)
40 /* Generic ECC Layouts */
41 /* Large Page x8 NAND device Layout */
42 #ifdef GPMC_NAND_ECC_LP_x8_LAYOUT
43 #define GPMC_NAND_HW_ECC_LAYOUT {\
45 .eccpos = {1, 2, 3, 4, 5, 6, 7, 8,\
53 /* Large Page x16 NAND device Layout */
54 #ifdef GPMC_NAND_ECC_LP_x16_LAYOUT
55 #define GPMC_NAND_HW_ECC_LAYOUT {\
57 .eccpos = {2, 3, 4, 5, 6, 7, 8, 9,\
65 /* Small Page x8 NAND device Layout */
66 #ifdef GPMC_NAND_ECC_SP_x8_LAYOUT
67 #define GPMC_NAND_HW_ECC_LAYOUT {\
76 /* Small Page x16 NAND device Layout */
77 #ifdef GPMC_NAND_ECC_SP_x16_LAYOUT
78 #define GPMC_NAND_HW_ECC_LAYOUT {\
87 #endif /* __ASM_OMAP_GPMC_H */