dtoc: add support to scan drivers
authorWalter Lozano <walter.lozano@collabora.com>
Fri, 3 Jul 2020 11:07:17 +0000 (08:07 -0300)
committerSimon Glass <sjg@chromium.org>
Fri, 10 Jul 2020 04:00:15 +0000 (22:00 -0600)
commitdac8228df99d140b5204d0687599c839f3938bc8
treef86f66ac79c859d0712494304a167218bb7ffb57
parentaddf358bac1d2bd087b77be7d4d95a2a2e5dfcaf
dtoc: add support to scan drivers

Currently dtoc scans dtbs to convert them to struct platdata and
to generate U_BOOT_DEVICE entries. These entries need to be filled
with the driver name, but at this moment the information used is the
compatible name present in the dtb. This causes that only nodes with
a compatible name that matches a driver name generate a working
entry.

In order to improve this behaviour, this patch adds to dtoc the
capability of scan drivers source code to generate a list of valid driver
names and aliases. This allows to generate U_BOOT_DEVICE entries using
valid driver names and rise a warning in the case a name is not valid.

Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Open files in utf-8 mode:
Signed-off-by: Simon Glass <sjg@chromium.org>
tools/dtoc/dtb_platdata.py
tools/dtoc/dtoc_test_driver_alias.dts [new file with mode: 0644]
tools/dtoc/test_dtoc.py