common.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  2. * arch/arm/mach-at91rm9200/common.c
  3. *
  4. * Copyright (C) 2005 SAN People
  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 as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. */
  12. #include <linux/config.h>
  13. #include <linux/module.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/mach/map.h>
  16. #include <asm/arch/hardware.h>
  17. #include "generic.h"
  18. static struct map_desc at91rm9200_io_desc[] __initdata = {
  19. {
  20. .virtual = AT91_VA_BASE_SYS,
  21. .pfn = __phys_to_pfn(AT91_BASE_SYS),
  22. .length = SZ_4K,
  23. .type = MT_DEVICE,
  24. }, {
  25. .virtual = AT91_VA_BASE_SPI,
  26. .pfn = __phys_to_pfn(AT91_BASE_SPI),
  27. .length = SZ_16K,
  28. .type = MT_DEVICE,
  29. }, {
  30. .virtual = AT91_VA_BASE_SSC2,
  31. .pfn = __phys_to_pfn(AT91_BASE_SSC2),
  32. .length = SZ_16K,
  33. .type = MT_DEVICE,
  34. }, {
  35. .virtual = AT91_VA_BASE_SSC1,
  36. .pfn = __phys_to_pfn(AT91_BASE_SSC1),
  37. .length = SZ_16K,
  38. .type = MT_DEVICE,
  39. }, {
  40. .virtual = AT91_VA_BASE_SSC0,
  41. .pfn = __phys_to_pfn(AT91_BASE_SSC0),
  42. .length = SZ_16K,
  43. .type = MT_DEVICE,
  44. }, {
  45. .virtual = AT91_VA_BASE_US3,
  46. .pfn = __phys_to_pfn(AT91_BASE_US3),
  47. .length = SZ_16K,
  48. .type = MT_DEVICE,
  49. }, {
  50. .virtual = AT91_VA_BASE_US2,
  51. .pfn = __phys_to_pfn(AT91_BASE_US2),
  52. .length = SZ_16K,
  53. .type = MT_DEVICE,
  54. }, {
  55. .virtual = AT91_VA_BASE_US1,
  56. .pfn = __phys_to_pfn(AT91_BASE_US1),
  57. .length = SZ_16K,
  58. .type = MT_DEVICE,
  59. }, {
  60. .virtual = AT91_VA_BASE_US0,
  61. .pfn = __phys_to_pfn(AT91_BASE_US0),
  62. .length = SZ_16K,
  63. .type = MT_DEVICE,
  64. }, {
  65. .virtual = AT91_VA_BASE_EMAC,
  66. .pfn = __phys_to_pfn(AT91_BASE_EMAC),
  67. .length = SZ_16K,
  68. .type = MT_DEVICE,
  69. }, {
  70. .virtual = AT91_VA_BASE_TWI,
  71. .pfn = __phys_to_pfn(AT91_BASE_TWI),
  72. .length = SZ_16K,
  73. .type = MT_DEVICE,
  74. }, {
  75. .virtual = AT91_VA_BASE_MCI,
  76. .pfn = __phys_to_pfn(AT91_BASE_MCI),
  77. .length = SZ_16K,
  78. .type = MT_DEVICE,
  79. }, {
  80. .virtual = AT91_VA_BASE_UDP,
  81. .pfn = __phys_to_pfn(AT91_BASE_UDP),
  82. .length = SZ_16K,
  83. .type = MT_DEVICE,
  84. }, {
  85. .virtual = AT91_VA_BASE_TCB1,
  86. .pfn = __phys_to_pfn(AT91_BASE_TCB1),
  87. .length = SZ_16K,
  88. .type = MT_DEVICE,
  89. }, {
  90. .virtual = AT91_VA_BASE_TCB0,
  91. .pfn = __phys_to_pfn(AT91_BASE_TCB0),
  92. .length = SZ_16K,
  93. .type = MT_DEVICE,
  94. }, {
  95. .virtual = AT91_SRAM_VIRT_BASE,
  96. .pfn = __phys_to_pfn(AT91_SRAM_BASE),
  97. .length = AT91_SRAM_SIZE,
  98. .type = MT_DEVICE,
  99. },
  100. };
  101. void __init at91rm9200_map_io(void)
  102. {
  103. iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
  104. }