summaryrefslogtreecommitdiffstats
path: root/arch/mips/mti-malta/malta-setup.c
diff options
context:
space:
mode:
authorPaul Burton2015-09-22 20:56:38 +0200
committerRalf Baechle2015-11-11 08:35:47 +0100
commite81a8c7dabac05d444eda315ff1a747b0fe38396 (patch)
treec27dd399b540f377680163ce0fd6015d21404f7a /arch/mips/mti-malta/malta-setup.c
parentMIPS: Malta: Remove fw_memblock_t abstraction (diff)
downloadkernel-qcow2-linux-e81a8c7dabac05d444eda315ff1a747b0fe38396.tar.gz
kernel-qcow2-linux-e81a8c7dabac05d444eda315ff1a747b0fe38396.tar.xz
kernel-qcow2-linux-e81a8c7dabac05d444eda315ff1a747b0fe38396.zip
MIPS: Malta: Setup RAM regions via DT
Move memory configuration to be performed via device tree for the Malta board. This moves more Malta specific code to malta-dtshim.c, leaving the rest of the mti-malta code a little more board-agnostic. This will be useful to share more code between boards, with the device tree providing the board specifics as intended. Since we can't rely upon Malta boards running a bootloader capable of handling devictrees & filling in the required information, a piece of shim code (malta_dt_shim) is added to consume the (e)memsize variables provided as part of the bootloader environment (or on the kernel command line) then generate the DT memory node using the provided values. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: Kumar Gala <galak@codeaurora.org> Cc: linux-kernel@vger.kernel.org Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Rob Herring <robh+dt@kernel.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Cc: Mark Rutland <mark.rutland@arm.com> Patchwork: https://patchwork.linux-mips.org/patch/11222/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mti-malta/malta-setup.c')
-rw-r--r--arch/mips/mti-malta/malta-setup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index 9d1e7f5ec36c..4740c82fb97a 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -27,6 +27,7 @@
#include <linux/time.h>
#include <asm/fw/fw.h>
+#include <asm/mach-malta/malta-dtshim.h>
#include <asm/mips-cm.h>
#include <asm/mips-boards/generic.h>
#include <asm/mips-boards/malta.h>
@@ -250,8 +251,10 @@ static void __init bonito_quirks_setup(void)
void __init plat_mem_setup(void)
{
unsigned int i;
+ void *fdt = __dtb_start;
- __dt_setup_arch(__dtb_start);
+ fdt = malta_dt_shim(fdt);
+ __dt_setup_arch(fdt);
if (config_enabled(CONFIG_EVA))
/* EVA has already been configured in mach-malta/kernel-init.h */