diff options
author | Adrian Hunter <ext-adrian.hunter@nokia.com> | 2008-12-10 08:37:21 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-12-10 08:37:21 -0500 |
commit | 69423d99fc182a81f3c5db3eb5c140acc6fc64be (patch) | |
tree | 5f1818e6fb69388f0da276152646bf0597e318c0 /drivers/mtd/chips/cfi_cmdset_0002.c | |
parent | 8a4c2495b142fe612b291a810d9e695f269c26db (diff) |
[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>
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0002.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0002.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index d74ec46aa032..f9c435a42670 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c | |||
@@ -71,8 +71,8 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr | |||
71 | static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr); | 71 | static void put_chip(struct map_info *map, struct flchip *chip, unsigned long adr); |
72 | #include "fwh_lock.h" | 72 | #include "fwh_lock.h" |
73 | 73 | ||
74 | static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, size_t len); | 74 | static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); |
75 | static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, size_t len); | 75 | static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); |
76 | 76 | ||
77 | static struct mtd_chip_driver cfi_amdstd_chipdrv = { | 77 | static struct mtd_chip_driver cfi_amdstd_chipdrv = { |
78 | .probe = NULL, /* Not usable directly */ | 78 | .probe = NULL, /* Not usable directly */ |
@@ -1774,12 +1774,12 @@ out_unlock: | |||
1774 | return ret; | 1774 | return ret; |
1775 | } | 1775 | } |
1776 | 1776 | ||
1777 | static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, size_t len) | 1777 | static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) |
1778 | { | 1778 | { |
1779 | return cfi_varsize_frob(mtd, do_atmel_lock, ofs, len, NULL); | 1779 | return cfi_varsize_frob(mtd, do_atmel_lock, ofs, len, NULL); |
1780 | } | 1780 | } |
1781 | 1781 | ||
1782 | static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, size_t len) | 1782 | static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) |
1783 | { | 1783 | { |
1784 | return cfi_varsize_frob(mtd, do_atmel_unlock, ofs, len, NULL); | 1784 | return cfi_varsize_frob(mtd, do_atmel_unlock, ofs, len, NULL); |
1785 | } | 1785 | } |