mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-15 21:30:43 +00:00
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>
This commit is contained in:
parent
47869f5d11
commit
e363bbac31
@ -69,6 +69,7 @@ void nlm_hal_init(void);
|
|||||||
int xlp_get_dram_map(int n, uint64_t *dram_map);
|
int xlp_get_dram_map(int n, uint64_t *dram_map);
|
||||||
|
|
||||||
/* Device tree related */
|
/* Device tree related */
|
||||||
|
void xlp_early_init_devtree(void);
|
||||||
void *xlp_dt_init(void *fdtp);
|
void *xlp_dt_init(void *fdtp);
|
||||||
|
|
||||||
static inline int cpu_is_xlpii(void)
|
static inline int cpu_is_xlpii(void)
|
||||||
|
@ -39,8 +39,11 @@
|
|||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
|
|
||||||
|
#include <asm/prom.h>
|
||||||
|
|
||||||
extern u32 __dtb_xlp_evp_begin[], __dtb_xlp_svp_begin[],
|
extern u32 __dtb_xlp_evp_begin[], __dtb_xlp_svp_begin[],
|
||||||
__dtb_xlp_fvp_begin[], __dtb_start[];
|
__dtb_xlp_fvp_begin[], __dtb_start[];
|
||||||
|
static void *xlp_fdt_blob;
|
||||||
|
|
||||||
void __init *xlp_dt_init(void *fdtp)
|
void __init *xlp_dt_init(void *fdtp)
|
||||||
{
|
{
|
||||||
@ -67,19 +70,26 @@ void __init *xlp_dt_init(void *fdtp)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initial_boot_params = fdtp;
|
xlp_fdt_blob = fdtp;
|
||||||
return 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)
|
void __init device_tree_init(void)
|
||||||
{
|
{
|
||||||
unsigned long base, size;
|
unsigned long base, size;
|
||||||
|
struct boot_param_header *fdtp = xlp_fdt_blob;
|
||||||
|
|
||||||
if (!initial_boot_params)
|
if (!fdtp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
base = virt_to_phys((void *)initial_boot_params);
|
base = virt_to_phys(fdtp);
|
||||||
size = be32_to_cpu(initial_boot_params->totalsize);
|
size = be32_to_cpu(fdtp->totalsize);
|
||||||
|
|
||||||
/* Before we do anything, lets reserve the dt blob */
|
/* Before we do anything, lets reserve the dt blob */
|
||||||
reserve_bootmem(base, size, BOOTMEM_DEFAULT);
|
reserve_bootmem(base, size, BOOTMEM_DEFAULT);
|
||||||
|
@ -98,7 +98,7 @@ void __init plat_mem_setup(void)
|
|||||||
pm_power_off = nlm_linux_exit;
|
pm_power_off = nlm_linux_exit;
|
||||||
|
|
||||||
/* memory and bootargs from DT */
|
/* memory and bootargs from DT */
|
||||||
early_init_devtree(initial_boot_params);
|
xlp_early_init_devtree();
|
||||||
|
|
||||||
if (boot_mem_map.nr_map == 0) {
|
if (boot_mem_map.nr_map == 0) {
|
||||||
pr_info("Using DRAM BARs for memory map.\n");
|
pr_info("Using DRAM BARs for memory map.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user