ofnode: Replace of_n_addr_cells with of_n_size_cells
PATCH v2 1/2 ofnode: Replace of_n_addr_cells with of_n_size_cells
The size should be decoded using of_n_size_cells(), make it so.
---
V2: New patch
--- drivers/core/ofnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/core/ofnode.c +1 -1
@@ -541,7 +541,7 @@ fdt_addr_t ofnode_get_addr_size(ofnode node, const char *property,if (!prop)return FDT_ADDR_T_NONE ; na =of_n_addr_cells (np); - ns =of_n_addr_cells (np); + ns =of_n_size_cells (np); *sizep =of_read_number (prop + na, ns);return of_read_number (prop, na); }else {
Signature · 1 line
2.18.0
PATCH v2 2/2 ofnode: Add missing address translation into ofnode_get_addr_size()
Of CONFIG_OF_TRANSLATE is enabled, this function still returns untranslated bogus results. Add the missing translation.
---
V2: - Use np directly
- Drop extra of_n_addr_cells
--- drivers/core/ofnode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/core/ofnode.c +5 -1
@@ -543,7 +543,11 @@ fdt_addr_t ofnode_get_addr_size(ofnode node, const char *property, na =of_n_addr_cells (np); ns =of_n_size_cells (np); *sizep =of_read_number (prop + na, ns); -return of_read_number (prop, na); + +if (IS_ENABLED (CONFIG_OF_TRANSLATE ) && ns >0 ) +return of_translate_address (np, prop); +else +return of_read_number (prop, na); }else { return fdtdec_get_addr_size(gd->fdt_blob, ofnode_to_offset(node), property,
Signature · 1 line
2.18.0
PATCH v2 2/2 ofnode: Add missing address translation into ofnode_get_addr_size()
Quoted 6 lines · Marek Vasut
Of
CONFIG_OF_TRANSLATEis enabled, this function still returns untranslated bogus results. Add the missing translation.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>
Quoted 6 lines
---
V2: - Use np directly
- Drop extraof_n_addr_cells--- drivers/core/ofnode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
PATCH v2 2/2 ofnode: Add missing address translation into ofnode_get_addr_size()
Quoted 6 lines · Marek Vasut
Of
CONFIG_OF_TRANSLATEis enabled, this function still returns untranslated bogus results. Add the missing translation.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>
Quoted 6 lines
---
V2: - Use np directly
- Drop extraof_n_addr_cells--- drivers/core/ofnode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Applied to u-boot-dm thanks!
PATCH v2 1/2 ofnode: Replace of_n_addr_cells with of_n_size_cells
In reply to Marek VasutQuoted 10 lines · Marek Vasut
The size should be decoded using
of_n_size_cells(), make it so.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>---
V2: New patch--- drivers/core/ofnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH v2 1/2 ofnode: Replace of_n_addr_cells with of_n_size_cells
Quoted 10 lines · Marek Vasut
The size should be decoded using
of_n_size_cells(), make it so.Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>---
V2: New patch--- drivers/core/ofnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm thanks!