summaryrefslogtreecommitdiff
path: root/drivers/mtd/rfd_ftl.c
AgeCommit message (Collapse)Author
2012-01-09mtd: do not use mtd->sync directlyArtem Bityutskiy
This patch teaches 'mtd_sync()' to do nothing when the MTD driver does not have the '->sync()' method, which allows us to remove all direct 'mtd->sync' accesses. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-01-09mtd: introduce mtd_sync interfaceArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-01-09mtd: introduce mtd_write interfaceArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-01-09mtd: introduce mtd_read interfaceArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-01-09mtd: introduce mtd_erase interfaceArtem Bityutskiy
This patch is part of a patch-set which changes the MTD interface from 'mtd->func()' form to 'mtd_func()' form. We need this because we want to add common code to to all drivers in the mtd core level, which is impossible with the current interface when MTD clients call driver functions like 'read()' or 'write()' directly. At this point we just introduce a new inline wrapper function, but later some of them are expected to gain more code. E.g., the input parameters check should be moved to the wrappers rather than be duplicated at many drivers. This particular patch introduced the 'mtd_erase()' interface. The following patches add all the other interfaces one by one. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2011-10-31mtd: Add module.h to drivers users that were implicitly using it.Paul Gortmaker
We are cleaning up the implicit presence of module.h that these drivers are taking advantage of. Fix them in advance of the cleanup operation. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2010-08-08mtd: Update copyright noticesDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2010-02-26mtd: blktrans: Hotplug fixesMaxim Levitsky
* Add locking where it was missing. * Don't do a get_mtd_device in blktrans_open because it would lead to a deadlock; instead do that in add_mtd_blktrans_dev. * Only free the mtd_blktrans_dev structure when the last user exits. * Flush request queue on device removal. * Track users, and call tr->release in del_mtd_blktrans_dev Due to that ->open and release aren't called more that once. Now it is safe to call del_mtd_blktrans_dev while the device is still in use. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] remove private wrapper of endian helpers in rfd_ftl.cHarvey Harrison
Base versions handle constant folding just fine. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-12-10[MTD] update internal API to support 64-bit device sizeAdrian Hunter
MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. Extending the external API is a separate issue for several reasons. First, no one needs it at the moment. Secondly, whether the implementation is done with IOCTLs, sysfs or both is still debated. Thirdly external API changes require the internal API to be accepted first. Note that although the MTD API will be able to support 64-bit device sizes, existing drivers do not and are not required to do so, although NAND base has been updated. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats - division and modulus of 64-bit values - NAND base support - 32-bit local variables used by mtdpart and mtdconcat - naughtily assuming one structure maps to another in MEMERASE ioctl Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-06-04MTD/JFFS2: remove CVS keywordsAdrian Bunk
Once upon a time, the MTD repository was using CVS. This patch therefore removes all usages of the no longer updated CVS keywords from the MTD code. This also includes code that printed them to the user. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-04-22[MTD] make struct rfd_ftl_tr staticAdrian Bunk
This patch makes the needlessly global struct rfd_ftl_tr static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-23[MTD] Remove embedded return in RFD FTL.akpm@linux-foundation.org
embedded returns are evil. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-23[MTD] Fix potential leak in rfd_ftl_add_mtdFlorin Malita
This fixes a leak in the !mtd->erasesize error path (Coverity 1765). Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-01-18Merge branch 'master' of ↵David Woodhouse
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2006-12-13[PATCH] Fix numerous kcalloc() calls, convert to kzalloc()Robert P. J. Day
All kcalloc() calls of the form "kcalloc(1,...)" are converted to the equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect ordering of the first two arguments are fixed. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-28[MTD] Allow variable block sizes in mtd_blkdevsRichard Purdie
Currently, mtd_blkdevs enforces a block size of 512, even if the drivers can seemingly request a different size. This patch fixes mtd_blkdevs so block sizes other than 512 work correctly. Signed-off-by: Richard Purdie <rpurdie@openedhand.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-17[MTD] RFD FTL: Be noisier, and don't assume block without RFD magic are erasedSean Young
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-01-08[PATCH] fix more missing includesTim Schmielau
Include fixes for 2.6.14-git11. Should allow to remove sched.h from module.h on i386, x86_64, arm, ia64, ppc, ppc64, and s390. Probably more to come since I haven't yet checked the other archs. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-29[MTD] RFD_FTL: Use lanana assigned major device numberSean Young
A major block device number is now assigned by lanana. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-09[PATCH] mtd: rfd_ftl build fixAndrew Morton
drivers/mtd/rfd_ftl.c: In function `find_free_block': drivers/mtd/rfd_ftl.c:528: error: `jiffies' undeclared (first use in this function) drivers/mtd/rfd_ftl.c:528: error: (Each undeclared identifier is reported only once drivers/mtd/rfd_ftl.c:528: error: for each function it appears in.) Cc: Thomas Gleixner <tglx@linutronix.de> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07[MTD] core: Clean up trailing white spacesThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06[MTD] Add Resident Flash Disk (RFD) supportSean Young
This type of flash translation layer (FTL) is used by the Embedded BIOS by General Software. It is known as the Resident Flash Disk (RFD), see: http://www.gensw.com/pages/prod/bios/rfd.htm Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>