Re: [linux-yocto] [linux-yocto v5.10] MIPS: OCTEON: Fix the boot broken when using built-in DTB

2021-01-10 Thread Bruce Ashfield
In message: [linux-yocto v5.10] MIPS: OCTEON: Fix the boot broken when using 
built-in DTB
on 09/01/2021 Kevin Hao wrote:

> For the OCTEON boards, it need to patch the built-in DTB before using
> it. Previously it judges if it is a built-in DTB by checking
> fw_passed_dtb. But after commit 37e5c69ffd41 ("MIPS: head.S: Init
> fw_passed_dtb to builtin DTB", the fw_passed_dtb is initialized even
> when using built-in DTB. This causes the OCTEON boards boot broken due
> to an unpatched built-in DTB is used. Add more checks to judge if we
> really use built-in DTB or not.
> 
> Fixed: 37e5c69ffd41 ("MIPS: head.S: Init fw_passed_dtb to builtin DTB")
> Cc: sta...@vger.kernel.org
> Signed-off-by: Kevin Hao 
> ---
> Hi Bruce,
> 
> Please help me merge this to v5.10/standard/edgerouter branch.

merged.

Bruce

> 
>  arch/mips/cavium-octeon/setup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
> index 982826ba0ef7..41d9c80e9666 100644
> --- a/arch/mips/cavium-octeon/setup.c
> +++ b/arch/mips/cavium-octeon/setup.c
> @@ -1149,7 +1149,8 @@ void __init device_tree_init(void)
>   bool do_prune;
>   bool fill_mac;
>  
> - if (fw_passed_dtb) {
> + if (fw_passed_dtb && (fw_passed_dtb != (ulong)&__dtb_octeon_68xx_begin) 
> &&
> + (fw_passed_dtb != (ulong)&__dtb_octeon_3xxx_begin)) {
>   fdt = (void *)fw_passed_dtb;
>   do_prune = false;
>   fill_mac = true;
> -- 
> 2.29.2
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9349): 
https://lists.yoctoproject.org/g/linux-yocto/message/9349
Mute This Topic: https://lists.yoctoproject.org/mt/79548105/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [linux-yocto v5.10] MIPS: OCTEON: Fix the boot broken when using built-in DTB

2021-01-09 Thread Kevin Hao
For the OCTEON boards, it need to patch the built-in DTB before using
it. Previously it judges if it is a built-in DTB by checking
fw_passed_dtb. But after commit 37e5c69ffd41 ("MIPS: head.S: Init
fw_passed_dtb to builtin DTB", the fw_passed_dtb is initialized even
when using built-in DTB. This causes the OCTEON boards boot broken due
to an unpatched built-in DTB is used. Add more checks to judge if we
really use built-in DTB or not.

Fixed: 37e5c69ffd41 ("MIPS: head.S: Init fw_passed_dtb to builtin DTB")
Cc: sta...@vger.kernel.org
Signed-off-by: Kevin Hao 
---
Hi Bruce,

Please help me merge this to v5.10/standard/edgerouter branch.

 arch/mips/cavium-octeon/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index 982826ba0ef7..41d9c80e9666 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -1149,7 +1149,8 @@ void __init device_tree_init(void)
bool do_prune;
bool fill_mac;
 
-   if (fw_passed_dtb) {
+   if (fw_passed_dtb && (fw_passed_dtb != (ulong)&__dtb_octeon_68xx_begin) 
&&
+   (fw_passed_dtb != (ulong)&__dtb_octeon_3xxx_begin)) {
fdt = (void *)fw_passed_dtb;
do_prune = false;
fill_mac = true;
-- 
2.29.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9346): 
https://lists.yoctoproject.org/g/linux-yocto/message/9346
Mute This Topic: https://lists.yoctoproject.org/mt/79548105/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-