summaryrefslogtreecommitdiff
path: root/arch/mips/mti-malta
diff options
context:
space:
mode:
authorMatt Redfearn <matt.redfearn@imgtec.com>2016-03-31 12:05:40 +0300
committerRalf Baechle <ralf@linux-mips.org>2016-05-13 15:02:03 +0300
commit5e7c1c918a4433c5dd1844d99f5648e17425fa16 (patch)
treeec338a40b5fabbf17fe7d51eda5e909aed1f0899 /arch/mips/mti-malta
parent8c530ea35caef8bc293b56580ab55352f7d86bfc (diff)
downloadlinux-5e7c1c918a4433c5dd1844d99f5648e17425fa16.tar.xz
MIPS: Introduce plat_get_fdt a platform API to retrieve the FDT
Early access to the kernel command line requires early access to the FDT for platforms which pass the command line within the device tree. There was no common way to retrieve the location of the FDT without incurring side effects, such as plat_mem_setup which, on Malta at least, initializes a bunch of other stuff. This patch adds plat_get_ftd() for IMG platforms. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: kernel-hardening@lists.openwall.com Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12988/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mti-malta')
-rw-r--r--arch/mips/mti-malta/malta-setup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index 4740c82fb97a..33d5ff5069e5 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -248,10 +248,15 @@ static void __init bonito_quirks_setup(void)
#endif
}
+void __init *plat_get_fdt(void)
+{
+ return (void *)__dtb_start;
+}
+
void __init plat_mem_setup(void)
{
unsigned int i;
- void *fdt = __dtb_start;
+ void *fdt = plat_get_fdt();
fdt = malta_dt_shim(fdt);
__dt_setup_arch(fdt);