diff options
author | Afzal Mohammed <afzal@ti.com> | 2012-09-29 12:26:13 +0530 |
---|---|---|
committer | Afzal Mohammed <afzal@ti.com> | 2012-10-15 14:42:05 +0530 |
commit | bc3668ea046be9e841eecfab04bddfa759e765d6 (patch) | |
tree | 48dd86e24b260351feed63499d277dc61e7f5a98 /include/linux/platform_data/mtd-nand-omap2.h | |
parent | b6ab13e7d6d2778702baea7433d0bd9f234d5083 (diff) | |
download | blackbird-op-linux-bc3668ea046be9e841eecfab04bddfa759e765d6.tar.gz blackbird-op-linux-bc3668ea046be9e841eecfab04bddfa759e765d6.zip |
ARM: OMAP2+: nand: header cleanup
For common arm zImage existing nand header file
in platform specific location was moved to generic
platform data location, but it contained more than
platform data, remove it. New local header has been
created for exposing functions.
Also move gpmc-nand platform data to platform header
meant for nand from gpmc header file
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Diffstat (limited to 'include/linux/platform_data/mtd-nand-omap2.h')
-rw-r--r-- | include/linux/platform_data/mtd-nand-omap2.h | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h index 1a68c1e5fe53..e1965fe581d1 100644 --- a/include/linux/platform_data/mtd-nand-omap2.h +++ b/include/linux/platform_data/mtd-nand-omap2.h @@ -8,7 +8,9 @@ * published by the Free Software Foundation. */ -#include <plat/gpmc.h> +#ifndef _MTD_NAND_OMAP2_H +#define _MTD_NAND_OMAP2_H + #include <linux/mtd/partitions.h> enum nand_io { @@ -18,10 +20,35 @@ enum nand_io { NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ }; +enum omap_ecc { + /* 1-bit ecc: stored at end of spare area */ + OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ + OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ + /* 1-bit ecc: stored at beginning of spare area as romcode */ + OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ + OMAP_ECC_BCH4_CODE_HW, /* 4-bit BCH ecc code */ + OMAP_ECC_BCH8_CODE_HW, /* 8-bit BCH ecc code */ +}; + +struct gpmc_nand_regs { + void __iomem *gpmc_status; + void __iomem *gpmc_nand_command; + void __iomem *gpmc_nand_address; + void __iomem *gpmc_nand_data; + void __iomem *gpmc_prefetch_config1; + void __iomem *gpmc_prefetch_config2; + void __iomem *gpmc_prefetch_control; + void __iomem *gpmc_prefetch_status; + void __iomem *gpmc_ecc_config; + void __iomem *gpmc_ecc_control; + void __iomem *gpmc_ecc_size_config; + void __iomem *gpmc_ecc1_result; + void __iomem *gpmc_bch_result0; +}; + struct omap_nand_platform_data { int cs; struct mtd_partition *parts; - struct gpmc_timings *gpmc_t; int nr_parts; bool dev_ready; enum nand_io xfer_type; @@ -30,14 +57,4 @@ struct omap_nand_platform_data { struct gpmc_nand_regs reg; }; -/* minimum size for IO mapping */ -#define NAND_IO_SIZE 4 - -#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) -extern int gpmc_nand_init(struct omap_nand_platform_data *d); -#else -static inline int gpmc_nand_init(struct omap_nand_platform_data *d) -{ - return 0; -} #endif |