aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohan Jonker2023-03-13 01:32:04 +0100
committerKever Yang2023-05-06 17:28:18 +0800
commita12a73b66476c48dfe5afd2c3711153d09feda6c (patch)
tree3a73c36e66587675ac707d82a8852653d4eaec65 /doc
parente5822ecba2d73e64ca55c26fc4762d9e80b1f1b5 (diff)
drivers: use dev_read_addr_ptr when cast to pointer
The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU can expect 64-bit data from the device tree parser, so use dev_read_addr_ptr instead of the dev_read_addr function in the various files in the drivers directory that cast to a pointer. As we are there also streamline the error response to -EINVAL on return. Signed-off-by: Johan Jonker <jbx6244@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/develop/driver-model/livetree.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/develop/driver-model/livetree.rst b/doc/develop/driver-model/livetree.rst
index 579eef5ca9f..20055d559a6 100644
--- a/doc/develop/driver-model/livetree.rst
+++ b/doc/develop/driver-model/livetree.rst
@@ -103,7 +103,7 @@ The new code is:
struct udevice *bus;
- i2c_bus->regs = (struct i2c_ctlr *)dev_read_addr(dev);
+ i2c_bus->regs = dev_read_addr_ptr(dev);
plat->frequency = dev_read_u32_default(bus, "spi-max-frequency", 500000);
The dev_read\_...() interface is more convenient and works with both the