diff mbox

[U-Boot,v3] fdt: allow address translation in case of SPL_OF_TRANSLATE

Message ID 1491343182-6982-1-git-send-email-vikas.manocha@st.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Vikas MANOCHA April 4, 2017, 9:59 p.m. UTC
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.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: changed "u-boot" to "U-Boot" in commit message.
Changes in v2: Added commit message 

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

Comments

Simon Glass April 5, 2017, 3:27 a.m. UTC | #1
Hi Vikas,

On 4 April 2017 at 15:59, Vikas Manocha <vikas.manocha@st.com> wrote:
> 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.
>
> Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v3: changed "u-boot" to "U-Boot" in commit message.
> Changes in v2: Added commit message
>
>  lib/fdtdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
> index 81f47ef..a1c4d16 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 defined(CONFIG_SPL_OF_TRANSLATE) || defined(CONFIG_OF_LIBFDT)
>         if (translate)
>                 addr = fdt_translate_address(blob, node, prop_addr);
>         else
> --
> 1.9.1
>

Actually I'm a bit unsure about this patch. You already have a patch applied:

5efa1bf libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT

Do you actually want this one else well? If so, please resend it as it
conflicts.

Regards,
Simon
Vikas MANOCHA April 5, 2017, 4:12 p.m. UTC | #2
Hi Simon,

On 04/04/2017 08:27 PM, Simon Glass wrote:
> Hi Vikas,
> 
> On 4 April 2017 at 15:59, Vikas Manocha <vikas.manocha@st.com> wrote:
>> 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.
>>
>> Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> Changes in v3: changed "u-boot" to "U-Boot" in commit message.
>> Changes in v2: Added commit message
>>
>>  lib/fdtdec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
>> index 81f47ef..a1c4d16 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 defined(CONFIG_SPL_OF_TRANSLATE) || defined(CONFIG_OF_LIBFDT)
>>         if (translate)
>>                 addr = fdt_translate_address(blob, node, prop_addr);
>>         else
>> --
>> 1.9.1
>>
> 
> Actually I'm a bit unsure about this patch. You already have a patch applied:
> 
> 5efa1bf libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT


This patch(5efa1bf) was recently applied & serves the same purpose.
We can ignore my patch.

Cheers,
Vikas

> 
> Do you actually want this one else well? If so, please resend it as it
> conflicts.
> 
> Regards,
> Simon
> .
>
diff mbox

Patch

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 81f47ef..a1c4d16 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 defined(CONFIG_SPL_OF_TRANSLATE) || defined(CONFIG_OF_LIBFDT)
 	if (translate)
 		addr = fdt_translate_address(blob, node, prop_addr);
 	else