diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-10-06 23:22:33 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-10 14:52:34 +0200 |
commit | 20b5014b3e5fe7b874a3f6a1dc03b0c21cb222cd (patch) | |
tree | 7b14d3c6f7004ca86e444c7237a022a143405e7f /arch/sh/mm/pmb-fixed.c | |
parent | sh: Fix the offset from P1SEG/P2SEG where we map RAM (diff) | |
download | linux-20b5014b3e5fe7b874a3f6a1dc03b0c21cb222cd.tar.xz linux-20b5014b3e5fe7b874a3f6a1dc03b0c21cb222cd.zip |
sh: Fold fixed-PMB support into dynamic PMB support
The initialisation process differs for CONFIG_PMB and for
CONFIG_PMB_FIXED. For CONFIG_PMB_FIXED we need to register the PMB
entries that were allocated by the bootloader.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/pmb-fixed.c')
-rw-r--r-- | arch/sh/mm/pmb-fixed.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/arch/sh/mm/pmb-fixed.c b/arch/sh/mm/pmb-fixed.c deleted file mode 100644 index 43c8eac4d8a1..000000000000 --- a/arch/sh/mm/pmb-fixed.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * arch/sh/mm/fixed_pmb.c - * - * Copyright (C) 2009 Renesas Solutions Corp. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ -#include <linux/init.h> -#include <linux/mm.h> -#include <linux/io.h> -#include <asm/mmu.h> -#include <asm/mmu_context.h> - -static int __uses_jump_to_uncached fixed_pmb_init(void) -{ - int i; - unsigned long addr, data; - - jump_to_uncached(); - - for (i = 0; i < PMB_ENTRY_MAX; i++) { - addr = PMB_DATA + (i << PMB_E_SHIFT); - data = ctrl_inl(addr); - if (!(data & PMB_V)) - continue; - - if (data & PMB_C) { -#if defined(CONFIG_CACHE_WRITETHROUGH) - data |= PMB_WT; -#elif defined(CONFIG_CACHE_WRITEBACK) - data &= ~PMB_WT; -#else - data &= ~(PMB_C | PMB_WT); -#endif - } - ctrl_outl(data, addr); - } - - back_to_cached(); - - return 0; -} -arch_initcall(fixed_pmb_init); |