| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2016 Imagination Technologies |
|---|
| 3 | 4 | * Author: Paul Burton <paul.burton@mips.com> |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 7 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 8 | | - * option) any later version. |
|---|
| 9 | 5 | */ |
|---|
| 10 | 6 | |
|---|
| 11 | 7 | #include <linux/clk.h> |
|---|
| 12 | | -#include <linux/clk-provider.h> |
|---|
| 13 | 8 | #include <linux/clocksource.h> |
|---|
| 14 | 9 | #include <linux/init.h> |
|---|
| 15 | 10 | #include <linux/irqchip.h> |
|---|
| 11 | +#include <linux/of_clk.h> |
|---|
| 16 | 12 | #include <linux/of_fdt.h> |
|---|
| 17 | 13 | |
|---|
| 18 | 14 | #include <asm/bootinfo.h> |
|---|
| .. | .. |
|---|
| 24 | 20 | #include <asm/smp-ops.h> |
|---|
| 25 | 21 | #include <asm/time.h> |
|---|
| 26 | 22 | |
|---|
| 27 | | -static __initdata const void *fdt; |
|---|
| 28 | | -static __initdata const struct mips_machine *mach; |
|---|
| 29 | | -static __initdata const void *mach_match_data; |
|---|
| 23 | +static __initconst const void *fdt; |
|---|
| 24 | +static __initconst const struct mips_machine *mach; |
|---|
| 25 | +static __initconst const void *mach_match_data; |
|---|
| 30 | 26 | |
|---|
| 31 | 27 | void __init prom_init(void) |
|---|
| 32 | 28 | { |
|---|
| .. | .. |
|---|
| 43 | 39 | /* Already set up */ |
|---|
| 44 | 40 | return (void *)fdt; |
|---|
| 45 | 41 | |
|---|
| 46 | | - if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_arg1)) { |
|---|
| 42 | + if (fw_passed_dtb && !fdt_check_header((void *)fw_passed_dtb)) { |
|---|
| 47 | 43 | /* |
|---|
| 48 | | - * We booted using the UHI boot protocol, so we have been |
|---|
| 49 | | - * provided with the appropriate device tree for the board. |
|---|
| 50 | | - * Make use of it & search for any machine struct based upon |
|---|
| 51 | | - * the root compatible string. |
|---|
| 44 | + * We have been provided with the appropriate device tree for |
|---|
| 45 | + * the board. Make use of it & search for any machine struct |
|---|
| 46 | + * based upon the root compatible string. |
|---|
| 52 | 47 | */ |
|---|
| 53 | | - fdt = (void *)fw_arg1; |
|---|
| 48 | + fdt = (void *)fw_passed_dtb; |
|---|
| 54 | 49 | |
|---|
| 55 | 50 | for_each_mips_machine(check_mach) { |
|---|
| 56 | 51 | match = mips_machine_is_compatible(check_mach, fdt); |
|---|
| .. | .. |
|---|
| 110 | 105 | if (mach && mach->fixup_fdt) |
|---|
| 111 | 106 | fdt = mach->fixup_fdt(fdt, mach_match_data); |
|---|
| 112 | 107 | |
|---|
| 113 | | - strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE); |
|---|
| 108 | + fw_init_cmdline(); |
|---|
| 114 | 109 | __dt_setup_arch((void *)fdt); |
|---|
| 115 | 110 | } |
|---|
| 116 | 111 | |
|---|