diff options
author | Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> | 2009-03-10 15:49:54 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-03-10 15:49:54 +0900 |
commit | 2f47f44790a9c8fc43e515df3c6be19a35ee5de5 (patch) | |
tree | 6a13f7abebcb04cc396a1d6de307265e36ccc89d /arch/sh/include/asm/page.h | |
parent | a29b99eccecefe5026713b226f66f117c8837ad5 (diff) | |
download | blackbird-op-linux-2f47f44790a9c8fc43e515df3c6be19a35ee5de5.tar.gz blackbird-op-linux-2f47f44790a9c8fc43e515df3c6be19a35ee5de5.zip |
sh: Support fixed 32-bit PMB mappings from bootloader.
This provides a method for supporting fixed PMB mappings inherited from
the bootloader, as an alternative to the dynamic PMB mapping currently
used by the kernel. In the future these methods will be combined.
P1/P2 area is handled like a regular 29-bit physical address, and local
bus device are assigned P3 area addresses.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/page.h')
-rw-r--r-- | arch/sh/include/asm/page.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index 5871d78e47e5..9c6d21ec0240 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h @@ -129,7 +129,12 @@ typedef struct page *pgtable_t; * is not visible (it is part of the PMB mapping) and so needs to be * added or subtracted as required. */ -#ifdef CONFIG_32BIT +#if defined(CONFIG_PMB_FIXED) +/* phys = virt - PAGE_OFFSET - (__MEMORY_START & 0xe0000000) */ +#define PMB_OFFSET (PAGE_OFFSET - PXSEG(__MEMORY_START)) +#define __pa(x) ((unsigned long)(x) - PMB_OFFSET) +#define __va(x) ((void *)((unsigned long)(x) + PMB_OFFSET)) +#elif defined(CONFIG_32BIT) #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET+__MEMORY_START) #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET-__MEMORY_START)) #else |