diff options
| author | Michael Brown | 2025-05-09 17:26:41 +0200 |
|---|---|---|
| committer | Michael Brown | 2025-05-09 20:09:57 +0200 |
| commit | f988ec09e01b54d21d1b1fa0e2b3121d926ed7df (patch) | |
| tree | 3b6e8c5c1ea87f418b311eda74f30989cad8cf90 /src/include/ipxe/devtree.h | |
| parent | [riscv] Use load and store pseudo-instructions where possible (diff) | |
| download | ipxe-f988ec09e01b54d21d1b1fa0e2b3121d926ed7df.tar.gz ipxe-f988ec09e01b54d21d1b1fa0e2b3121d926ed7df.tar.xz ipxe-f988ec09e01b54d21d1b1fa0e2b3121d926ed7df.zip | |
[fdt] Generalise access to "reg" property
The "reg" property is also used by non-device nodes, such as the nodes
describing the system memory map.
Provide generalised functionality for parsing the "#address-cells",
"#size-cells", and "reg" properties.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/devtree.h')
| -rw-r--r-- | src/include/ipxe/devtree.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/include/ipxe/devtree.h b/src/include/ipxe/devtree.h index 04414f370..6e9286af4 100644 --- a/src/include/ipxe/devtree.h +++ b/src/include/ipxe/devtree.h @@ -11,6 +11,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include <ipxe/device.h> #include <ipxe/dma.h> +#include <ipxe/fdt.h> /** A devicetree device */ struct dt_device { @@ -25,18 +26,10 @@ struct dt_device { /** Driver-private data */ void *priv; - /** Number of address cells for child devices */ - uint32_t address_cells; - /** Number of size cells for child devices */ - uint32_t size_cells; + /** Register cell size specification */ + struct fdt_reg_cells regs; }; -/** Default number of address cells, if not specified */ -#define DT_DEFAULT_ADDRESS_CELLS 2 - -/** Default number of size cells, if not specified */ -#define DT_DEFAULT_SIZE_CELLS 1 - /** A devicetree driver */ struct dt_driver { /** Driver name */ |
