2005-04-17 06:20:36 +08:00
|
|
|
/*
|
2008-08-05 23:14:15 +08:00
|
|
|
* arch/arm/mach-shark/include/mach/memory.h
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* by Alexander Schulz
|
|
|
|
*
|
|
|
|
* derived from:
|
2008-08-05 23:14:15 +08:00
|
|
|
* arch/arm/mach-ebsa110/include/mach/memory.h
|
2005-04-17 06:20:36 +08:00
|
|
|
* Copyright (c) 1996-1999 Russell King.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_ARCH_MEMORY_H
|
|
|
|
#define __ASM_ARCH_MEMORY_H
|
|
|
|
|
|
|
|
#include <asm/sizes.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Physical DRAM offset.
|
|
|
|
*/
|
2011-01-05 02:07:14 +08:00
|
|
|
#define PLAT_PHYS_OFFSET UL(0x08000000)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2010-05-23 03:58:51 +08:00
|
|
|
static inline void __arch_adjust_zones(unsigned long *zone_size, unsigned long *zhole_size)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
|
|
|
/* Only the first 4 MB (=1024 Pages) are usable for DMA */
|
2009-01-09 01:05:58 +08:00
|
|
|
/* See dev / -> .properties in OpenFirmware. */
|
2005-04-17 06:20:36 +08:00
|
|
|
zone_size[1] = zone_size[0] - 1024;
|
|
|
|
zone_size[0] = 1024;
|
|
|
|
zhole_size[1] = zhole_size[0];
|
|
|
|
zhole_size[0] = 0;
|
|
|
|
}
|
|
|
|
|
2010-05-23 03:58:51 +08:00
|
|
|
#define arch_adjust_zones(size, holes) \
|
|
|
|
__arch_adjust_zones(size, holes)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1)
|
2008-11-29 18:56:33 +08:00
|
|
|
#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_4M)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2006-04-05 04:47:43 +08:00
|
|
|
/*
|
|
|
|
* Cache flushing area
|
|
|
|
*/
|
|
|
|
#define FLUSH_BASE_PHYS 0x80000000
|
|
|
|
#define FLUSH_BASE 0xdf000000
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|