summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSamuel Holland <[email protected]>2024-07-30 21:58:56 -0700
committerAnup Patel <[email protected]>2024-08-24 13:03:01 +0530
commitc36801841e366fa3ddeb7d7888b8691006c0b552 (patch)
tree4af77b9a9684dd6d3a3bd6a88dd54c567a54c46d /lib
parentfa6dfce017eed32cbae2581bc285bafd52929d42 (diff)
lib: utils/serial: Pass the FDT to fdt_serial_init()
Indicate that this function does not modify the FDT blob, and deduplicate the call to fdt_get_address(). Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/serial/fdt_serial.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/utils/serial/fdt_serial.c b/lib/utils/serial/fdt_serial.c
index 6f995cf7..a2a96cb2 100644
--- a/lib/utils/serial/fdt_serial.c
+++ b/lib/utils/serial/fdt_serial.c
@@ -17,13 +17,12 @@
extern struct fdt_serial *fdt_serial_drivers[];
extern unsigned long fdt_serial_drivers_size;
-int fdt_serial_init(void)
+int fdt_serial_init(const void *fdt)
{
const void *prop;
struct fdt_serial *drv;
const struct fdt_match *match;
int pos, noff = -1, len, coff, rc;
- const void *fdt = fdt_get_address();
/* Find offset of node pointed to by stdout-path */
coff = fdt_path_offset(fdt, "/chosen");