[PATCH v4 10/14] dtoc: extend dtoc to use struct driver_info when linking nodes

Simon Glass sjg at chromium.org
Fri Jun 26 03:43:12 CEST 2020


On Wed, 24 Jun 2020 at 22:11, Walter Lozano <walter.lozano at collabora.com> wrote:
>
> In the current implementation, when dtoc parses a dtb to generate a struct
> platdata it converts the information related to linked nodes as pointers
> to struct platdata of destination nodes. By doing this, it makes
> difficult to get pointer to udevices created based on these
> information.
>
> This patch extends dtoc to use struct driver_info when populating
> information about linked nodes, which makes it easier to later get
> the devices created. In this context, reimplement functions like
> clk_get_by_index_platdata() which made use of the previous approach.
>
> Signed-off-by: Walter Lozano <walter.lozano at collabora.com>
> ---
>
>  drivers/clk/clk-uclass.c            |  11 ++-
>  drivers/misc/irq-uclass.c           |  10 ++-
>  drivers/mmc/ftsdc010_mci.c          |   2 +-
>  drivers/mmc/rockchip_dw_mmc.c       |   2 +-
>  drivers/mmc/rockchip_sdhci.c        |   2 +-
>  drivers/ram/rockchip/sdram_rk3399.c |   2 +-
>  drivers/spi/rk_spi.c                |   2 +-
>  include/clk.h                       |   4 +-
>  tools/dtoc/dtb_platdata.py          |  26 ++++++-
>  tools/dtoc/test_dtoc.py             | 104 ++++++++++++++++------------
>  10 files changed, 100 insertions(+), 65 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list