memory.h 973 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * arch/arm/mach-shark/include/mach/memory.h
  3. *
  4. * by Alexander Schulz
  5. *
  6. * derived from:
  7. * arch/arm/mach-ebsa110/include/mach/memory.h
  8. * Copyright (c) 1996-1999 Russell King.
  9. */
  10. #ifndef __ASM_ARCH_MEMORY_H
  11. #define __ASM_ARCH_MEMORY_H
  12. #include <asm/sizes.h>
  13. /*
  14. * Physical DRAM offset.
  15. */
  16. #define PHYS_OFFSET UL(0x08000000)
  17. #ifndef __ASSEMBLY__
  18. static inline void __arch_adjust_zones(unsigned long *zone_size, unsigned long *zhole_size)
  19. {
  20. /* Only the first 4 MB (=1024 Pages) are usable for DMA */
  21. /* See dev / -> .properties in OpenFirmware. */
  22. zone_size[1] = zone_size[0] - 1024;
  23. zone_size[0] = 1024;
  24. zhole_size[1] = zhole_size[0];
  25. zhole_size[0] = 0;
  26. }
  27. #define arch_adjust_zones(size, holes) \
  28. __arch_adjust_zones(size, holes)
  29. #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1)
  30. #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_4M)
  31. #endif
  32. /*
  33. * Cache flushing area
  34. */
  35. #define FLUSH_BASE_PHYS 0x80000000
  36. #define FLUSH_BASE 0xdf000000
  37. #endif