Skip to contentSkip to conversation

fdt: allow address translation in case of SPL_OF_TRANSLATE

PATCH Superseded Vikas Manocha 2 participants 2 messages Mar 31, 2017 – Apr 1, 2017 Library code

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fdt: allow address translation in case of SPL_OF_TRANSLATE

Address translation is not working at present even if SPL_OF_TRANSLATE is enabled which makes this configuration useless. This patch enables address translation for SPL u-boot when SPL_OF_TRANSLATE is selected.

---

Changed in v2:
- Added commit message

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fdtdec.c +1 -1
index 81f47ef..a1c4d16 100644
@@ -112,7 +112,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,
 		return FDT_ADDR_T_NONE;
 	}
 
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_OF_LIBFDT)
+#if defined(CONFIG_SPL_OF_TRANSLATE) || defined(CONFIG_OF_LIBFDT)
 	if (translate)
 		addr = fdt_translate_address(blob, node, prop_addr);
 	else
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/1 fdt: allow address translation in case of SPL_OF_TRANSLATE

Quoted 3 lines · Vikas Manocha

Address translation is not working at present even if SPL_OF_TRANSLATE is enabled which makes this configuration useless. This patch enables address translation for SPL u-boot when SPL_OF_TRANSLATE is selected.

U-Boot

Quoted 9 lines

---

Changed in v2:
- Added commit message

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 17 lines
lib/fdtdec.c +1 -2
index 81f47ef..a1c4d16 100644
@@ -112,7 +112,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,
                return FDT_ADDR_T_NONE;
        }
 
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_OF_LIBFDT)
+#if defined(CONFIG_SPL_OF_TRANSLATE) || defined(CONFIG_OF_LIBFDT)
        if (translate)
                addr = fdt_translate_address(blob, node, prop_addr);
        else
--

1.9.1