9
0
Fork 0

mtd: Make erase_info structs 64bit where necessary

Make the userspace structs 64bit where necessary. Since we do not have
separated kernel/userspace in barebox we can just modifiy the original
structs instead of adding separate 64bit structs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2016-02-08 14:18:32 +01:00
parent d5128bfaf4
commit 1e009bf266
3 changed files with 9 additions and 9 deletions

View File

@ -169,7 +169,7 @@ static int mtd_op_erase(struct cdev *cdev, size_t count, loff_t offset)
erase.len = mtd->erasesize;
while (count > 0) {
dev_dbg(cdev->dev, "erase %d %d\n", addr, erase.len);
dev_dbg(cdev->dev, "erase 0x%08llx len: 0x%08llx\n", addr, erase.len);
if (mtd->allow_erasebad || (mtd->master && mtd->master->allow_erasebad))
ret = 0;

View File

@ -10,13 +10,13 @@
#include <asm-generic/div64.h>
struct erase_info_user {
uint32_t start;
uint32_t length;
uint64_t start;
uint64_t length;
};
struct mtd_oob_buf {
uint32_t start;
uint32_t length;
uint64_t start;
uint64_t length;
unsigned char *ptr;
};

View File

@ -31,9 +31,9 @@
specific to any particular block. */
struct erase_info {
struct mtd_info *mtd;
u_int32_t addr;
u_int32_t len;
u_int32_t fail_addr;
u_int64_t addr;
u_int64_t len;
u_int64_t fail_addr;
u_long time;
u_long retries;
u_int dev;
@ -45,7 +45,7 @@ struct erase_info {
};
struct mtd_erase_region_info {
u_int32_t offset; /* At which this region starts, from the beginning of the MTD */
u_int64_t offset; /* At which this region starts, from the beginning of the MTD */
u_int32_t erasesize; /* For this region */
u_int32_t numblocks; /* Number of blocks of erasesize in this region */
unsigned long *lockmap; /* If keeping bitmap of locks */