diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-06-12 06:23:30 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-06-12 08:28:04 +0200 |
commit | 103b88ace1c85be724bd758fe21366d090315c76 (patch) | |
tree | d97b9089c9f41dbe1b974d02a197f58d46115279 /common/imx-bbu-nand-fcb.c | |
parent | 92a5a43ac7127c9616b369e90faec718c42ec7c7 (diff) | |
download | barebox-103b88ace1c85be724bd758fe21366d090315c76.tar.gz barebox-103b88ace1c85be724bd758fe21366d090315c76.tar.xz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c index 5b984d4148..ca7df97f8d 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; |