* [PATCH] [MIPS] generic: fix appended dtb support
@ 2019-05-13 12:32 Marcin Nowakowski
2019-05-13 19:03 ` Paul Burton
0 siblings, 1 reply; 2+ messages in thread
From: Marcin Nowakowski @ 2019-05-13 12:32 UTC (permalink / raw)
To: paul.burton; +Cc: marcin.nowakowski, linux-mips
Appended DTB support is mostly intended to be used on legacy systems,
but it is a valid feature that can be enabled for generic platform,
which currently doesn't support it - if selected, the appended DTB will
be ignored by the platform startup code.
During kernel startup, the appended DTB's location is stored in
fw_passed_dtb if the init code finds what appears to be a valid DTB.
Otherwise (if a0 == -2), a1 is stored in fw_passed_dtb, so either way it
will always point to either a user-pased DTB or built-in DTB.
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@fungible.com>
---
arch/mips/generic/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c
index a106f8113842..a84475f1924f 100644
--- a/arch/mips/generic/init.c
+++ b/arch/mips/generic/init.c
@@ -43,14 +43,14 @@ void __init *plat_get_fdt(void)
/* Already set up */
return (void *)fdt;
- if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_arg1)) {
+ if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_passed_dtb)) {
/*
* We booted using the UHI boot protocol, so we have been
* provided with the appropriate device tree for the board.
* Make use of it & search for any machine struct based upon
* the root compatible string.
*/
- fdt = (void *)fw_arg1;
+ fdt = (void *)fw_passed_dtb;
for_each_mips_machine(check_mach) {
match = mips_machine_is_compatible(check_mach, fdt);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [MIPS] generic: fix appended dtb support
2019-05-13 12:32 [PATCH] [MIPS] generic: fix appended dtb support Marcin Nowakowski
@ 2019-05-13 19:03 ` Paul Burton
0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-05-13 19:03 UTC (permalink / raw)
To: Marcin Nowakowski; +Cc: Paul Burton, marcin.nowakowski, linux-mips, linux-mips
Hello,
Marcin Nowakowski wrote:
> Appended DTB support is mostly intended to be used on legacy systems,
> but it is a valid feature that can be enabled for generic platform,
> which currently doesn't support it - if selected, the appended DTB will
> be ignored by the platform startup code.
>
> During kernel startup, the appended DTB's location is stored in
> fw_passed_dtb if the init code finds what appears to be a valid DTB.
> Otherwise (if a0 == -2), a1 is stored in fw_passed_dtb, so either way it
> will always point to either a user-pased DTB or built-in DTB.
>
> Signed-off-by: Marcin Nowakowski <marcin.nowakowski@fungible.com>
Applied to mips-next.
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@mips.com to report it. ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-13 19:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 12:32 [PATCH] [MIPS] generic: fix appended dtb support Marcin Nowakowski
2019-05-13 19:03 ` Paul Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).