@@ -217,18 +217,18 @@ static int extlinux_read_bootflow(struct udevice *dev, struct bootflow *bflow)
static int extlinux_local_boot(struct udevice *dev, struct bootflow *bflow)
{
- struct extlinux_plat *plat = dev_get_plat(dev);
+ struct extlinux_priv *priv = dev_get_priv(dev);
- return extlinux_boot(dev, bflow, &plat->ctx, extlinux_getfile, true,
+ return extlinux_boot(dev, bflow, &priv->ctx, extlinux_getfile, true,
bflow->fname, false);
}
#if CONFIG_IS_ENABLED(BOOTSTD_FULL)
static int extlinux_local_read_all(struct udevice *dev, struct bootflow *bflow)
{
- struct extlinux_plat *plat = dev_get_plat(dev);
+ struct extlinux_priv *priv = dev_get_priv(dev);
- return extlinux_read_all(dev, bflow, &plat->ctx, extlinux_getfile,
+ return extlinux_read_all(dev, bflow, &priv->ctx, extlinux_getfile,
true, bflow->fname);
}
#endif
@@ -267,5 +267,6 @@ U_BOOT_DRIVER(bootmeth_1extlinux) = {
.of_match = extlinux_bootmeth_ids,
.ops = &extlinux_bootmeth_ops,
.bind = extlinux_bootmeth_bind,
- .plat_auto = sizeof(struct extlinux_plat)
+ .plat_auto = sizeof(struct extlinux_plat),
+ .priv_auto = sizeof(struct extlinux_priv),
};
@@ -145,18 +145,18 @@ static int extlinux_pxe_read_file(struct udevice *dev, struct bootflow *bflow,
static int extlinux_pxe_boot(struct udevice *dev, struct bootflow *bflow)
{
- struct extlinux_plat *plat = dev_get_plat(dev);
+ struct extlinux_priv *priv = dev_get_priv(dev);
- return extlinux_boot(dev, bflow, &plat->ctx, extlinux_pxe_getfile,
+ return extlinux_boot(dev, bflow, &priv->ctx, extlinux_pxe_getfile,
false, bflow->subdir, false);
}
#if CONFIG_IS_ENABLED(BOOTSTD_FULL)
static int extlinux_pxe_read_all(struct udevice *dev, struct bootflow *bflow)
{
- struct extlinux_plat *plat = dev_get_plat(dev);
+ struct extlinux_priv *priv = dev_get_priv(dev);
- return extlinux_read_all(dev, bflow, &plat->ctx,
+ return extlinux_read_all(dev, bflow, &priv->ctx,
extlinux_pxe_getfile, false, bflow->subdir);
}
#endif
@@ -193,5 +193,6 @@ U_BOOT_DRIVER(bootmeth_zpxe) = {
.of_match = extlinux_bootmeth_pxe_ids,
.ops = &extlinux_bootmeth_pxe_ops,
.bind = extlinux_bootmeth_pxe_bind,
- .plat_auto = sizeof(struct extlinux_plat)
+ .plat_auto = sizeof(struct extlinux_plat),
+ .priv_auto = sizeof(struct extlinux_priv),
};
@@ -85,8 +85,8 @@ static int extlinux_setup(struct udevice *dev, struct bootflow *bflow,
plat->info.dev = dev;
plat->info.bflow = bflow;
- ret = pxe_setup_ctx(ctx, getfile, &plat->info, allow_abs_path, bootfile,
- false, plat->use_fallback, bflow);
+ ret = pxe_setup_ctx(ctx, getfile, &plat->info, allow_abs_path,
+ bootfile, false, plat->use_fallback, bflow);
if (ret)
return log_msg_ret("ctx", ret);
log_debug("bootfl flags %x\n", bflow->flags);
@@ -23,18 +23,25 @@ struct extlinux_info {
};
/**
- * struct extlinux_plat - locate state for this bootmeth
+ * struct extlinux_plat - platform data for this bootmeth
*
* @use_falllback: true to boot with the fallback option
- * @ctx: holds the PXE context, if it should be saved
* @info: information used for the getfile() method
*/
struct extlinux_plat {
bool use_fallback;
- struct pxe_context ctx;
struct extlinux_info info;
};
+/**
+ * struct extlinux_priv - private runtime data for this bootmeth
+ *
+ * @ctx: holds the PXE context
+ */
+struct extlinux_priv {
+ struct pxe_context ctx;
+};
+
/**
* extlinux_set_property() - set an extlinux property
*