Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v3.10-rc2 67 lines 2.0 kB view raw
1/* 2 * arch/arm/plat-omap/include/mach/nand.h 3 * 4 * Copyright (C) 2006 Micron Technology Inc. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 11#ifndef _MTD_NAND_OMAP2_H 12#define _MTD_NAND_OMAP2_H 13 14#include <linux/mtd/partitions.h> 15 16#define GPMC_BCH_NUM_REMAINDER 8 17 18enum nand_io { 19 NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ 20 NAND_OMAP_POLLED, /* polled mode, without prefetch */ 21 NAND_OMAP_PREFETCH_DMA, /* prefetch enabled sDMA mode */ 22 NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ 23}; 24 25enum 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 35struct 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 54struct omap_nand_platform_data { 55 int cs; 56 struct mtd_partition *parts; 57 int nr_parts; 58 bool dev_ready; 59 enum nand_io xfer_type; 60 int devsize; 61 enum omap_ecc ecc_opt; 62 struct gpmc_nand_regs reg; 63 64 /* for passing the partitions */ 65 struct device_node *of_node; 66}; 67#endif