2 * (C) Copyright 2004-2008 Texas Instruments, <www.ti.com>
3 * Rohit Choraria <rohitkc@ti.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 #ifndef __ASM_ARCH_OMAP_GPMC_H
24 #define __ASM_ARCH_OMAP_GPMC_H
26 #define GPMC_BUF_EMPTY 0
27 #define GPMC_BUF_FULL 1
29 #define ECCCLEAR (0x1 << 8)
30 #define ECCRESULTREG1 (0x1 << 0)
31 #define ECCSIZE512BYTE 0xFF
32 #define ECCSIZE1 (ECCSIZE512BYTE << 22)
33 #define ECCSIZE0 (ECCSIZE512BYTE << 12)
34 #define ECCSIZE0SEL (0x000 << 0)
36 /* Generic ECC Layouts */
37 /* Large Page x8 NAND device Layout */
38 #ifdef GPMC_NAND_ECC_LP_x8_LAYOUT
39 #define GPMC_NAND_HW_ECC_LAYOUT {\
41 .eccpos = {1, 2, 3, 4, 5, 6, 7, 8,\
49 /* Large Page x16 NAND device Layout */
50 #ifdef GPMC_NAND_ECC_LP_x16_LAYOUT
51 #define GPMC_NAND_HW_ECC_LAYOUT {\
53 .eccpos = {2, 3, 4, 5, 6, 7, 8, 9,\
61 /* Small Page x8 NAND device Layout */
62 #ifdef GPMC_NAND_ECC_SP_x8_LAYOUT
63 #define GPMC_NAND_HW_ECC_LAYOUT {\
72 /* Small Page x16 NAND device Layout */
73 #ifdef GPMC_NAND_ECC_SP_x16_LAYOUT
74 #define GPMC_NAND_HW_ECC_LAYOUT {\
83 /* GPMC CS configuration for an SMSC LAN9221 ethernet controller */
84 #define NET_LAN9221_GPMC_CONFIG1 0x00001000
85 #define NET_LAN9221_GPMC_CONFIG2 0x00060700
86 #define NET_LAN9221_GPMC_CONFIG3 0x00020201
87 #define NET_LAN9221_GPMC_CONFIG4 0x06000700
88 #define NET_LAN9221_GPMC_CONFIG5 0x0006090A
89 #define NET_LAN9221_GPMC_CONFIG6 0x87030000
90 #define NET_LAN9221_GPMC_CONFIG7 0x00000f6c
92 #endif /* __ASM_ARCH_OMAP_GPMC_H */