[U-Boot,v2] libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT

Submitted by Vignesh R on March 20, 2017, 4:34 a.m.

Details

Message ID 20170320043438.19912-1-vigneshr@ti.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Vignesh R March 20, 2017, 4:34 a.m.
Use CONFIG_IS_ENABLED() macro to check whether OF_TRANSLATE is enabled, so
that code block is compiled irrespective of SPL or U-Boot build
and fdt address translation is used.

Signed-off-by: Vignesh R <vigneshr@ti.com>
---

v2:
* Depend on OF_TRANSLATE instead of OF_LIBFDT so that boards like
  chromebook_link64_defconfig compile fine.

 lib/fdtdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass March 27, 2017, 2:27 a.m.
On 19 March 2017 at 22:34, Vignesh R <vigneshr@ti.com> wrote:
> Use CONFIG_IS_ENABLED() macro to check whether OF_TRANSLATE is enabled, so
> that code block is compiled irrespective of SPL or U-Boot build
> and fdt address translation is used.
>
> Signed-off-by: Vignesh R <vigneshr@ti.com>
> ---
>
> v2:
> * Depend on OF_TRANSLATE instead of OF_LIBFDT so that boards like
>   chromebook_link64_defconfig compile fine.
>
>  lib/fdtdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm, thanks!

Patch hide | download patch | download mbox

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 81f47ef2c7f4..1edfbf2d3921 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -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 CONFIG_IS_ENABLED(OF_TRANSLATE)
 	if (translate)
 		addr = fdt_translate_address(blob, node, prop_addr);
 	else