hardware.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (C) 2009 ST-Ericsson.
  3. *
  4. * U8500 hardware definitions
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #ifndef __MACH_HARDWARE_H
  11. #define __MACH_HARDWARE_H
  12. /*
  13. * Macros to get at IO space when running virtually
  14. * We dont map all the peripherals, let ioremap do
  15. * this for us. We map only very basic peripherals here.
  16. */
  17. #define U8500_IO_VIRTUAL 0xf0000000
  18. #define U8500_IO_PHYSICAL 0xa0000000
  19. /* This macro is used in assembly, so no cast */
  20. #define IO_ADDRESS(x) \
  21. (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + U8500_IO_VIRTUAL)
  22. /* typesafe io address */
  23. #define __io_address(n) __io(IO_ADDRESS(n))
  24. /* Used by some plat-nomadik code */
  25. #define io_p2v(n) __io_address(n)
  26. #include <mach/db8500-regs.h>
  27. #include <mach/db5500-regs.h>
  28. #ifndef __ASSEMBLY__
  29. #include <mach/id.h>
  30. extern void __iomem *_PRCMU_BASE;
  31. #define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
  32. #endif /* __ASSEMBLY__ */
  33. #endif /* __MACH_HARDWARE_H */