summaryrefslogtreecommitdiffstats
path: root/common/imx-bbu-nand-fcb.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-06-12 06:23:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-06-12 08:28:04 +0200
commit103b88ace1c85be724bd758fe21366d090315c76 (patch)
treed97b9089c9f41dbe1b974d02a197f58d46115279 /common/imx-bbu-nand-fcb.c
parent92a5a43ac7127c9616b369e90faec718c42ec7c7 (diff)
downloadbarebox-103b88ace1c85be724bd758fe21366d090315c76.tar.gz
imx-bbu-nand-fcb: Use barebox partition instead of whole device
We used to use nand0 device for storing barebox and made the assumption that there is enough space at the beginning of the first device. Instead, use the barebox partition directly. This requires that the partition where barebox should be stored is named 'barebox', that is the case for all boards currently. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/imx-bbu-nand-fcb.c')
-rw-r--r--common/imx-bbu-nand-fcb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 5b984d4..ca7df97 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -370,7 +370,7 @@ static int imx6_bbu_nand_update(struct bbu_handler *handler, struct bbu_data *da
if (ret)
return ret;
- bcb_cdev = cdev_by_name("nand0");
+ bcb_cdev = cdev_by_name(handler->devicefile);
if (!bcb_cdev) {
pr_err("%s: No FCB device!\n", __func__);
return -ENODEV;
@@ -478,7 +478,7 @@ int imx6_bbu_nand_register_handler(const char *name, unsigned long flags)
int ret;
handler = xzalloc(sizeof(*handler));
- handler->devicefile = "/dev/nand0";
+ handler->devicefile = "nand0.barebox";
handler->name = name;
handler->flags = flags;
handler->handler = imx6_bbu_nand_update;