diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-11-04 16:21:54 +0400 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-11-07 02:14:04 +0400 |
commit | e363bbac316ffb5daaf45d855f82680148cafe20 (patch) | |
tree | 0bf878ce6be7eadc899b5120176225fb93c2e273 /arch/mips/netlogic/xlp/dt.c | |
parent | 47869f5d11e96bf4480635279abc2be30632ca6a (diff) | |
download | linux-e363bbac316ffb5daaf45d855f82680148cafe20.tar.xz |
MIPS: Netlogic: replace early_init_devtree() call
The early_init_devtree() API was removed in linux-next for 3.13 with
commit "mips: use early_init_dt_scan". This causes Netlogic XLP compile
to fail:
arch/mips/netlogic/xlp/setup.c:101: undefined reference to `early_init_devtree'
Add xlp_early_init_devtree() which uses the __dt_setup_arch() to
handle early device tree related initialization to fix this.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/mips/netlogic/xlp/dt.c')
-rw-r--r-- | arch/mips/netlogic/xlp/dt.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/mips/netlogic/xlp/dt.c b/arch/mips/netlogic/xlp/dt.c index 88df445dda76..8316d5454b17 100644 --- a/arch/mips/netlogic/xlp/dt.c +++ b/arch/mips/netlogic/xlp/dt.c @@ -39,8 +39,11 @@ #include <linux/of_platform.h> #include <linux/of_device.h> +#include <asm/prom.h> + extern u32 __dtb_xlp_evp_begin[], __dtb_xlp_svp_begin[], __dtb_xlp_fvp_begin[], __dtb_start[]; +static void *xlp_fdt_blob; void __init *xlp_dt_init(void *fdtp) { @@ -67,19 +70,26 @@ void __init *xlp_dt_init(void *fdtp) break; } } - initial_boot_params = fdtp; + xlp_fdt_blob = fdtp; return fdtp; } +void __init xlp_early_init_devtree(void) +{ + __dt_setup_arch(xlp_fdt_blob); + strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE); +} + void __init device_tree_init(void) { unsigned long base, size; + struct boot_param_header *fdtp = xlp_fdt_blob; - if (!initial_boot_params) + if (!fdtp) return; - base = virt_to_phys((void *)initial_boot_params); - size = be32_to_cpu(initial_boot_params->totalsize); + base = virt_to_phys(fdtp); + size = be32_to_cpu(fdtp->totalsize); /* Before we do anything, lets reserve the dt blob */ reserve_bootmem(base, size, BOOTMEM_DEFAULT); |