diff mbox series

[1/4] MIPS: head.S: Init fw_passed_dtb to builtin DTB

Message ID 20200730161233.61876-1-paul@crapouillou.net (mailing list archive)
State Mainlined
Commit 37e5c69ffd4195c35aeb24978701f40ac82af7b1
Headers show
Series [1/4] MIPS: head.S: Init fw_passed_dtb to builtin DTB | expand

Commit Message

Paul Cercueil July 30, 2020, 4:12 p.m. UTC
Init the 'fw_passed_dtb' pointer to the buit-in Device Tree blob when it
has been compiled in with CONFIG_BUILTIN_DTB.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/kernel/head.S | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Thomas Bogendoerfer July 31, 2020, 3:57 p.m. UTC | #1
On Thu, Jul 30, 2020 at 06:12:30PM +0200, Paul Cercueil wrote:
> Init the 'fw_passed_dtb' pointer to the buit-in Device Tree blob when it
> has been compiled in with CONFIG_BUILTIN_DTB.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  arch/mips/kernel/head.S | 6 ++++++
>  1 file changed, 6 insertions(+)

patches 1-4 applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index 3b02ffe46304..7dd234e788e6 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -111,6 +111,12 @@  NESTED(kernel_entry, 16, sp)			# kernel entry point
 	move		t2, a1
 	beq		a0, t1, dtb_found
 
+#ifdef CONFIG_BUILTIN_DTB
+	PTR_LA	t2, __dtb_start
+	PTR_LA	t1, __dtb_end
+	bne		t1, t2, dtb_found
+#endif /* CONFIG_BUILTIN_DTB */
+
 	li		t2, 0
 dtb_found:
 #endif /* CONFIG_USE_OF */