0dd5235f51fb0eb0b8cef3fed35be39b8a06d7bd |
|
08-Feb-2012 |
Artem Bityutskiy <artem.bityutskiy@linux.intel.com> |
mtd: harmonize mtd_point interface implementation Some MTD drivers return -EINVAL if the 'phys' parameter is not NULL, trying to convey that they cannot return the physical address. However, this is not very logical because they still can return the virtual address ('virt'). But some drivers (lpddr) just ignore the 'phys' parameter instead, which is a more logical thing to do. Let's harmonize this and: 1. Always initialize 'virt' and 'phys' to 'NULL' in 'mtd_point()'. 2. Do not return an error if the physical address cannot be found. So as a result, all drivers will set 'phys' to 'NULL' if it is not supported. None of the 'mtd_point()' users use 'phys' anyway, so this should not break anything. I guess we could also just delete this parameter later. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
5def48982b778aaebe201f85af7170b7d0a6619f |
|
03-Feb-2012 |
Artem Bityutskiy <artem.bityutskiy@linux.intel.com> |
mtd: do not duplicate length and offset checks in drivers We already verify that offset and length are within the MTD device size in the MTD API functions. Let's remove the duplicated checks in drivers. This patch only affects the following API's: 'mtd_erase()' 'mtd_point()' 'mtd_unpoint()' 'mtd_get_unmapped_area()' 'mtd_read()' 'mtd_write()' 'mtd_panic_write()' 'mtd_lock()' 'mtd_unlock()' 'mtd_is_locked()' 'mtd_block_isbad()' 'mtd_block_markbad()' This patch adds a bit of noise by removing too sparse empty lines, but this is not too bad. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
5e4e6e3fdf48c1b012e2b6e80ed1d7e99d4fa6d1 |
|
03-Feb-2012 |
Artem Bityutskiy <artem.bityutskiy@linux.intel.com> |
mtd: return error code from mtd_unpoint The 'mtd_unpoint()' API function should be able to return an error code because it may fail if you specify incorrect offset. This patch changes this MTD API function and amends all the drivers correspondingly. Also return '-EOPNOTSUPP' from 'mtd_unpoint()' when the '->unpoint()' method is undefined. We do not really need this currently, but this just makes sense to be consistent with 'mtd_point()'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
3c3c10bba1e4ccb75b41442e45c1a072f6cded19 |
|
30-Jan-2012 |
Artem Bityutskiy <artem.bityutskiy@linux.intel.com> |
mtd: add leading underscore to all mtd functions This patch renames all MTD functions by adding a "_" prefix: mtd->erase -> mtd->_erase mtd->read_oob -> mtd->_read_oob ... The reason is that we are re-working the MTD API and from now on it is an error to use MTD function pointers directly - we have a corresponding API call for every pointer. By adding a leading "_" we achieve the following: 1. Make sure we convert every direct pointer users 2. A leading "_" suggests that this interface is internal and it becomes less likely that people will use them directly 3. Make sure all the out-of-tree modules stop compiling and the owners spot the big API change and amend them. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
ee0e87b174bb41f0310cf089262bf5dd8f95a212 |
|
23-May-2011 |
Jamie Iles <jamie@jamieiles.com> |
mtd: convert remaining users to mtd_device_register() The older add_mtd_device()/add_mtd_partitions() and their removal counterparts will soon be gone. Replace uses with mtd_device_register() and mtd_device_unregister(). Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
07be303d22ac7e067b8a7172a4043ebe32b74b33 |
|
02-Feb-2011 |
Artem Bityutskiy <Artem.Bityutskiy@nokia.com> |
mtd: mtdram: initialize writebufsize field Set the 'mtd->writebufsize' field to 64 to mimic modern CFI flashes. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
6ae0185fe201eae0548dace2a84acb5050fc8606 |
|
08-Aug-2010 |
David Woodhouse <David.Woodhouse@intel.com> |
mtd: Remove obsolete <mtd/compatmac.h> include Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
402d326519c1a4859c527702383f4e60f606ef52 |
|
12-Feb-2009 |
David Howells <dhowells@redhat.com> |
NOMMU: Present backing device capabilities for MTD chardevs Present backing device capabilities for MTD character device files to allow NOMMU mmap to do direct mapping where possible. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/mtd/devices/mtdram.c
|
59018b6d2acabb114ab58637e6ab95ba424a89d0 |
|
20-May-2008 |
Adrian Bunk <bunk@kernel.org> |
MTD/JFFS2: remove CVS keywords 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>
/drivers/mtd/devices/mtdram.c
|
a98889f3d8882995b5aa2255b931cf0202325cc0 |
|
30-Apr-2008 |
Jared Hulbert <jaredeh@gmail.com> |
[MTD][NOR] Add physical address to point() method Adding the ability to get a physical address from point() in addition to virtual address. This physical address is required for XIP of userspace code from flash. Signed-off-by: Jared Hulbert <jaredeh@gmail.com> Reviewed-by: Jörn Engel <joern@logfs.org> Acked-by: Nicolas Pitre <nico@cam.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
/drivers/mtd/devices/mtdram.c
|
456d9fc92eb8635d53e8facc57764464b8759173 |
|
14-Apr-2008 |
Adrian Bunk <bunk@kernel.org> |
[MTD] mtdram.c should #include <linux/mtd/mtdram.h> Every file should include the headers containing the externs for its global functions (in this case for mtdram_init_device()). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
/drivers/mtd/devices/mtdram.c
|
6ab3d5624e172c553004ecc862bfeac16d9d68b7 |
|
30-Jun-2006 |
Jörn Engel <joern@wohnheim.fh-wedel.de> |
Remove obsolete #include <linux/config.h> Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
/drivers/mtd/devices/mtdram.c
|
21c8db9eff95260e543535dfc6f27164c4c0c0ff |
|
14-Jun-2006 |
David Woodhouse <dwmw2@infradead.org> |
[MTD] Restore MTD_ROM and MTD_RAM types Let's not attempt the abolition of mtd->type until/unless it's properly thought through. And certainly, let's not do it by halves. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
/drivers/mtd/devices/mtdram.c
|
783ed81ff39d3f938a6b2efd09fbad96e41e5c1f |
|
14-Jun-2006 |
Artem B. Bityutskiy <dedekind@sauron.oktetlabs.ru> |
[MTD] assume mtd->writesize is 1 for NOR flashes Signed-off-by: Artem B. Bityitskiy
/drivers/mtd/devices/mtdram.c
|
92cbfdcc3661d7670b01b92b89811cd3a2412297 |
|
30-May-2006 |
Joern Engel <joern@wh.fh-wedel.de> |
[MTD] replace MTD_RAM with MTD_GENERIC_TYPE Ram devices get the extra capability of MTD_NO_ERASE - not requiring an explicit erase before writing to it. Currently only mtdblock uses this capability. Rest of the patch is a simple text replacement. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
/drivers/mtd/devices/mtdram.c
|
f9101210e7aa72daf92722d451a2f7e3af5f781f |
|
10-Sep-2005 |
Jesper Juhl <jesper.juhl@gmail.com> |
[PATCH] vfree and kfree cleanup in drivers/ This patch does a full cleanup of 'NULL checks before vfree', and a partial cleanup of calls to kfree for all of drivers/ - the kfree bit is partial in that I only did the files that also had vfree calls in them. The patch also gets rid of some redundant (void *) casts of pointers being passed to [vk]free, and a some tiny whitespace corrections also crept in. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/mtd/devices/mtdram.c
|
c13cbf3b5086d4ed51360b86b6b0ef8b82b179dc |
|
21-Apr-2005 |
Joern Engel <joern@wohnheim.fh-wedel.de> |
[MTD] mtdram: Quick cleanup of the driver: - Lindent - Removal of slram/phram functionality - Removal of most #ifdefs Signed-off-by: Joern Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/drivers/mtd/devices/mtdram.c
|
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 |
|
17-Apr-2005 |
Linus Torvalds <torvalds@ppc970.osdl.org> |
Linux-2.6.12-rc2 Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
/drivers/mtd/devices/mtdram.c
|