summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/onenand.h
Commit message (Collapse)AuthorAgeFilesLines
* mtd: OneNAND: Detect the correct NOP when 4KiB pagesizeKyungmin Park2011-09-111-0/+4
| | | | | | | | | | | There are two different 4KiB pagesize chips KFM4G16Q4M series have NOP 4 with version ID 0x0131 But KFM4G16Q5M has NOP 1 with versoin ID 0x013e Note that Q5M means that it has NOP 1. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* mtd: onenand: add new option to control initial onenand unlockingRoman Tereshonkov2011-03-111-0/+1
| | | | | | | | | A new option ONENAND_SKIP_INITIAL_UNLOCKING is added. This allows to disable initial onenand unlocking when the driver is initialized. Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: OneNAND: add enable / disable methods to onenand_chipAdrian Hunter2011-01-061-0/+2
| | | | | | | | | Add enable / disable methods called from get_device() / release_device(). These can be used, for example, to allow the driver to prevent the voltage regulator from being put to sleep while OneNAND is in use. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: onenand: add option and variable for cache program featureRoman Tereshonkov2010-12-031-0/+12
| | | | | | | | | | | A new option is added for cache program feature. A new variable ongoing is introduced for onenand_chip to handle the multi-command cache program operation. Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: OneNAND: Introduce chip_probe functionKyungmin Park2010-08-041-0/+2
| | | | | | | | | | Samsung SoCs use the own OneNAND controler and detect OneNAND chip at power on. To use this feature, introduce the chip_probe function. Also remove workaround for Samsung SoCs. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: onenand: add new callback for bufferram readKyungmin Park2010-05-141-0/+2
| | | | | | | | | | | This patch adds a new callback for the underlying drivers, which is called instead of accessing the buffer ram directly. This callback will be used by Samsung OneNAND driver to implement DMA transfers on S5PC110 SoC. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: onenand: allocate verify buffer in the coreKyungmin Park2010-05-141-0/+3
| | | | | | | | | | This patch extends OneNAND core code with support for OneNAND verify write check. This is done by allocating the buffer for verify read directly from the core code. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: onenand: add support for chips with 4KiB page sizeKyungmin Park2010-05-141-0/+4
| | | | | | | | This patch adds support for OneNAND chips that have 4KiB page size. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: OneNAND OTP support reworkAmul Kumar Saha2009-11-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What is OTP in OneNAND? The device includes, 1. one block-sized OTP (One Time Programmable) area and 2. user-controlled 1st block OTP(Block 0) that can be used to increase system security or to provide identification capabilities. What is done? In OneNAND, one block of the NAND Array is set aside as an OTP memory area, and 1st Block (Block 0) can be used as OTP area. This area, available to the user, can be configured and locked with secured user information. The OTP block can be read, programmed and locked using the same operations as any other NAND Flash Array memory block. After issuing an OTP-Lock, OTP block cannot be erased. OTP block is fully-guaranteed to be a good block. Why it is done? Locking the 1st Block OTP has the effect of a 'Write-protect' to guard against accidental re-programming of data stored in the 1st block and OTP Block. Which problem it solves? OTP support is provided in the existing implementation of OneNAND/Flex-OneNAND driver, but it is not working with OneNAND devices. Have observed the following in current OTP OneNAND Implmentation, 1. DataSheet specific sequence to lock the OTP Area is not followed. 2. Certain functions are quiet generic to cope with OTP specific activity. This patch re-implements OTP support for OneNAND device. How it is done? For all blocks, 8th word is available to the user. However, in case of OTP Block, 8th word of sector 0, page 0 is reserved as OTP Locking Bit area. Therefore, in case of OTP Block, user usage on this area is prohibited. Condition specific values are entered in the 8th word, sector0, page 0 of the OTP block during the process of issuing an OTP-Lock. The possible conditions are: 1. Only 1st Block Lock 2. Only OTP Block Lock 3. Lock both the 1st Block and the OTP Block What Other feature additions have been done in this patch? This patch adds feature for: 1. Only 1st Block Lock 2. Lock both the 1st Block and the OTP Blocks Re-implemented OTP support for OneNAND Added following features to OneNAND 1. Lock only 1st Block in OneNAND 2. Lock BOTH 1st Block and OTP Block in OneNAND [comments were slightly tweaked by Artem] Signed-off-by: Amul Kumar Saha <amul.saha@samsung.com> Reviewed-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: unify status enum from three headersAlessandro Rubini2009-09-241-17/+2
| | | | | | | | | | | | | nand.h, onenand.h and flashchip.h defined enumeration types for chip status using the same symbolic names. This prevented a board file to include more than one of them. In particular, no nand and onenand platform devices could live in the same file. This patch augments flashchip.h with a few status values in order to cover all cases, so nand.h and onenand.h can use flstate_t without declaring their own status enum. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: onenand: make onenand/generic.c more genericMagnus Damm2009-09-191-0/+8
| | | | | | | | | | | | | | | | | | | | | Remove the ARM dependency from the generic "onenand" platform device driver. This change makes the driver useful for other architectures as well. Needed for the SuperH kfr2r09 board. Apart from the obvious Kconfig bits, the most important change is the move away from ARM specific includes and platform data. Together with this change the only in-tree board code gets an update, and the driver name is also changed gracefully break potential out of tree drivers. The driver is also updated to allow NULL as platform data together with a few changes to make use of resource_size() and dev_name(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Kyungmin Park <kmpark@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: onenand: add bbt_wait & unlock_all as replaceable for some platformKyungmin Park2009-06-051-0/+5
| | | | | | | | | Add bbt_wait & unlock_all as replaceable for some platform such as s3c64xx s3c64xx has its own OneNAND controller and another interface Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: Flex-OneNAND supportRohit Hagargundgi2009-06-051-0/+18
| | | | | | | | | | | | | | | | | | Add support for Samsung Flex-OneNAND devices. Flex-OneNAND combines SLC and MLC technologies into a single device. SLC area provides increased reliability and speed, suitable for storing code such as bootloader, kernel and root file system. MLC area provides high density and is suitable for storing user data. SLC and MLC regions can be configured through kernel parameter. [akpm@linux-foundation.org: export flexoand_region and onenand_addr] Signed-off-by: Rohit Hagargundgi <h.rohit@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Vishak G <vishak.g@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* mtd: OneNAND: add support for OneNAND manufactured by NumonyxAdrian Hunter2009-06-051-0/+1
| | | | | | | | | | | In addition to adding the Numonyx manufacturer code, this patch also ensures 'sync. write' is disabled when reading identification data - something that the Numonyx chip objects to, but the Samsung chip seems to ignore. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* [MTD] [OneNAND] proper onenand_bbt_read_oob() prototypeAdrian Bunk2008-04-221-0/+3
| | | | | | | | This patch adds a proper prototype for onenand_bbt_read_oob() in include/linux/mtd/onenand.h Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] [OneNAND] 2X program supportKyungmin Park2007-06-301-0/+12
| | | | | | | | | | | | | | | | | | | The 2X Program is an extension of Program Operation. Since the device is equipped with two DataRAMs, and two-plane NAND Flash memory array, these two component enables simultaneous program of 4KiB. Plane1 has only even blocks such as block0, block2, block4 while Plane2 has only odd blocks such as block1, block3, block5. So MTD regards it as 4KiB page size and 256KiB block size Now the following chips support it. (KFXXX16Q2M) Demux: KFG2G16Q2M, KFH4G16Q2M, KFW8G16Q2M, Mux: KFM2G16Q2M, KFN4G16Q2M, And more recent chips Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] [OneNAND] Classify the page data and oob bufferKyungmin Park2007-03-091-1/+4
| | | | | | | | Classify the page data and oob buffer and it prevents the memory fragementation (writesize + oobsize) Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] OneNAND: Reduce internal BufferRAM operationsKyungmin Park2007-02-021-6/+2
| | | | | | | | | | It use blockpage instead of a pair (block, page). It can also cover a small chunk access. 0x00, 0x20, 0x40 and so on. And in JFFS2 behavior, sometimes it reads two pages alternatively. e.g., It first reads A page, B page and A page. So we check another bufferram to find requested page. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] OneNAND: Remove unused fieldsKyungmin Park2007-01-311-2/+0
| | | | | | | - Remove unused fields - Fix typo Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] OneNAND: Update copyrights and code cleanupKyungmin Park2007-01-181-1/+1
| | | | | | Update copyrights and code cleanup Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] OneNAND: Reduce Double Density Package (DDP) operationsKyungmin Park2007-01-181-0/+3
| | | | | | | - DDP code clean-up - Reduce block & bufferram operations in DDP Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] OneNAND: Implement read-while-loadAdrian Hunter2007-01-101-0/+1
| | | | | | | Read-while-load enables higher performance read operations. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] OneNAND: add subpage write supportKyungmin Park2007-01-101-0/+2
| | | | | | OneNAND supports up to 4 writes at one NAND page. Add support of this feature. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [MTD] OneNAND: lock supportKyungmin Park2006-11-161-1/+0
| | | | | | | | Now you can use mtd lock inferface on OneNAND The idea is from Nemakal, Vijaya, thanks Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* MTD: OneNAND: interrupt based wait supportKyungmin Park2006-11-161-0/+4
| | | | | | | | | | | We can use the two methods to wait. 1. polling: read interrupt status register 2. interrupt: use kernel ineterrupt mechanism To use interrupt method, you first connect onenand interrupt pin to your platform and configure interrupt properly Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
* [MTD ONENAND] Check OneNAND lock scheme & all block unlock command supportKyungmin Park2006-09-261-2/+4
| | | | | | | | OneNAND lock scheme depends on density and process of chip. Some OneNAND chips support all block unlock Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* MTD: kernel-doc fixes + additionsRandy Dunlap2006-06-291-33/+44
| | | | | | | | | Fix some kernel-doc typos/spellos. Use kernel-doc syntax in places where it was almost used. Correct/add struct, struct field, and function param names where needed. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [MTD] NAND Replace oobinfo by ecclayoutThomas Gleixner2006-05-291-3/+3
| | | | | | | | | The nand_oobinfo structure is not fitting the newer error correction demands anymore. Replace it by struct nand_ecclayout and fixup the users all over the place. Keep the nand_oobinfo based ioctl for user space compability reasons. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* OneNAND: One-Time Programmable (OTP) supportKyungmin Park2006-05-121-0/+2
| | | | | | | | | | | | | | One Block of the NAND Flash Array memory is reserved as a One-Time Programmable Block memory area. Also, 1st Block of NAND Flash Array can be used as OTP. The OTP block can be read, programmed and locked using the same operations as any other NAND Flash Array memory block. OTP block cannot be erased. OTP block is fully-guaranteed to be a valid block. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* OneNAND: handle byte access on BufferRAMKyungmin Park2006-05-121-0/+3
| | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* [PATCH] mtd onenand driver: reduce stack usageKyungmin Park2005-12-181-2/+2
| | | | Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] mtd onenand driver: check correct manufacturerKyungmin Park2005-12-181-1/+0
| | | | | | | This (and the three subsequent patches) is working well on OMAP H4 with 2.6.15-rc4 kernel and passes the LTP fs test. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [MTD] includes: Clean up trailing white spacesThomas Gleixner2005-11-071-1/+1
| | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] OneNAND: Enhanced support for DDP (Dual Densitiy Packages)Kyungmin Park2005-11-061-0/+1
| | | | | | | Add density mask for better support of DDP chips. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] OneNAND: Power Management (PM) supportKyungmin Park2005-11-061-0/+1
| | | | | | | Add suspend/resume Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] OneNAND: Fix bug in write verifyKyungmin Park2005-11-061-0/+1
| | | | | | | | - Remove unused block, page parameters - Add constant instead of runtime value Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] OneNAND: Update OMAP OneNAND mapping using device driver modelKyungmin Park2005-11-061-0/+8
| | | | | | | | - Update OMAP OneNAND mapping file using device driver model - Remove board specific macro and values. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] OneNAND: Simple Bad Block handling supportKyungmin Park2005-11-061-0/+9
| | | | | | | Based on NAND memory bad block table code Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [PATCH] OneNAND: Sync. Burst Read supportKyungmin Park2005-11-061-0/+1
| | | | | | | | Add OneNAND Sync. Burst Read support Tested with OMAP platform Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* [MTD] Add initial support for OneNAND flash chipsKyungmin Park2005-11-061-0/+134
OneNAND is a new flash technology from Samsung with integrated SRAM buffers and logic interface. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>