Skip to contentSkip to conversation

nios2: Replace fdt_translate_address with of_flat_dt_translate_address

PATCH In review Guenter Roeck 3 participants 4 messages Mar 18, 2016 NIOS2 architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nios2: Replace fdt_translate_address with of_flat_dt_translate_address

nios2 builds fail with the following build error.

arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial':
arch/nios2/kernel/prom.c:100:2: error:
implicit declaration of function 'fdt_translate_address'

Commit c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()") replaced fdt_translate_address() with of_flat_dt_translate_address() but missed updating the nios2 code.

Fixes c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()")
Cc Peter Hurley <[email protected]>
Cc Rob Herring <[email protected]>
---
 arch/nios2/kernel/prom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/nios2/kernel/prom.c +1 -2
index 718dd197909f..367c5426157b 100644
@@ -97,8 +97,7 @@ static int __init early_init_dt_scan_serial(unsigned long node,
 		return 0;
 #endif
 
-	*addr64 = fdt_translate_address((const void *)initial_boot_params,
-		node);
+	*addr64 = of_flat_dt_translate_address(node);
 
 	return *addr64 == OF_BAD_ADDR ? 0 : 1;
 }
Signature · 1 line
2.5.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Guenter,

Quoted 9 lines · Guenter Roeck

nios2 builds fail with the following build error.

arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial':
arch/nios2/kernel/prom.c:100:2: error:
implicit declaration of function 'fdt_translate_address'

Commit c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()") replaced fdt_translate_address() with of_flat_dt_translate_address() but missed updating the nios2 code.

My bad.
The sad part is I even noted this other user of fdt_translate_address() in a review of a different patch, and then overlooked it in my own patch. :/

Quoted 23 lines
Fixes c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()")
Cc Peter Hurley <[email protected]>
Cc Rob Herring <[email protected]>
---
 arch/nios2/kernel/prom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/nios2/kernel/prom.c +1 -2
index 718dd197909f..367c5426157b 100644
@@ -97,8 +97,7 @@ static int __init early_init_dt_scan_serial(unsigned long node,
 		return 0;
 #endif
 
-	*addr64 = fdt_translate_address((const void *)initial_boot_params,
-		node);
+	*addr64 = of_flat_dt_translate_address(node);
 
 	return *addr64 == OF_BAD_ADDR ? 0 : 1;
 }
#2 lore raw
Quoted 13 lines · Peter Hurley

Hi Guenter,

Quoted 9 lines · Guenter Roeck

nios2 builds fail with the following build error.

arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial':
arch/nios2/kernel/prom.c:100:2: error:
implicit declaration of function 'fdt_translate_address'

Commit c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()") replaced fdt_translate_address() with of_flat_dt_translate_address() but missed updating the nios2 code.

Quoted 6 lines

My bad.
The sad part is I even noted this other user of fdt_translate_address() in a review of a different patch, and then overlooked it in my own patch. :/

Hi Peter,

Will you take this patch or you want me to take this? Thanks.

Regards
Ley Foon

#3 lore raw
Quoted 18 lines · Ley Foon Tan
Quoted 17 lines · Peter Hurley

Hi Guenter,

Quoted 9 lines · Guenter Roeck

nios2 builds fail with the following build error.

arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial':
arch/nios2/kernel/prom.c:100:2: error:
implicit declaration of function 'fdt_translate_address'

Commit c90fe9c0394b ("of: earlycon: Move address translation to of_setup_earlycon()") replaced fdt_translate_address() with of_flat_dt_translate_address() but missed updating the nios2 code.

My bad.
The sad part is I even noted this other user of fdt_translate_address() in a review of a different patch, and then overlooked it in my own patch. :/

Quoted 6 lines
Quoted 2 lines

Hi Peter,

Will you take this patch or you want me to take this? Thanks.

Please take this patch.

Regards,
Peter Hurley