diff options
-rw-r--r-- | arch/mips/generic/init.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c index 0ea73e845440..d493ccbf274a 100644 --- a/arch/mips/generic/init.c +++ b/arch/mips/generic/init.c | |||
@@ -30,9 +30,19 @@ static __initdata const void *mach_match_data; | |||
30 | 30 | ||
31 | void __init prom_init(void) | 31 | void __init prom_init(void) |
32 | { | 32 | { |
33 | plat_get_fdt(); | ||
34 | BUG_ON(!fdt); | ||
35 | } | ||
36 | |||
37 | void __init *plat_get_fdt(void) | ||
38 | { | ||
33 | const struct mips_machine *check_mach; | 39 | const struct mips_machine *check_mach; |
34 | const struct of_device_id *match; | 40 | const struct of_device_id *match; |
35 | 41 | ||
42 | if (fdt) | ||
43 | /* Already set up */ | ||
44 | return (void *)fdt; | ||
45 | |||
36 | if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_arg1)) { | 46 | if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_arg1)) { |
37 | /* | 47 | /* |
38 | * We booted using the UHI boot protocol, so we have been | 48 | * We booted using the UHI boot protocol, so we have been |
@@ -75,12 +85,6 @@ void __init prom_init(void) | |||
75 | /* Retrieve the machine's FDT */ | 85 | /* Retrieve the machine's FDT */ |
76 | fdt = mach->fdt; | 86 | fdt = mach->fdt; |
77 | } | 87 | } |
78 | |||
79 | BUG_ON(!fdt); | ||
80 | } | ||
81 | |||
82 | void __init *plat_get_fdt(void) | ||
83 | { | ||
84 | return (void *)fdt; | 88 | return (void *)fdt; |
85 | } | 89 | } |
86 | 90 | ||