
Move this struct into the plat data so that we can use it multiple times during the boot process.
Signed-off-by: Simon Glass sjg@chromium.org ---
boot/bootmeth_extlinux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/boot/bootmeth_extlinux.c b/boot/bootmeth_extlinux.c index b48f96b16ef..2f8e579540b 100644 --- a/boot/bootmeth_extlinux.c +++ b/boot/bootmeth_extlinux.c @@ -26,9 +26,11 @@ * * @use_fallback: true to boot with the fallback option * @info: Info passed to the extlinux_getfile() function + * @ctx: holds the PXE context, if it should be saved */ struct extlinux_plat { bool use_fallback; + struct pxe_context ctx; struct extlinux_info info; };
@@ -181,7 +183,6 @@ static int extlinux_read_bootflow(struct udevice *dev, struct bootflow *bflow) static int extlinux_boot(struct udevice *dev, struct bootflow *bflow) { struct extlinux_plat *plat = dev_get_plat(dev); - struct pxe_context ctx; ulong addr; int ret;
@@ -190,12 +191,12 @@ static int extlinux_boot(struct udevice *dev, struct bootflow *bflow) plat->info.dev = dev; plat->info.bflow = bflow;
- ret = pxe_setup_ctx(&ctx, extlinux_getfile, &plat->info, true, + ret = pxe_setup_ctx(&plat->ctx, extlinux_getfile, &plat->info, true, bflow->fname, false, plat->use_fallback, bflow); if (ret) return log_msg_ret("ctx", -EINVAL);
- ret = pxe_process(&ctx, addr, false); + ret = pxe_process(&plat->ctx, addr, false); if (ret) return log_msg_ret("bread", -EINVAL);