mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 3/7] mtd: Make erase_info structs 64bit where necessary
Date: Tue,  9 Feb 2016 10:55:44 +0100	[thread overview]
Message-ID: <1455011748-5538-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1455011748-5538-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 drivers/mtd/core.c          | 2 +-
 include/linux/mtd/mtd-abi.h | 8 ++++----
 include/linux/mtd/mtd.h     | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 62307db..586b4a0 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -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;
diff --git a/include/linux/mtd/mtd-abi.h b/include/linux/mtd/mtd-abi.h
index c46605d..8e778df 100644
--- a/include/linux/mtd/mtd-abi.h
+++ b/include/linux/mtd/mtd-abi.h
@@ -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;
 };
 
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 7e828bc..e430217 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -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 */
-- 
2.7.0.rc3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-02-09  9:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09  9:55 [PATCH] mtd: >4GiB fixes Sascha Hauer
2016-02-09  9:55 ` [PATCH 1/7] mtd: nand-bb: Fix 8k page size nands Sascha Hauer
2016-02-09  9:55 ` [PATCH 2/7] mtd: Fix mtdraw for Nand > 4GiB Sascha Hauer
2016-02-09  9:55 ` Sascha Hauer [this message]
2016-02-09  9:55 ` [PATCH 4/7] mtd: Fix mtd_op_read for devices >4GiB Sascha Hauer
2016-02-09  9:55 ` [PATCH 5/7] mtd: Fix mtd_op_erase " Sascha Hauer
2016-02-09  9:55 ` [PATCH 6/7] mtd: Fix erasing of " Sascha Hauer
2016-02-09  9:55 ` [PATCH 7/7] mtd: mtdoob device: change name to have the chip name first Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455011748-5538-4-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox