u-boot-brain/tools/dtoc
Simon Glass 8a38abfc43 dm: Use driver_info index instead of pointer
At present we use a 'node' pointer in the of-platadata phandle_n_arg
structs. This is a pointer to the struct driver_info for a particular
device, and we can use it to obtain the struct udevice pointer itself.

Since we don't know the struct udevice pointer until it is allocated in
memory, we have to fix up the phandle_n_arg.node at runtime. This is
annoying since it requires that SPL's data is writable and adds a small
amount of extra (generated) code in the dm_populate_phandle_data()
function.

Now that we can find a driver_info by its index, it is easier to put the
index in the phandle_n_arg structures.

Update dtoc to do this, add a new device_get_by_driver_info_idx() to look
up a device by drive_info index and update the tests to match.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-29 14:42:18 -06:00
..
.gitignore dm: Add a library to provide simple device-tree access 2016-07-14 20:40:24 -06:00
dtb_platdata.py dm: Use driver_info index instead of pointer 2020-10-29 14:42:18 -06:00
dtoc dtoc: Rename the main module 2020-04-26 14:25:21 -06:00
dtoc_test_add_prop.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_addr32_64.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_addr32.dts SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dtoc_test_addr64_32.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_addr64.dts SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dtoc_test_aliases.dts dtoc: look for compatible string aliases in driver list 2020-07-28 19:30:39 -06:00
dtoc_test_bad_reg.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_bad_reg2.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_driver_alias.dts dtoc: add support to scan drivers 2020-07-09 22:00:15 -06:00
dtoc_test_empty.dts SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dtoc_test_invalid_driver.dts dtoc: add option to disable warnings 2020-07-09 22:00:29 -06:00
dtoc_test_phandle_bad.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_phandle_bad2.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_phandle_cd_gpios.dts dtoc: add test for cd-gpios 2020-07-09 22:00:29 -06:00
dtoc_test_phandle_reorder.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_phandle_single.dts dtoc: Increase code coverage to 100% 2018-07-09 09:11:00 -06:00
dtoc_test_phandle.dts dtoc: Fix properties with a single zero-arg phandle 2018-07-09 09:11:00 -06:00
dtoc_test_scan_drivers.cxx dtoc: add coverage test for unicode error 2020-07-28 19:30:39 -06:00
dtoc_test_simple.dts dtoc: Fix widening of int to bytes 2020-10-29 14:42:17 -06:00
dtoc_test.dts SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fdt_util.py binman: Use target-specific tools when cross-compiling 2020-09-22 12:54:13 -06:00
fdt.py dtoc: Fix widening of int to bytes 2020-10-29 14:42:17 -06:00
main.py patman: Tidy up sys.path changes 2020-04-26 14:25:21 -06:00
setup.py dtoc: Add a setup script for Python 2020-08-22 08:53:38 -06:00
test_dtoc.py dm: Use driver_info index instead of pointer 2020-10-29 14:42:18 -06:00
test_fdt dtoc: Add some tests for the fdt module 2018-07-09 09:11:00 -06:00
test_fdt.py dtoc: Fix widening of int to bytes 2020-10-29 14:42:17 -06:00