summaryrefslogtreecommitdiffstats
path: root/arch/mips/lantiq
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-01-27 14:24:30 +0100
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-02-04 13:34:51 +0100
commitb83ba0b9df56f8404ccc6ebcc7050fb8294f0f20 (patch)
tree8ddc0b7e76974718408e826aa83e7b7084193bb9 /arch/mips/lantiq
parentarch: mips: kernel: Fix two spelling in smp.c (diff)
downloadlinux-b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20.tar.xz
linux-b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20.zip
MIPS: of: Introduce helper function to get DTB
Selection of the DTB to be used was burried in more or less readable code in head.S. Move this code into a inline helper function and use it. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'arch/mips/lantiq')
-rw-r--r--arch/mips/lantiq/prom.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
index 363937121617..bc9f58fcbdf9 100644
--- a/arch/mips/lantiq/prom.c
+++ b/arch/mips/lantiq/prom.c
@@ -73,11 +73,8 @@ void __init plat_mem_setup(void)
set_io_port_base((unsigned long) KSEG1);
- if (fw_passed_dtb) /* UHI interface */
- dtb = (void *)fw_passed_dtb;
- else if (&__dtb_start != &__dtb_end)
- dtb = (void *)__dtb_start;
- else
+ dtb = get_fdt();
+ if (dtb == NULL)
panic("no dtb found");
/*