map.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. /*
  2. * arch/arm/mach-nuc93x/include/mach/map.h
  3. *
  4. * Copyright (c) 2008 Nuvoton technology corporation.
  5. *
  6. * Wan ZongShun <mcuos.com@gmail.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation;version 2 of the License.
  11. *
  12. */
  13. #ifndef __ASM_ARCH_MAP_H
  14. #define __ASM_ARCH_MAP_H
  15. #define MAP_OFFSET (0xfff00000)
  16. #define CLK_OFFSET (0x10)
  17. #ifndef __ASSEMBLY__
  18. #define NUC93X_ADDR(x) ((void __iomem *)(0xF0000000 + ((x)&(~MAP_OFFSET))))
  19. #else
  20. #define NUC93X_ADDR(x) (0xF0000000 + ((x)&(~MAP_OFFSET)))
  21. #endif
  22. /*
  23. * nuc932 hardware register definition
  24. */
  25. #define NUC93X_PA_IRQ (0xFFF83000)
  26. #define NUC93X_PA_GCR (0xFFF00000)
  27. #define NUC93X_PA_EBI (0xFFF01000)
  28. #define NUC93X_PA_UART (0xFFF80000)
  29. #define NUC93X_PA_TIMER (0xFFF81000)
  30. #define NUC93X_PA_GPIO (0xFFF84000)
  31. #define NUC93X_PA_GDMA (0xFFF03000)
  32. #define NUC93X_PA_USBHOST (0xFFF0d000)
  33. #define NUC93X_PA_I2C (0xFFF89000)
  34. #define NUC93X_PA_LCD (0xFFF06000)
  35. #define NUC93X_PA_GE (0xFFF05000)
  36. #define NUC93X_PA_ADC (0xFFF85000)
  37. #define NUC93X_PA_RTC (0xFFF87000)
  38. #define NUC93X_PA_PWM (0xFFF82000)
  39. #define NUC93X_PA_ACTL (0xFFF0a000)
  40. #define NUC93X_PA_USBDEV (0xFFF0C000)
  41. #define NUC93X_PA_JEPEG (0xFFF0e000)
  42. #define NUC93X_PA_CACHE_T (0xFFF60000)
  43. #define NUC93X_PA_VRAM (0xFFF0b000)
  44. #define NUC93X_PA_DMAC (0xFFF09000)
  45. #define NUC93X_PA_I2SM (0xFFF08000)
  46. #define NUC93X_PA_CACHE (0xFFF02000)
  47. #define NUC93X_PA_GPU (0xFFF04000)
  48. #define NUC93X_PA_VIDEOIN (0xFFF07000)
  49. #define NUC93X_PA_SPI0 (0xFFF86000)
  50. #define NUC93X_PA_SPI1 (0xFFF88000)
  51. /*
  52. * nuc932 virtual address mapping.
  53. * interrupt controller is the first thing we put in, to make
  54. * the assembly code for the irq detection easier
  55. */
  56. #define NUC93X_VA_IRQ NUC93X_ADDR(0x00000000)
  57. #define NUC93X_SZ_IRQ SZ_4K
  58. #define NUC93X_VA_GCR NUC93X_ADDR(NUC93X_PA_IRQ)
  59. #define NUC93X_VA_CLKPWR (NUC93X_VA_GCR+CLK_OFFSET)
  60. #define NUC93X_SZ_GCR SZ_4K
  61. /* EBI management */
  62. #define NUC93X_VA_EBI NUC93X_ADDR(NUC93X_PA_EBI)
  63. #define NUC93X_SZ_EBI SZ_4K
  64. /* UARTs */
  65. #define NUC93X_VA_UART NUC93X_ADDR(NUC93X_PA_UART)
  66. #define NUC93X_SZ_UART SZ_4K
  67. /* Timers */
  68. #define NUC93X_VA_TIMER NUC93X_ADDR(NUC93X_PA_TIMER)
  69. #define NUC93X_SZ_TIMER SZ_4K
  70. /* GPIO ports */
  71. #define NUC93X_VA_GPIO NUC93X_ADDR(NUC93X_PA_GPIO)
  72. #define NUC93X_SZ_GPIO SZ_4K
  73. /* GDMA control */
  74. #define NUC93X_VA_GDMA NUC93X_ADDR(NUC93X_PA_GDMA)
  75. #define NUC93X_SZ_GDMA SZ_4K
  76. /* I2C hardware controller */
  77. #define NUC93X_VA_I2C NUC93X_ADDR(NUC93X_PA_I2C)
  78. #define NUC93X_SZ_I2C SZ_4K
  79. /* LCD controller*/
  80. #define NUC93X_VA_LCD NUC93X_ADDR(NUC93X_PA_LCD)
  81. #define NUC93X_SZ_LCD SZ_4K
  82. /* 2D controller*/
  83. #define NUC93X_VA_GE NUC93X_ADDR(NUC93X_PA_GE)
  84. #define NUC93X_SZ_GE SZ_4K
  85. /* ADC */
  86. #define NUC93X_VA_ADC NUC93X_ADDR(NUC93X_PA_ADC)
  87. #define NUC93X_SZ_ADC SZ_4K
  88. /* RTC */
  89. #define NUC93X_VA_RTC NUC93X_ADDR(NUC93X_PA_RTC)
  90. #define NUC93X_SZ_RTC SZ_4K
  91. /* Pulse Width Modulation(PWM) Registers */
  92. #define NUC93X_VA_PWM NUC93X_ADDR(NUC93X_PA_PWM)
  93. #define NUC93X_SZ_PWM SZ_4K
  94. /* Audio Controller controller */
  95. #define NUC93X_VA_ACTL NUC93X_ADDR(NUC93X_PA_ACTL)
  96. #define NUC93X_SZ_ACTL SZ_4K
  97. /* USB Device port */
  98. #define NUC93X_VA_USBDEV NUC93X_ADDR(NUC93X_PA_USBDEV)
  99. #define NUC93X_SZ_USBDEV SZ_4K
  100. /* USB host controller*/
  101. #define NUC93X_VA_USBHOST NUC93X_ADDR(NUC93X_PA_USBHOST)
  102. #define NUC93X_SZ_USBHOST SZ_4K
  103. #endif /* __ASM_ARCH_MAP_H */