diff options
| -rw-r--r-- | arch/mips/include/asm/netlogic/xlp-hal/xlp.h | 1 | ||||
| -rw-r--r-- | arch/mips/netlogic/xlp/dt.c | 18 | ||||
| -rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 2 |
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h index 17daffb280a3..470f2095b346 100644 --- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h +++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h | |||
| @@ -69,6 +69,7 @@ void nlm_hal_init(void); | |||
| 69 | int xlp_get_dram_map(int n, uint64_t *dram_map); | 69 | int xlp_get_dram_map(int n, uint64_t *dram_map); |
| 70 | 70 | ||
| 71 | /* Device tree related */ | 71 | /* Device tree related */ |
| 72 | void xlp_early_init_devtree(void); | ||
| 72 | void *xlp_dt_init(void *fdtp); | 73 | void *xlp_dt_init(void *fdtp); |
| 73 | 74 | ||
| 74 | static inline int cpu_is_xlpii(void) | 75 | static inline int cpu_is_xlpii(void) |
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 @@ | |||
| 39 | #include <linux/of_platform.h> | 39 | #include <linux/of_platform.h> |
| 40 | #include <linux/of_device.h> | 40 | #include <linux/of_device.h> |
| 41 | 41 | ||
| 42 | #include <asm/prom.h> | ||
| 43 | |||
| 42 | extern u32 __dtb_xlp_evp_begin[], __dtb_xlp_svp_begin[], | 44 | extern u32 __dtb_xlp_evp_begin[], __dtb_xlp_svp_begin[], |
| 43 | __dtb_xlp_fvp_begin[], __dtb_start[]; | 45 | __dtb_xlp_fvp_begin[], __dtb_start[]; |
| 46 | static void *xlp_fdt_blob; | ||
| 44 | 47 | ||
| 45 | void __init *xlp_dt_init(void *fdtp) | 48 | void __init *xlp_dt_init(void *fdtp) |
| 46 | { | 49 | { |
| @@ -67,19 +70,26 @@ void __init *xlp_dt_init(void *fdtp) | |||
| 67 | break; | 70 | break; |
| 68 | } | 71 | } |
| 69 | } | 72 | } |
| 70 | initial_boot_params = fdtp; | 73 | xlp_fdt_blob = fdtp; |
| 71 | return fdtp; | 74 | return fdtp; |
| 72 | } | 75 | } |
| 73 | 76 | ||
| 77 | void __init xlp_early_init_devtree(void) | ||
| 78 | { | ||
| 79 | __dt_setup_arch(xlp_fdt_blob); | ||
| 80 | strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE); | ||
| 81 | } | ||
| 82 | |||
| 74 | void __init device_tree_init(void) | 83 | void __init device_tree_init(void) |
| 75 | { | 84 | { |
| 76 | unsigned long base, size; | 85 | unsigned long base, size; |
| 86 | struct boot_param_header *fdtp = xlp_fdt_blob; | ||
| 77 | 87 | ||
| 78 | if (!initial_boot_params) | 88 | if (!fdtp) |
| 79 | return; | 89 | return; |
| 80 | 90 | ||
| 81 | base = virt_to_phys((void *)initial_boot_params); | 91 | base = virt_to_phys(fdtp); |
| 82 | size = be32_to_cpu(initial_boot_params->totalsize); | 92 | size = be32_to_cpu(fdtp->totalsize); |
| 83 | 93 | ||
| 84 | /* Before we do anything, lets reserve the dt blob */ | 94 | /* Before we do anything, lets reserve the dt blob */ |
| 85 | reserve_bootmem(base, size, BOOTMEM_DEFAULT); | 95 | reserve_bootmem(base, size, BOOTMEM_DEFAULT); |
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index 76a7131e486e..6d981bb337ec 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c | |||
| @@ -98,7 +98,7 @@ void __init plat_mem_setup(void) | |||
| 98 | pm_power_off = nlm_linux_exit; | 98 | pm_power_off = nlm_linux_exit; |
| 99 | 99 | ||
| 100 | /* memory and bootargs from DT */ | 100 | /* memory and bootargs from DT */ |
| 101 | early_init_devtree(initial_boot_params); | 101 | xlp_early_init_devtree(); |
| 102 | 102 | ||
| 103 | if (boot_mem_map.nr_map == 0) { | 103 | if (boot_mem_map.nr_map == 0) { |
| 104 | pr_info("Using DRAM BARs for memory map.\n"); | 104 | pr_info("Using DRAM BARs for memory map.\n"); |
