memory.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * arch/arm/mach-footbridge/include/mach/memory.h
  3. *
  4. * Copyright (C) 1996-1999 Russell King.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * Changelog:
  11. * 20-Oct-1996 RMK Created
  12. * 31-Dec-1997 RMK Fixed definitions to reduce warnings.
  13. * 17-May-1998 DAG Added __virt_to_bus and __bus_to_virt functions.
  14. * 21-Nov-1998 RMK Changed __virt_to_bus and __bus_to_virt to macros.
  15. * 21-Mar-1999 RMK Added PAGE_OFFSET for co285 architecture.
  16. * Renamed to memory.h
  17. * Moved PAGE_OFFSET and TASK_SIZE here
  18. */
  19. #ifndef __ASM_ARCH_MEMORY_H
  20. #define __ASM_ARCH_MEMORY_H
  21. #if defined(CONFIG_FOOTBRIDGE_ADDIN)
  22. /*
  23. * If we may be using add-in footbridge mode, then we must
  24. * use the out-of-line translation that makes use of the
  25. * PCI BAR
  26. */
  27. #ifndef __ASSEMBLY__
  28. extern unsigned long __virt_to_bus(unsigned long);
  29. extern unsigned long __bus_to_virt(unsigned long);
  30. #endif
  31. #elif defined(CONFIG_FOOTBRIDGE_HOST)
  32. #define __virt_to_bus(x) ((x) - 0xe0000000)
  33. #define __bus_to_virt(x) ((x) + 0xe0000000)
  34. #else
  35. #error "Undefined footbridge mode"
  36. #endif
  37. /*
  38. * Cache flushing area.
  39. */
  40. #define FLUSH_BASE 0xf9000000
  41. /*
  42. * Physical DRAM offset.
  43. */
  44. #define PHYS_OFFSET UL(0x00000000)
  45. #define FLUSH_BASE_PHYS 0x50000000
  46. #endif