diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-07-07 11:35:33 (GMT) |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-07-07 11:35:33 (GMT) |
commit | 06be5eefe1192eb8ce8d07497f67595b6bfe9741 (patch) | |
tree | 80f1987d4970f8079681f8be0c135cafc8d6329a /arch/mips/jz4740/setup.c | |
parent | 11b8b25ce4f8acfd3b438683c0c9ade27756c6e8 (diff) | |
parent | 1bd46782d08b01b73df0085b51ea1021b19b44fd (diff) | |
download | linux-06be5eefe1192eb8ce8d07497f67595b6bfe9741.tar.xz |
Merge branches 'fixes' and 'ioremap' into for-linus
Diffstat (limited to 'arch/mips/jz4740/setup.c')
-rw-r--r-- | arch/mips/jz4740/setup.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c index ef796f9..510fc0d 100644 --- a/arch/mips/jz4740/setup.c +++ b/arch/mips/jz4740/setup.c @@ -16,9 +16,14 @@ #include <linux/init.h> #include <linux/io.h> +#include <linux/irqchip.h> #include <linux/kernel.h> +#include <linux/libfdt.h> +#include <linux/of_fdt.h> +#include <linux/of_platform.h> #include <asm/bootinfo.h> +#include <asm/prom.h> #include <asm/mach-jz4740/base.h> @@ -51,11 +56,40 @@ static void __init jz4740_detect_mem(void) void __init plat_mem_setup(void) { + int offset; + jz4740_reset_init(); - jz4740_detect_mem(); + __dt_setup_arch(__dtb_start); + + offset = fdt_path_offset(__dtb_start, "/memory"); + if (offset < 0) + jz4740_detect_mem(); } +void __init device_tree_init(void) +{ + if (!initial_boot_params) + return; + + unflatten_and_copy_device_tree(); +} + +static int __init populate_machine(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); + return 0; +} +arch_initcall(populate_machine); + const char *get_system_type(void) { + if (config_enabled(CONFIG_MACH_JZ4780)) + return "JZ4780"; + return "JZ4740"; } + +void __init arch_init_irq(void) +{ + irqchip_init(); +} |