Commit 04e3e4ab authored by Russell King's avatar Russell King

[ARM] Move common definitions to asm/memory.h

Virtually all the architecture specific memory.h files were defining
the same constants and v<->p translations the same way.  Move them to
asm/memory.h
parent d3751527
...@@ -7,35 +7,11 @@ ...@@ -7,35 +7,11 @@
#ifndef __ASM_ARCH_MEMORY_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
/*
* Task size: 3GB
*/
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
/* /*
* Physical DRAM offset. * Physical DRAM offset.
*/ */
#define PHYS_OFFSET (0xC0000000UL) #define PHYS_OFFSET (0xC0000000UL)
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -11,30 +11,14 @@ ...@@ -11,30 +11,14 @@
* 21-Mar-1999 RMK Renamed to memory.h * 21-Mar-1999 RMK Renamed to memory.h
* RMK Added TASK_SIZE and PAGE_OFFSET * RMK Added TASK_SIZE and PAGE_OFFSET
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x10000000UL) #define PHYS_OFFSET (0x10000000UL)
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/* /*
* These are exactly the same on the RiscPC as the * These are exactly the same on the RiscPC as the
* physical memory view. * physical memory view.
......
/* /*
* linux/include/asm-arm/arch-clps711x/mmu.h * linux/include/asm-arm/arch-clps711x/memory.h
* *
* Copyright (C) 1999 ARM Limited * Copyright (C) 1999 ARM Limited
* *
...@@ -17,35 +17,16 @@ ...@@ -17,35 +17,16 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
#include <linux/config.h> #include <linux/config.h>
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0xc0000000UL) #define PHYS_OFFSET (0xc0000000UL)
/*
* On integrator, the dram is contiguous
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -17,26 +17,10 @@ ...@@ -17,26 +17,10 @@
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x00000000UL) #define PHYS_OFFSET (0x00000000UL)
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
/* /*
* We keep this 1:1 so that we don't interfere * We keep this 1:1 so that we don't interfere
* with the PCMCIA memory regions * with the PCMCIA memory regions
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
* Renamed to memory.h * Renamed to memory.h
* Moved PAGE_OFFSET and TASK_SIZE here * Moved PAGE_OFFSET and TASK_SIZE here
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
#include <linux/config.h> #include <linux/config.h>
...@@ -61,7 +61,9 @@ extern unsigned long __bus_to_virt(unsigned long); ...@@ -61,7 +61,9 @@ extern unsigned long __bus_to_virt(unsigned long);
#endif #endif
#define TASK_SIZE_26 (0x04000000UL) /*
* Physical DRAM offset.
*/
#define PHYS_OFFSET (0x00000000UL) #define PHYS_OFFSET (0x00000000UL)
/* /*
...@@ -70,10 +72,4 @@ extern unsigned long __bus_to_virt(unsigned long); ...@@ -70,10 +72,4 @@ extern unsigned long __bus_to_virt(unsigned long);
*/ */
#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3) #define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
/*
* The DRAM is always contiguous.
*/
#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET)
#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET)
#endif #endif
...@@ -17,33 +17,14 @@ ...@@ -17,33 +17,14 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x00000000UL) #define PHYS_OFFSET (0x00000000UL)
/*
* On epxa10, the dram is contiguous
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
/* /*
* linux/include/asm-arm/arch-integrator/mmu.h * linux/include/asm-arm/arch-integrator/memory.h
* *
* Copyright (C) 1999 ARM Limited * Copyright (C) 1999 ARM Limited
* *
...@@ -17,33 +17,13 @@ ...@@ -17,33 +17,13 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x00000000UL) #define PHYS_OFFSET (0x00000000UL)
/*
* On integrator, the dram is contiguous
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
#define BUS_OFFSET (0x80000000UL) #define BUS_OFFSET (0x80000000UL)
/* /*
......
...@@ -9,34 +9,11 @@ ...@@ -9,34 +9,11 @@
#include <asm/arch/iop310.h> #include <asm/arch/iop310.h>
#include <asm/arch/iop321.h> #include <asm/arch/iop321.h>
/*
* Task size: 3GB
*/
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
/* /*
* Physical DRAM offset. * Physical DRAM offset.
*/ */
#define PHYS_OFFSET (0xa0000000UL) #define PHYS_OFFSET (0xa0000000UL)
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -7,29 +7,11 @@ ...@@ -7,29 +7,11 @@
#ifndef __ASM_ARCH_MEMORY_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
#define PAGE_OFFSET (0xc0000000UL)
/* /*
* Physical DRAM offset. * Physical DRAM offset.
*/ */
#define PHYS_OFFSET (0x00000000UL) #define PHYS_OFFSET (0x00000000UL)
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -12,34 +12,11 @@ ...@@ -12,34 +12,11 @@
#ifndef __ASM_ARCH_MEMORY_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
/*
* Task size: 3GB
*/
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
/* /*
* Physical DRAM offset on the L7200 SDB. * Physical DRAM offset on the L7200 SDB.
*/ */
#define PHYS_OFFSET (0xf0000000UL) #define PHYS_OFFSET (0xf0000000UL)
/*
* The DRAM is contiguous.
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
#define __virt_to_bus(x) __virt_to_phys(x) #define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x) #define __bus_to_virt(x) __phys_to_virt(x)
......
...@@ -14,34 +14,11 @@ ...@@ -14,34 +14,11 @@
#define BANKS_PER_NODE 1 /* Define as either 1 or 2 */ #define BANKS_PER_NODE 1 /* Define as either 1 or 2 */
/*
* Task size: 3GB
*/
#define TASK_SIZE (0xbf000000UL) /* 0xc0000000? */
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
/* /*
* Physical DRAM offset. * Physical DRAM offset.
*/ */
#define PHYS_OFFSET (0xc0000000UL) #define PHYS_OFFSET (0xc0000000UL)
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -5,34 +5,15 @@ ...@@ -5,34 +5,15 @@
* Copyright (c) 1999 Russell King * Copyright (c) 1999 Russell King
* *
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x40000000UL) #define PHYS_OFFSET (0x40000000UL)
#define BUS_OFFSET (0xe0000000UL) #define BUS_OFFSET (0xe0000000UL)
/*
* DRAM is contiguous
*/
#define __virt_to_phys(vpage) ((unsigned long)(vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((unsigned long)(ppage) + PAGE_OFFSET - PHYS_OFFSET)
/* /*
* On the PCI bus the DRAM appears at address 0xe0000000 * On the PCI bus the DRAM appears at address 0xe0000000
*/ */
......
...@@ -30,25 +30,12 @@ ...@@ -30,25 +30,12 @@
* 675 Mass Ave, Cambridge, MA 02139, USA. * 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xC0000000UL)
#define PHYS_OFFSET (0x10000000UL) #define PHYS_OFFSET (0x10000000UL)
/* /*
...@@ -56,12 +43,6 @@ ...@@ -56,12 +43,6 @@
*/ */
#define OMAP1510_LB_OFFSET (0x30000000UL) #define OMAP1510_LB_OFFSET (0x30000000UL)
/*
* The DRAM is contiguous.
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/* /*
* Conversion between SDRAM and fake PCI bus, used by USB * Conversion between SDRAM and fake PCI bus, used by USB
* NOTE: Physical address must be converted to Local Bus address * NOTE: Physical address must be converted to Local Bus address
......
...@@ -12,35 +12,11 @@ ...@@ -12,35 +12,11 @@
#ifndef __ASM_ARCH_MEMORY_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
/*
* Task size: 3GB
*/
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
/* /*
* Physical DRAM offset. * Physical DRAM offset.
*/ */
#define PHYS_OFFSET (0xa0000000UL) #define PHYS_OFFSET (0xa0000000UL)
/*
* physical vs virtual ram conversion
*/
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -15,30 +15,14 @@ ...@@ -15,30 +15,14 @@
* 21-Mar-1999 RMK Renamed to memory.h * 21-Mar-1999 RMK Renamed to memory.h
* RMK Added TASK_SIZE and PAGE_OFFSET * RMK Added TASK_SIZE and PAGE_OFFSET
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x10000000UL) #define PHYS_OFFSET (0x10000000UL)
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/* /*
* These are exactly the same on the RiscPC as the * These are exactly the same on the RiscPC as the
* physical memory view. * physical memory view.
......
...@@ -23,29 +23,10 @@ ...@@ -23,29 +23,10 @@
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB
*/
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*
* DRAM starts at 0x30000000 * DRAM starts at 0x30000000
*/ */
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x30000000UL) #define PHYS_OFFSET (0x30000000UL)
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/* /*
* These are exactly the same on the S3C2410 as the * These are exactly the same on the S3C2410 as the
* physical memory view. * physical memory view.
......
...@@ -9,36 +9,11 @@ ...@@ -9,36 +9,11 @@
#include <linux/config.h> #include <linux/config.h>
/*
* Task size: 3GB
*/
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
/* /*
* Physical DRAM offset is 0xc0000000 on the SA1100 * Physical DRAM offset is 0xc0000000 on the SA1100
*/ */
#define PHYS_OFFSET (0xc0000000UL) #define PHYS_OFFSET (0xc0000000UL)
/*
* We take advantage of the fact that physical and virtual address can be the
* same. The NUMA code is handling the large holes that might exist between
* all memory banks.
*/
#define __virt_to_phys(x) (x)
#define __phys_to_virt(x) (x)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -11,26 +11,10 @@ ...@@ -11,26 +11,10 @@
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: = 3GB
*/
#define PAGE_OFFSET (0xC0000000UL)
#define PHYS_OFFSET (0x08000000UL) #define PHYS_OFFSET (0x08000000UL)
#define __virt_to_phys(vpage) (vpage - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) (ppage - PHYS_OFFSET + PAGE_OFFSET)
#define __virt_to_bus(x) __virt_to_phys(x) #define __virt_to_bus(x) __virt_to_phys(x)
#define __bus_to_virt(x) __phys_to_virt(x) #define __bus_to_virt(x) __phys_to_virt(x)
......
...@@ -8,29 +8,10 @@ ...@@ -8,29 +8,10 @@
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x80000000UL) #define PHYS_OFFSET (0x80000000UL)
/*
* DRAM is contiguous
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET - PHYS_OFFSET)
/* /*
* Bus view is the same as physical view * Bus view is the same as physical view
*/ */
......
...@@ -17,33 +17,14 @@ ...@@ -17,33 +17,14 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __ASM_ARCH_MMU_H #ifndef __ASM_ARCH_MEMORY_H
#define __ASM_ARCH_MMU_H #define __ASM_ARCH_MEMORY_H
/* /*
* Task size: 3GB * Physical DRAM offset.
*/ */
#define TASK_SIZE (0xbf000000UL)
#define TASK_SIZE_26 (0x04000000UL)
/*
* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
*/
#define TASK_UNMAPPED_BASE (0x40000000)
/*
* Page offset: 3GB
*/
#define PAGE_OFFSET (0xc0000000UL)
#define PHYS_OFFSET (0x00000000UL) #define PHYS_OFFSET (0x00000000UL)
/*
* On Versatile PB, the dram is contiguous
*/
#define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET)
#define __phys_to_virt(ppage) ((ppage) + PAGE_OFFSET)
/* /*
* Virtual view <-> DMA view memory address translations * Virtual view <-> DMA view memory address translations
* virt_to_bus: Used to translate the virtual address to an * virt_to_bus: Used to translate the virtual address to an
......
...@@ -15,6 +15,37 @@ ...@@ -15,6 +15,37 @@
#include <linux/config.h> #include <linux/config.h>
#include <asm/arch/memory.h> #include <asm/arch/memory.h>
#ifndef TASK_SIZE
/*
* TASK_SIZE - the maximum size of a user space task.
* TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
*/
#define TASK_SIZE (0xbf000000UL)
#define TASK_UNMAPPED_BASE (0x40000000UL)
#endif
/*
* The maximum size of a 26-bit user space task.
*/
#define TASK_SIZE_26 (0x04000000UL)
/*
* Page offset: 3GB
*/
#ifndef PAGE_OFFSET
#define PAGE_OFFSET (0xc0000000UL)
#endif
/*
* Physical vs virtual RAM address space conversion. These are
* private definitions which should NOT be used outside memory.h
* files. Use virt_to_phys/phys_to_virt/__pa/__va instead.
*/
#ifndef __virt_to_phys
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
#endif
/* /*
* The module space lives between the addresses given by TASK_SIZE * The module space lives between the addresses given by TASK_SIZE
* and PAGE_OFFSET - it must be within 32MB of the kernel text. * and PAGE_OFFSET - it must be within 32MB of the kernel text.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment