common.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. static struct map_desc at91rm9200_io_desc[] __initdata = {
  18. {
  19. .virtual = AT91_VA_BASE_SYS,
  20. .pfn = __phys_to_pfn(AT91_BASE_SYS),
  21. .length = SZ_4K,
  22. .type = MT_DEVICE,
  23. }, {
  24. .virtual = AT91_VA_BASE_SPI,
  25. .pfn = __phys_to_pfn(AT91_BASE_SPI),
  26. .length = SZ_16K,
  27. .type = MT_DEVICE,
  28. }, {
  29. .virtual = AT91_VA_BASE_SSC2,
  30. .pfn = __phys_to_pfn(AT91_BASE_SSC2),
  31. .length = SZ_16K,
  32. .type = MT_DEVICE,
  33. }, {
  34. .virtual = AT91_VA_BASE_SSC1,
  35. .pfn = __phys_to_pfn(AT91_BASE_SSC1),
  36. .length = SZ_16K,
  37. .type = MT_DEVICE,
  38. }, {
  39. .virtual = AT91_VA_BASE_SSC0,
  40. .pfn = __phys_to_pfn(AT91_BASE_SSC0),
  41. .length = SZ_16K,
  42. .type = MT_DEVICE,
  43. }, {
  44. .virtual = AT91_VA_BASE_US3,
  45. .pfn = __phys_to_pfn(AT91_BASE_US3),
  46. .length = SZ_16K,
  47. .type = MT_DEVICE,
  48. }, {
  49. .virtual = AT91_VA_BASE_US2,
  50. .pfn = __phys_to_pfn(AT91_BASE_US2),
  51. .length = SZ_16K,
  52. .type = MT_DEVICE,
  53. }, {
  54. .virtual = AT91_VA_BASE_US1,
  55. .pfn = __phys_to_pfn(AT91_BASE_US1),
  56. .length = SZ_16K,
  57. .type = MT_DEVICE,
  58. }, {
  59. .virtual = AT91_VA_BASE_US0,
  60. .pfn = __phys_to_pfn(AT91_BASE_US0),
  61. .length = SZ_16K,
  62. .type = MT_DEVICE,
  63. }, {
  64. .virtual = AT91_VA_BASE_EMAC,
  65. .pfn = __phys_to_pfn(AT91_BASE_EMAC),
  66. .length = SZ_16K,
  67. .type = MT_DEVICE,
  68. }, {
  69. .virtual = AT91_VA_BASE_TWI,
  70. .pfn = __phys_to_pfn(AT91_BASE_TWI),
  71. .length = SZ_16K,
  72. .type = MT_DEVICE,
  73. }, {
  74. .virtual = AT91_VA_BASE_MCI,
  75. .pfn = __phys_to_pfn(AT91_BASE_MCI),
  76. .length = SZ_16K,
  77. .type = MT_DEVICE,
  78. }, {
  79. .virtual = AT91_VA_BASE_UDP,
  80. .pfn = __phys_to_pfn(AT91_BASE_UDP),
  81. .length = SZ_16K,
  82. .type = MT_DEVICE,
  83. }, {
  84. .virtual = AT91_VA_BASE_TCB1,
  85. .pfn = __phys_to_pfn(AT91_BASE_TCB1),
  86. .length = SZ_16K,
  87. .type = MT_DEVICE,
  88. }, {
  89. .virtual = AT91_VA_BASE_TCB0,
  90. .pfn = __phys_to_pfn(AT91_BASE_TCB0),
  91. .length = SZ_16K,
  92. .type = MT_DEVICE,
  93. },
  94. };
  95. void __init at91rm9200_map_io(void)
  96. {
  97. iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
  98. }
  99. unsigned long at91_master_clock;
  100. EXPORT_SYMBOL(at91_master_clock);
  101. int at91_serial_map[AT91_NR_UART];
  102. int at91_console_port;
  103. EXPORT_SYMBOL(at91_serial_map);
  104. EXPORT_SYMBOL(at91_console_port);