diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-05-10 02:39:05 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-10 02:39:05 -0400 |
commit | 19d8f84f86af867abee174be8bf1e4941a59143d (patch) | |
tree | 9f848faa504edbc2a7f9160e757eaa19e7460ea2 /arch/sh/mm | |
parent | 080e71e13d99d850875c0335c364766162eae7c6 (diff) |
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')
-rw-r--r-- | arch/sh/mm/init.c | 8 |
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 @@ | |||
2 | * linux/arch/sh/mm/init.c | 2 | * linux/arch/sh/mm/init.c |
3 | * | 3 | * |
4 | * Copyright (C) 1999 Niibe Yutaka | 4 | * Copyright (C) 1999 Niibe Yutaka |
5 | * Copyright (C) 2002 - 2007 Paul Mundt | 5 | * Copyright (C) 2002 - 2010 Paul Mundt |
6 | * | 6 | * |
7 | * Based on linux/arch/i386/mm/init.c: | 7 | * Based on linux/arch/i386/mm/init.c: |
8 | * Copyright (C) 1995 Linus Torvalds | 8 | * Copyright (C) 1995 Linus Torvalds |
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/pagemap.h> | 16 | #include <linux/pagemap.h> |
17 | #include <linux/percpu.h> | 17 | #include <linux/percpu.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/lmb.h> | ||
19 | #include <linux/dma-mapping.h> | 20 | #include <linux/dma-mapping.h> |
20 | #include <asm/mmu_context.h> | 21 | #include <asm/mmu_context.h> |
21 | #include <asm/tlb.h> | 22 | #include <asm/tlb.h> |
@@ -27,6 +28,11 @@ | |||
27 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 28 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
28 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 29 | pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
29 | 30 | ||
31 | void __init generic_mem_init(void) | ||
32 | { | ||
33 | lmb_add(__MEMORY_START, __MEMORY_SIZE); | ||
34 | } | ||
35 | |||
30 | #ifdef CONFIG_MMU | 36 | #ifdef CONFIG_MMU |
31 | static pte_t *__get_pte_phys(unsigned long addr) | 37 | static pte_t *__get_pte_phys(unsigned long addr) |
32 | { | 38 | { |