diff options
author | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2021-01-27 14:24:30 +0100 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2021-02-04 13:34:51 +0100 |
commit | b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20 (patch) | |
tree | 8ddc0b7e76974718408e826aa83e7b7084193bb9 /arch/mips/generic | |
parent | a056aacd2df2ec8134ed3baffd7fb6ba02874652 (diff) | |
download | linux-rpi-b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20.tar.gz linux-rpi-b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20.tar.bz2 linux-rpi-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/generic')
-rw-r--r-- | arch/mips/generic/init.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c index 68763fcde1d0..1842cddd8356 100644 --- a/arch/mips/generic/init.c +++ b/arch/mips/generic/init.c @@ -39,14 +39,13 @@ void __init *plat_get_fdt(void) /* Already set up */ return (void *)fdt; - if (fw_passed_dtb && !fdt_check_header((void *)fw_passed_dtb)) { + fdt = (void *)get_fdt(); + if (fdt && !fdt_check_header(fdt)) { /* * 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_passed_dtb; - for_each_mips_machine(check_mach) { match = mips_machine_is_compatible(check_mach, fdt); if (match) { |