diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 13:34:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 13:34:11 -0800 |
commit | 4935361766cc73949fe032cd157d314f288922ba (patch) | |
tree | 1584f81525ae05a04d515b13a4787cd8eed46029 /include | |
parent | 2874b391bd78a5b8cb84be67297a345fbdec4ac8 (diff) | |
parent | 4f65992381112acd7d2732665a9eae492c2c9de6 (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (49 commits)
[MTD] [NAND] S3C2412 fix hw ecc
[MTD] [NAND] Work around false compiler warning in CAFÉ driver
[JFFS2] printk warning fixes
[MTD] [MAPS] ichxrom warning fix
[MTD] [MAPS] amd76xrom warning fix
[MTD] [MAPS] esb2rom warning fixes
[MTD] [MAPS] ck804xrom warning fix
[MTD] [MAPS] netsc520 warning fix
[MTD] [MAPS] sc520cdp warning fix
[MTD] [ONENAND] onenand_base warning fix
[MTD] [NAND] eXcite nand flash driver
[MTD] Improve heuristic for detecting wrong-endian RedBoot partition table
[MTD] Fix RedBoot partition parsing regression harder.
[MTD] [NAND] S3C2410: Hardware ECC correction code
[JFFS2] Use MTD_OOB_AUTO to automatically place cleanmarker on NAND
[MTD] Clarify OOB-operation interface comments
[MTD] remove unused ecctype,eccsize fields from struct mtd_info
[MTD] [NOR] Intel: remove ugly PROGREGION macros
[MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC block
[MTD] OneNAND: Invalidate bufferRAM after erase
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/bbm.h | 7 | ||||
-rw-r--r-- | include/linux/mtd/map.h | 2 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 16 | ||||
-rw-r--r-- | include/linux/mtd/nand.h | 1 | ||||
-rw-r--r-- | include/linux/mtd/onenand.h | 15 | ||||
-rw-r--r-- | include/linux/mtd/onenand_regs.h | 7 | ||||
-rw-r--r-- | include/linux/mtd/physmap.h | 3 | ||||
-rw-r--r-- | include/mtd/mtd-abi.h | 8 |
8 files changed, 28 insertions, 31 deletions
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h index 1221b7c4415..fff8c53e543 100644 --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h @@ -92,6 +92,13 @@ struct nand_bbt_descr { */ #define ONENAND_BADBLOCK_POS 0 +/* + * Bad block scanning errors + */ +#define ONENAND_BBT_READ_ERROR 1 +#define ONENAND_BBT_READ_ECC_ERROR 2 +#define ONENAND_BBT_READ_FATAL_ERROR 4 + /** * struct bbm_info - [GENERIC] Bad Block Table data structure * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 28d461d862b..81f3a314dd7 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -183,7 +183,7 @@ typedef union { struct map_info { char *name; unsigned long size; - unsigned long phys; + resource_size_t phys; #define NO_XIP (-1UL) void __iomem *virt; diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index d644e57703a..6a8570be331 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -85,6 +85,10 @@ typedef enum { * mode = MTD_OOB_PLACE) * @datbuf: data buffer - if NULL only oob data are read/written * @oobbuf: oob data buffer + * + * Note, it is allowed to read more then one OOB area at one go, but not write. + * The interface assumes that the OOB write requests program only one page's + * OOB area. */ struct mtd_oob_ops { mtd_oob_mode_t mode; @@ -117,18 +121,6 @@ struct mtd_info { u_int32_t writesize; u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) - u_int32_t ecctype; - u_int32_t eccsize; - - /* - * Reuse some of the above unused fields in the case of NOR flash - * with configurable programming regions to avoid modifying the - * user visible structure layout/size. Only valid when the - * MTD_PROGRAM_REGIONS flag is set. - * (Maybe we should have an union for those?) - */ -#define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize -#define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype // Kernel-only stuff starts here. char *name; diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 2071b02f052..97523887fe5 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -343,6 +343,7 @@ struct nand_buffers { * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about * special functionality. See the defines for further explanation * @badblockpos: [INTERN] position of the bad block marker in the oob area + * @cellinfo: [INTERN] MLC/multichip data from chip ident * @numchips: [INTERN] number of physical chips * @chipsize: [INTERN] the size of one chip for multichip arrays * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index f775a7af389..d8af8a95e58 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h @@ -1,7 +1,7 @@ /* * linux/include/linux/mtd/onenand.h * - * Copyright (C) 2005-2006 Samsung Electronics + * Copyright (C) 2005-2007 Samsung Electronics * Kyungmin Park <kyungmin.park@samsung.com> * * This program is free software; you can redistribute it and/or modify @@ -42,14 +42,10 @@ typedef enum { /** * struct onenand_bufferram - OneNAND BufferRAM Data - * @block: block address in BufferRAM - * @page: page address in BufferRAM - * @valid: valid flag + * @blockpage: block & page address in BufferRAM */ struct onenand_bufferram { - int block; - int page; - int valid; + int blockpage; }; /** @@ -63,7 +59,6 @@ struct onenand_bufferram { * partly be set to inform onenand_scan about * @erase_shift: [INTERN] number of address bits in a block * @page_shift: [INTERN] number of address bits in a page - * @ppb_shift: [INTERN] number of address bits in a pages per block * @page_mask: [INTERN] a page per block mask * @bufferram_index: [INTERN] BufferRAM index * @bufferram: [INTERN] BufferRAM info @@ -103,7 +98,6 @@ struct onenand_chip { unsigned int erase_shift; unsigned int page_shift; - unsigned int ppb_shift; /* Pages per block shift */ unsigned int page_mask; unsigned int bufferram_index; @@ -150,6 +144,9 @@ struct onenand_chip { #define ONENAND_SET_SYS_CFG1(v, this) \ (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) +#define ONENAND_IS_DDP(this) \ + (this->device_id & ONENAND_DEVICE_IS_DDP) + /* Check byte access in OneNAND */ #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index e31c8f5d427..af94719890e 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h @@ -3,7 +3,8 @@ * * OneNAND Register header file * - * Copyright (C) 2005-2006 Samsung Electronics + * Copyright (C) 2005-2007 Samsung Electronics + * Kyungmin Park <kyungmin.park@samsung.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -80,9 +81,11 @@ #define ONENAND_VERSION_PROCESS_SHIFT (8) /* - * Start Address 1 F100h (R/W) + * Start Address 1 F100h (R/W) & Start Address 2 F101h (R/W) */ #define ONENAND_DDP_SHIFT (15) +#define ONENAND_DDP_CHIP0 (0) +#define ONENAND_DDP_CHIP1 (1 << ONENAND_DDP_SHIFT) /* * Start Address 8 F107h (R/W) diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index 86831e3594f..0dc07d5f335 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h @@ -18,9 +18,10 @@ #define __LINUX_MTD_PHYSMAP__ #include <linux/mtd/mtd.h> -#include <linux/mtd/map.h> #include <linux/mtd/partitions.h> +struct map_info; + struct physmap_flash_data { unsigned int width; void (*set_vpp)(struct map_info *, int); diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index f913c30d7b8..8e501a75a76 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h @@ -36,12 +36,6 @@ struct mtd_oob_buf { #define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) #define MTD_CAP_NANDFLASH (MTD_WRITEABLE) - -// Types of automatic ECC/Checksum available -#define MTD_ECC_NONE 0 // No automatic ECC available -#define MTD_ECC_RS_DiskOnChip 1 // Automatic ECC on DiskOnChip -#define MTD_ECC_SW 2 // SW ECC for Toshiba & Samsung devices - /* ECC byte placement */ #define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) #define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode) @@ -61,6 +55,8 @@ struct mtd_info_user { uint32_t erasesize; uint32_t writesize; uint32_t oobsize; // Amount of OOB data per block (e.g. 16) + /* The below two fields are obsolete and broken, do not use them + * (TODO: remove at some point) */ uint32_t ecctype; uint32_t eccsize; }; |