msm_iomap-7x00.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /* arch/arm/mach-msm/include/mach/msm_iomap.h
  2. *
  3. * Copyright (C) 2007 Google, Inc.
  4. * Author: Brian Swetland <swetland@google.com>
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. *
  16. * The MSM peripherals are spread all over across 768MB of physical
  17. * space, which makes just having a simple IO_ADDRESS macro to slide
  18. * them into the right virtual location rough. Instead, we will
  19. * provide a master phys->virt mapping for peripherals here.
  20. *
  21. */
  22. #ifndef __ASM_ARCH_MSM_IOMAP_7X00_H
  23. #define __ASM_ARCH_MSM_IOMAP_7X00_H
  24. #include <asm/sizes.h>
  25. /* Physical base address and size of peripherals.
  26. * Ordered by the virtual base addresses they will be mapped at.
  27. *
  28. * MSM_VIC_BASE must be an value that can be loaded via a "mov"
  29. * instruction, otherwise entry-macro.S will not compile.
  30. *
  31. * If you add or remove entries here, you'll want to edit the
  32. * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
  33. * changes.
  34. *
  35. */
  36. #ifdef __ASSEMBLY__
  37. #define IOMEM(x) x
  38. #else
  39. #define IOMEM(x) ((void __force __iomem *)(x))
  40. #endif
  41. #define MSM_VIC_BASE IOMEM(0xE0000000)
  42. #define MSM_VIC_PHYS 0xC0000000
  43. #define MSM_VIC_SIZE SZ_4K
  44. #define MSM_CSR_BASE IOMEM(0xE0001000)
  45. #define MSM_CSR_PHYS 0xC0100000
  46. #define MSM_CSR_SIZE SZ_4K
  47. #define MSM_GPT_PHYS MSM_CSR_PHYS
  48. #define MSM_GPT_BASE MSM_CSR_BASE
  49. #define MSM_GPT_SIZE SZ_4K
  50. #define MSM_DMOV_BASE IOMEM(0xE0002000)
  51. #define MSM_DMOV_PHYS 0xA9700000
  52. #define MSM_DMOV_SIZE SZ_4K
  53. #define MSM_GPIO1_BASE IOMEM(0xE0003000)
  54. #define MSM_GPIO1_PHYS 0xA9200000
  55. #define MSM_GPIO1_SIZE SZ_4K
  56. #define MSM_GPIO2_BASE IOMEM(0xE0004000)
  57. #define MSM_GPIO2_PHYS 0xA9300000
  58. #define MSM_GPIO2_SIZE SZ_4K
  59. #define MSM_CLK_CTL_BASE IOMEM(0xE0005000)
  60. #define MSM_CLK_CTL_PHYS 0xA8600000
  61. #define MSM_CLK_CTL_SIZE SZ_4K
  62. #define MSM_SHARED_RAM_BASE IOMEM(0xE0100000)
  63. #define MSM_SHARED_RAM_PHYS 0x01F00000
  64. #define MSM_SHARED_RAM_SIZE SZ_1M
  65. #define MSM_UART1_PHYS 0xA9A00000
  66. #define MSM_UART1_SIZE SZ_4K
  67. #define MSM_UART2_PHYS 0xA9B00000
  68. #define MSM_UART2_SIZE SZ_4K
  69. #define MSM_UART3_PHYS 0xA9C00000
  70. #define MSM_UART3_SIZE SZ_4K
  71. #ifdef CONFIG_MSM_DEBUG_UART
  72. #define MSM_DEBUG_UART_BASE 0xE1000000
  73. #if CONFIG_MSM_DEBUG_UART == 1
  74. #define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS
  75. #elif CONFIG_MSM_DEBUG_UART == 2
  76. #define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS
  77. #elif CONFIG_MSM_DEBUG_UART == 3
  78. #define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS
  79. #endif
  80. #define MSM_DEBUG_UART_SIZE SZ_4K
  81. #endif
  82. #define MSM_SDC1_PHYS 0xA0400000
  83. #define MSM_SDC1_SIZE SZ_4K
  84. #define MSM_SDC2_PHYS 0xA0500000
  85. #define MSM_SDC2_SIZE SZ_4K
  86. #define MSM_SDC3_PHYS 0xA0600000
  87. #define MSM_SDC3_SIZE SZ_4K
  88. #define MSM_SDC4_PHYS 0xA0700000
  89. #define MSM_SDC4_SIZE SZ_4K
  90. #define MSM_I2C_PHYS 0xA9900000
  91. #define MSM_I2C_SIZE SZ_4K
  92. #define MSM_HSUSB_PHYS 0xA0800000
  93. #define MSM_HSUSB_SIZE SZ_4K
  94. #define MSM_PMDH_PHYS 0xAA600000
  95. #define MSM_PMDH_SIZE SZ_4K
  96. #define MSM_EMDH_PHYS 0xAA700000
  97. #define MSM_EMDH_SIZE SZ_4K
  98. #define MSM_MDP_PHYS 0xAA200000
  99. #define MSM_MDP_SIZE 0x000F0000
  100. #define MSM_MDC_PHYS 0xAA500000
  101. #define MSM_MDC_SIZE SZ_1M
  102. #define MSM_AD5_PHYS 0xAC000000
  103. #define MSM_AD5_SIZE (SZ_1M*13)
  104. #if defined(CONFIG_ARCH_MSM7X30)
  105. #define MSM_GCC_BASE IOMEM(0xF8009000)
  106. #define MSM_GCC_PHYS 0xC0182000
  107. #define MSM_GCC_SIZE SZ_4K
  108. #endif
  109. #endif