summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/init.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-05-10 15:39:05 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-05-10 15:39:05 +0900
commit19d8f84f86af867abee174be8bf1e4941a59143d (patch)
tree9f848faa504edbc2a7f9160e757eaa19e7460ea2 /arch/sh/mm/init.c
parent080e71e13d99d850875c0335c364766162eae7c6 (diff)
downloadtalos-op-linux-19d8f84f86af867abee174be8bf1e4941a59143d.tar.gz
talos-op-linux-19d8f84f86af867abee174be8bf1e4941a59143d.zip
sh: enable LMB region setup via machvec.
This plugs in a memory init callback in the machvec to permit boards to wire up various bits of memory directly in to LMB. A generic machvec implementation is provided that simply wraps around the normal Kconfig-derived memory start/size. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r--arch/sh/mm/init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index c505de61a5ca..9c5400b02f43 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -2,7 +2,7 @@
* linux/arch/sh/mm/init.c
*
* Copyright (C) 1999 Niibe Yutaka
- * Copyright (C) 2002 - 2007 Paul Mundt
+ * Copyright (C) 2002 - 2010 Paul Mundt
*
* Based on linux/arch/i386/mm/init.c:
* Copyright (C) 1995 Linus Torvalds
@@ -16,6 +16,7 @@
#include <linux/pagemap.h>
#include <linux/percpu.h>
#include <linux/io.h>
+#include <linux/lmb.h>
#include <linux/dma-mapping.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>
@@ -27,6 +28,11 @@
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
pgd_t swapper_pg_dir[PTRS_PER_PGD];
+void __init generic_mem_init(void)
+{
+ lmb_add(__MEMORY_START, __MEMORY_SIZE);
+}
+
#ifdef CONFIG_MMU
static pte_t *__get_pte_phys(unsigned long addr)
{
OpenPOWER on IntegriCloud