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>
This commit is contained in:

committed by
Paul Mundt

parent
a29b99ecce
commit
2f47f44790
@@ -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
|
||||
|
Reference in New Issue
Block a user