diff mbox

[U-Boot,U-Boot:RESEND,[PATCH,1/7] fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()

Message ID 1391815393-19536-2-git-send-email-m-karicheri2@ti.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Murali Karicheri Feb. 7, 2014, 11:23 p.m. UTC
From: Vitaly Andrianov <vitalya@ti.com>

The keystone2 SOC requires to fix all 32 bit aliased addresses
to their 36 physical format. This has to happen after all fdt
nodes are added or modified.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
---
 - Resending with some more in cc
 common/image-fdt.c    |    5 +++++
 include/fdt_support.h |    1 +
 2 files changed, 6 insertions(+)

Comments

Tom Rini Feb. 10, 2014, 9:25 p.m. UTC | #1
On Fri, Feb 07, 2014 at 06:23:08PM -0500, Murali Karicheri wrote:

> From: Vitaly Andrianov <vitalya@ti.com>
> 
> The keystone2 SOC requires to fix all 32 bit aliased addresses
> to their 36 physical format. This has to happen after all fdt
> nodes are added or modified.
> 
> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>

Why can't this be done with the existing CONFIG_OF_BOARD_SETUP and 'fdt
boardsetup' command?
Vitaly Andrianov Feb. 11, 2014, 1:05 a.m. UTC | #2
On 02/10/2014 04:25 PM, Tom Rini wrote:
> On Fri, Feb 07, 2014 at 06:23:08PM -0500, Murali Karicheri wrote:
>
>> From: Vitaly Andrianov <vitalya@ti.com>
>>
>> The keystone2 SOC requires to fix all 32 bit aliased addresses
>> to their 36 physical format. This has to happen after all fdt
>> nodes are added or modified.
>>
>> Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
> Why can't this be done with the existing CONFIG_OF_BOARD_SETUP and 'fdt
> boardsetup' command?
>
Hi Tom,

The fdt_board_setup() is called at the beginning of the 
image_setup_libfdt().
After that fdt can be updated by fdt_resize(), fdt_initrd() etc. All 
those updates
have to be fixed. That is why we have to call the ft_board_setup_ex() at 
the end
of the image_setup_libfdt().

Thanks,
Vitaly Andrianov.
diff mbox

Patch

diff --git a/common/image-fdt.c b/common/image-fdt.c
index 6f9ce7d..ee4dd6f 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -487,5 +487,10 @@  int image_setup_libfdt(bootm_headers_t *images, void *blob,
 	if (!ft_verify_fdt(blob))
 		return -1;
 
+#ifdef CONFIG_SOC_K2HK
+	if (IMAAGE_OF_BOARD_SETUP)
+		ft_board_setup_ex(blob, gd->bd);
+#endif
+
 	return 0;
 }
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 9871e2f..4c1416d 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -63,6 +63,7 @@  int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose);
 #endif
 
 void ft_board_setup(void *blob, bd_t *bd);
+void ft_board_setup_ex(void *blob, bd_t *bd);
 void ft_cpu_setup(void *blob, bd_t *bd);
 void ft_pci_setup(void *blob, bd_t *bd);