summaryrefslogtreecommitdiff
path: root/arch/mips/pic32
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/pic32
parenta056aacd2df2ec8134ed3baffd7fb6ba02874652 (diff)
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/pic32')
-rw-r--r--arch/mips/pic32/pic32mzda/init.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/arch/mips/pic32/pic32mzda/init.c b/arch/mips/pic32/pic32mzda/init.c
index 1897aa863573..764f2d022fae 100644
--- a/arch/mips/pic32/pic32mzda/init.c
+++ b/arch/mips/pic32/pic32mzda/init.c
@@ -21,24 +21,11 @@ const char *get_system_type(void)
return "PIC32MZDA";
}
-static ulong get_fdtaddr(void)
-{
- ulong ftaddr = 0;
-
- if (fw_passed_dtb && !fw_arg2 && !fw_arg3)
- return (ulong)fw_passed_dtb;
-
- if (&__dtb_start < &__dtb_end)
- ftaddr = (ulong)__dtb_start;
-
- return ftaddr;
-}
-
void __init plat_mem_setup(void)
{
void *dtb;
- dtb = (void *)get_fdtaddr();
+ dtb = get_fdt();
if (!dtb) {
pr_err("pic32: no DTB found.\n");
return;