u-boot/drivers/core
Jonas Karlman d07d868be3 dm: core: Fix address translation in devfdt_get_addr_index()
During address translation #address/size-cells props are expected to
apply to child nodes. However, devfdt_get_addr_index() incorrectly use
the parent offset of the udevice parent instead of getting the offset of
the node parent. This will work in most cases when there is only one
udevice tied to a node.

On e.g. an Orange Pi R1 Plus TLS board the dwc3-generic (parent) and
dwc3-generic-host (child) udevice is tied to the same node.

In that case both the offset and parent values end up being the same.
As a result, the #address/size-cells props intended for child nodes
incorrectly gets applied to the node itself resulting in wrong addr
being returned, 0x0 instead of 0xff600000.

The following can be seen on console:

  dwc3-generic-host usb@ff600000: this is not a DesignWare USB3 DRD Core
  dwc3-generic-host usb@ff600000: failed to initialize core

Fix this by using the offset of the parent node and not the offset to
the node the parent udevice is tied to.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-03-04 10:25:47 -05:00
..
acpi.c common: Drop display_options.h from common header 2022-08-10 13:46:55 -04:00
device-remove.c dm: core: Use device_foreach_child where possible 2022-06-28 03:09:51 +01:00
device.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
devres.c dm: core: Use device_foreach_child where possible 2022-06-28 03:09:51 +01:00
dump.c dm: core: Adjust dump-sorting to get stats only when needed 2023-10-04 09:25:20 -06:00
fdtaddr.c dm: core: Fix address translation in devfdt_get_addr_index() 2024-03-04 10:25:47 -05:00
Kconfig Prepare v2024.01-rc3 2023-11-20 09:19:50 -05:00
lists.c dm: core: Fix iteration over driver_info records 2022-12-02 08:39:00 -05:00
Makefile spl: Allow enabling SPL_OF_REAL and SPL_OF_PLATDATA at the same time 2023-10-17 20:50:52 -04:00
of_access.c dm: core: Add a way to delete a node 2023-10-06 14:38:13 -04:00
of_addr.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
of_extra.c net: introduce a helper to determine whether to use in-band autoneg 2021-11-23 09:57:55 +02:00
ofnode.c fdt: Check for a valid fdt in oftree_ensure() 2023-12-13 18:39:05 -05:00
read_extra.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
read.c core: introduce dev_read_addr_name[_size]_ptr() functions 2023-10-13 10:15:41 -07:00
regmap.c core: remap: fix regmap_init_mem_plat() reg size handeling 2023-05-06 17:28:18 +08:00
root.c lib: acpi: Fix linking SPL when ACPIGEN is enabled 2023-10-17 20:50:52 -04:00
simple-bus.c treewide: Use OF_REAL instead of !OF_PLATDATA 2021-09-25 09:46:15 -06:00
simple-pm-bus.c simple-pm-bus: Use -ENOSYS for checking missing system call 2021-04-06 16:33:19 +12:00
syscon-uclass.c core: remap: fix regmap_init_mem_plat() reg size handeling 2023-05-06 17:28:18 +08:00
tag.c dm: core: Add a command to show driver model statistics 2022-06-28 03:09:52 +01:00
uclass.c dm: core: introduce uclass_get_device_by_of_path() 2023-04-28 11:48:59 -06:00
util.c pci: serial: Support reading PCI-register size with base 2023-10-06 14:38:13 -04:00