diff options
author | Paul Burton <paul.burton@imgtec.com> | 2015-05-24 18:11:15 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-06-21 22:52:49 +0300 |
commit | ffb1843d059c5627fb8982eb4ab29219e7503fb2 (patch) | |
tree | 2e68285faeb1adcff6c05e355021d9e34c711f34 /arch/mips/jz4740/setup.c | |
parent | 252617a4ab714db824876e3f9b2b2ede6623e9dc (diff) | |
download | linux-ffb1843d059c5627fb8982eb4ab29219e7503fb2.tar.xz |
MIPS: JZ4740: require & include DT
Require a DT for JZ4740 based systems, and add a stub one for the
qi_lb60 (Ben NanoNote) board. Devices will be migrated to being probed
via this DT over time.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/10132/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/jz4740/setup.c')
-rw-r--r-- | arch/mips/jz4740/setup.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/mips/jz4740/setup.c b/arch/mips/jz4740/setup.c index ef796f97b996..d6bb7a39fafe 100644 --- a/arch/mips/jz4740/setup.c +++ b/arch/mips/jz4740/setup.c @@ -17,8 +17,11 @@ #include <linux/init.h> #include <linux/io.h> #include <linux/kernel.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> @@ -53,8 +56,24 @@ void __init plat_mem_setup(void) { jz4740_reset_init(); jz4740_detect_mem(); + __dt_setup_arch(__dtb_start); } +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) { return "JZ4740"; |