[MTD] update internal API to support 64-bit device size
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Wed, 10 Dec 2008 13:37:21 +0000 (13:37 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 10 Dec 2008 13:37:21 +0000 (13:37 +0000)
commit69423d99fc182a81f3c5db3eb5c140acc6fc64be
tree5f1818e6fb69388f0da276152646bf0597e318c0
parent8a4c2495b142fe612b291a810d9e695f269c26db
[MTD] update internal API to support 64-bit device size

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>
30 files changed:
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0020.c
drivers/mtd/chips/fwh_lock.h
drivers/mtd/inftlcore.c
drivers/mtd/inftlmount.c
drivers/mtd/maps/amd76xrom.c
drivers/mtd/maps/ck804xrom.c
drivers/mtd/maps/esb2rom.c
drivers/mtd/maps/ichxrom.c
drivers/mtd/maps/nettel.c
drivers/mtd/maps/scb2_flash.c
drivers/mtd/mtdchar.c
drivers/mtd/mtdconcat.c
drivers/mtd/mtdcore.c
drivers/mtd/mtdoops.c
drivers/mtd/mtdpart.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nftlcore.c
drivers/mtd/nftlmount.c
drivers/mtd/onenand/onenand_base.c
drivers/mtd/rfd_ftl.c
drivers/mtd/ssfdc.c
drivers/mtd/ubi/build.c
drivers/mtd/ubi/gluebi.c
fs/jffs2/erase.c
include/linux/mtd/mtd.h
include/linux/mtd/nand.h
include/linux/mtd/partitions.h