[Skiboot] [PATCH] core/opal: Fix reg format for flash at 0 node in DT
Maxim Polyakov
m.polyakov at yadro.com
Tue May 14 23:16:25 AEST 2019
24.04.2019 14:41, Maxim Polyakov пишет:
> The “reg” property for /ibm,opal/flash at 0 node in device tree has
> invalid format. For this reason, the FWTS on the Linux host displays
> the following warning:
>
> /ibm,opal/flash at 0:reg: property has invalid length (8 bytes)
> (#address-cells == 0, #size-cells == 0)
>
> This patch sets the #address-cells/#size-cells to 1 and fixes this
> problem. Resolve: https://github.com/open-power/skiboot/issues/47
>
> Signed-off-by: Maxim Polyakov <m.polyakov at yadro.com>
> ---
> core/opal.c | 21 +++++++++++++++++++--
> 1 file changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/core/opal.c b/core/opal.c
> index 624e2a2..cedff11 100644
> --- a/core/opal.c
> +++ b/core/opal.c
> @@ -406,8 +406,25 @@ void add_opal_node(void)
> (uint64_t)(cpu_max_pir + 1) * STACK_SIZE) - SKIBOOT_BASE;
>
> opal_node = dt_new_check(dt_root, "ibm,opal");
> - dt_add_property_cells(opal_node, "#address-cells", 0);
> - dt_add_property_cells(opal_node, "#size-cells", 0);
> + /*
> + * Since the "ibm,opal" node doesn`t refer to any "bus",
> + * the "#address-cells" and "#size-cells" being zero is correct.
> + * However, in this case, the “reg” property that determines the
> + * size of the flash memory in the child node “flash at 0” has an
> + * invalid format. For this reason, the FWTS on the Linux host
> + * displays the following warning:
> + *
> + * /ibm,opal/flash at 0:reg: property has invalid length (8
> + * bytes) (#address-cells == 0, #size-cells == 0)
> + *
> + * The "#address-cells" and "#size-cells" are set to 1 to fix
> + * this problem temporarily.
> + *
> + * TODO: need to add some property that contains the size of
> + * the flash device instead of "reg"
> + */
> + dt_add_property_cells(opal_node, "#address-cells", 1);
> + dt_add_property_cells(opal_node, "#size-cells", 1);
>
> if (proc_gen < proc_gen_p9)
> dt_add_property_strings(opal_node, "compatible", "ibm,opal-v2",
>
Please review this patch
Thanks
--
Regards,
Maxim Polyakov
Software Engineer, YADRO.
More information about the Skiboot
mailing list