diff options
| author | Tony Lindgren <tony@atomide.com> | 2012-10-17 14:07:18 -0400 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2012-10-17 14:07:18 -0400 |
| commit | 99f0b8d6b09b0db6452d0d6e252bfa28049bbea9 (patch) | |
| tree | 23db2359ad86957359da7c8a458e25eddb08d776 /include/linux/platform_data | |
| parent | 94c657853bd228ebbc2c590b7f81efcc1dde3329 (diff) | |
| parent | 94709014ea8d2f24fbc1e6eb6982e801e325bd47 (diff) | |
Merge branch 'omap-for-v3.8/cleanup-headers-gpmc' into omap-for-v3.8/cleanup-headers
Conflicts:
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/pm34xx.c
drivers/mtd/nand/omap2.c
drivers/mtd/onenand/omap2.c
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/mtd-nand-omap2.h | 46 | ||||
| -rw-r--r-- | include/linux/platform_data/mtd-onenand-omap2.h | 28 |
2 files changed, 38 insertions, 36 deletions
diff --git a/include/linux/platform_data/mtd-nand-omap2.h b/include/linux/platform_data/mtd-nand-omap2.h index 1a68c1e5fe53..24d32ca34bef 100644 --- a/include/linux/platform_data/mtd-nand-omap2.h +++ b/include/linux/platform_data/mtd-nand-omap2.h | |||
| @@ -8,9 +8,13 @@ | |||
| 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 | ||
| 16 | #define GPMC_BCH_NUM_REMAINDER 8 | ||
| 17 | |||
| 14 | enum nand_io { | 18 | enum nand_io { |
| 15 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ | 19 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ |
| 16 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ | 20 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ |
| @@ -18,10 +22,38 @@ enum nand_io { | |||
| 18 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ | 22 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ |
| 19 | }; | 23 | }; |
| 20 | 24 | ||
| 25 | enum omap_ecc { | ||
| 26 | /* 1-bit ecc: stored at end of spare area */ | ||
| 27 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ | ||
| 28 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ | ||
| 29 | /* 1-bit ecc: stored at beginning of spare area as romcode */ | ||
| 30 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ | ||
| 31 | OMAP_ECC_BCH4_CODE_HW, /* 4-bit BCH ecc code */ | ||
| 32 | OMAP_ECC_BCH8_CODE_HW, /* 8-bit BCH ecc code */ | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct gpmc_nand_regs { | ||
| 36 | void __iomem *gpmc_status; | ||
| 37 | void __iomem *gpmc_nand_command; | ||
| 38 | void __iomem *gpmc_nand_address; | ||
| 39 | void __iomem *gpmc_nand_data; | ||
| 40 | void __iomem *gpmc_prefetch_config1; | ||
| 41 | void __iomem *gpmc_prefetch_config2; | ||
| 42 | void __iomem *gpmc_prefetch_control; | ||
| 43 | void __iomem *gpmc_prefetch_status; | ||
| 44 | void __iomem *gpmc_ecc_config; | ||
| 45 | void __iomem *gpmc_ecc_control; | ||
| 46 | void __iomem *gpmc_ecc_size_config; | ||
| 47 | void __iomem *gpmc_ecc1_result; | ||
| 48 | void __iomem *gpmc_bch_result0[GPMC_BCH_NUM_REMAINDER]; | ||
| 49 | void __iomem *gpmc_bch_result1[GPMC_BCH_NUM_REMAINDER]; | ||
| 50 | void __iomem *gpmc_bch_result2[GPMC_BCH_NUM_REMAINDER]; | ||
| 51 | void __iomem *gpmc_bch_result3[GPMC_BCH_NUM_REMAINDER]; | ||
| 52 | }; | ||
| 53 | |||
| 21 | struct omap_nand_platform_data { | 54 | struct omap_nand_platform_data { |
| 22 | int cs; | 55 | int cs; |
| 23 | struct mtd_partition *parts; | 56 | struct mtd_partition *parts; |
| 24 | struct gpmc_timings *gpmc_t; | ||
| 25 | int nr_parts; | 57 | int nr_parts; |
| 26 | bool dev_ready; | 58 | bool dev_ready; |
| 27 | enum nand_io xfer_type; | 59 | enum nand_io xfer_type; |
| @@ -30,14 +62,4 @@ struct omap_nand_platform_data { | |||
| 30 | struct gpmc_nand_regs reg; | 62 | struct gpmc_nand_regs reg; |
| 31 | }; | 63 | }; |
| 32 | 64 | ||
| 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) | ||
| 37 | extern int gpmc_nand_init(struct omap_nand_platform_data *d); | ||
| 38 | #else | ||
| 39 | static inline int gpmc_nand_init(struct omap_nand_platform_data *d) | ||
| 40 | { | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | #endif | 65 | #endif |
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h index 2858667d2e4f..685af7e8b120 100644 --- a/include/linux/platform_data/mtd-onenand-omap2.h +++ b/include/linux/platform_data/mtd-onenand-omap2.h | |||
| @@ -9,17 +9,15 @@ | |||
| 9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #ifndef __MTD_ONENAND_OMAP2_H | ||
| 13 | #define __MTD_ONENAND_OMAP2_H | ||
| 14 | |||
| 12 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
| 13 | #include <linux/mtd/partitions.h> | 16 | #include <linux/mtd/partitions.h> |
| 14 | 17 | ||
| 15 | #define ONENAND_SYNC_READ (1 << 0) | 18 | #define ONENAND_SYNC_READ (1 << 0) |
| 16 | #define ONENAND_SYNC_READWRITE (1 << 1) | 19 | #define ONENAND_SYNC_READWRITE (1 << 1) |
| 17 | 20 | #define ONENAND_IN_OMAP34XX (1 << 2) | |
| 18 | struct onenand_freq_info { | ||
| 19 | u16 maf_id; | ||
| 20 | u16 dev_id; | ||
| 21 | u16 ver_id; | ||
| 22 | }; | ||
| 23 | 21 | ||
| 24 | struct omap_onenand_platform_data { | 22 | struct omap_onenand_platform_data { |
| 25 | int cs; | 23 | int cs; |
| @@ -27,27 +25,9 @@ struct omap_onenand_platform_data { | |||
| 27 | struct mtd_partition *parts; | 25 | struct mtd_partition *parts; |
| 28 | int nr_parts; | 26 | int nr_parts; |
| 29 | int (*onenand_setup)(void __iomem *, int *freq_ptr); | 27 | int (*onenand_setup)(void __iomem *, int *freq_ptr); |
| 30 | int (*get_freq)(const struct onenand_freq_info *freq_info, | ||
| 31 | bool *clk_dep); | ||
| 32 | int dma_channel; | 28 | int dma_channel; |
| 33 | u8 flags; | 29 | u8 flags; |
| 34 | u8 regulator_can_sleep; | 30 | u8 regulator_can_sleep; |
| 35 | u8 skip_initial_unlocking; | 31 | u8 skip_initial_unlocking; |
| 36 | }; | 32 | }; |
| 37 | |||
| 38 | #define ONENAND_MAX_PARTITIONS 8 | ||
| 39 | |||
| 40 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
| 41 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | ||
| 42 | |||
| 43 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); | ||
| 44 | |||
| 45 | #else | ||
| 46 | |||
| 47 | #define board_onenand_data NULL | ||
| 48 | |||
| 49 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) | ||
| 50 | { | ||
| 51 | } | ||
| 52 | |||
| 53 | #endif | 33 | #endif |
