aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorAfzal Mohammed <afzal@ti.com>2012-09-29 02:56:13 -0400
committerAfzal Mohammed <afzal@ti.com>2012-10-15 05:12:05 -0400
commitbc3668ea046be9e841eecfab04bddfa759e765d6 (patch)
tree48dd86e24b260351feed63499d277dc61e7f5a98 /include/linux/platform_data
parentb6ab13e7d6d2778702baea7433d0bd9f234d5083 (diff)
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')
-rw-r--r--include/linux/platform_data/mtd-nand-omap2.h41
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 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <plat/gpmc.h> 11#ifndef _MTD_NAND_OMAP2_H
12#define _MTD_NAND_OMAP2_H
13
12#include <linux/mtd/partitions.h> 14#include <linux/mtd/partitions.h>
13 15
14enum nand_io { 16enum nand_io {
@@ -18,10 +20,35 @@ enum nand_io {
18 NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ 20 NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */
19}; 21};
20 22
23enum omap_ecc {
24 /* 1-bit ecc: stored at end of spare area */
25 OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */
26 OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */
27 /* 1-bit ecc: stored at beginning of spare area as romcode */
28 OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */
29 OMAP_ECC_BCH4_CODE_HW, /* 4-bit BCH ecc code */
30 OMAP_ECC_BCH8_CODE_HW, /* 8-bit BCH ecc code */
31};
32
33struct gpmc_nand_regs {
34 void __iomem *gpmc_status;
35 void __iomem *gpmc_nand_command;
36 void __iomem *gpmc_nand_address;
37 void __iomem *gpmc_nand_data;
38 void __iomem *gpmc_prefetch_config1;
39 void __iomem *gpmc_prefetch_config2;
40 void __iomem *gpmc_prefetch_control;
41 void __iomem *gpmc_prefetch_status;
42 void __iomem *gpmc_ecc_config;
43 void __iomem *gpmc_ecc_control;
44 void __iomem *gpmc_ecc_size_config;
45 void __iomem *gpmc_ecc1_result;
46 void __iomem *gpmc_bch_result0;
47};
48
21struct omap_nand_platform_data { 49struct omap_nand_platform_data {
22 int cs; 50 int cs;
23 struct mtd_partition *parts; 51 struct mtd_partition *parts;
24 struct gpmc_timings *gpmc_t;
25 int nr_parts; 52 int nr_parts;
26 bool dev_ready; 53 bool dev_ready;
27 enum nand_io xfer_type; 54 enum nand_io xfer_type;
@@ -30,14 +57,4 @@ struct omap_nand_platform_data {
30 struct gpmc_nand_regs reg; 57 struct gpmc_nand_regs reg;
31}; 58};
32 59
33/* minimum size for IO mapping */
34#define NAND_IO_SIZE 4
35
36#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
37extern int gpmc_nand_init(struct omap_nand_platform_data *d);
38#else
39static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
40{
41 return 0;
42}
43#endif 60#endif