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/ralink/of.c | |
| parent | arch: mips: kernel: Fix two spelling in smp.c (diff) | |
| download | linux-b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20.tar.gz 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/ralink/of.c')
| -rw-r--r-- | arch/mips/ralink/of.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/mips/ralink/of.c b/arch/mips/ralink/of.c index 2c9af61efc20..8286c3521476 100644 --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c @@ -64,20 +64,15 @@ static int __init early_init_dt_find_memory(unsigned long node, void __init plat_mem_setup(void) { - void *dtb = NULL; + void *dtb; set_io_port_base(KSEG1); /* * Load the builtin devicetree. This causes the chosen node to be - * parsed resulting in our memory appearing. fw_passed_dtb is used - * by CONFIG_MIPS_APPENDED_RAW_DTB as well. + * parsed resulting in our memory appearing. */ - if (fw_passed_dtb) - dtb = (void *)fw_passed_dtb; - else if (&__dtb_start != &__dtb_end) - dtb = (void *)__dtb_start; - + dtb = get_fdt(); __dt_setup_arch(dtb); of_scan_flat_dt(early_init_dt_find_memory, NULL); |
