9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2015-06-12 06:23:30 +02:00
parent 92a5a43ac7
commit 103b88ace1
1 changed files with 2 additions and 2 deletions

View File

@ -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;