io.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * arch/arm/mach-tegra/io.c
  3. *
  4. * Copyright (C) 2010 Google, Inc.
  5. *
  6. * Author:
  7. * Colin Cross <ccross@google.com>
  8. * Erik Gilling <konkers@google.com>
  9. *
  10. * This software is licensed under the terms of the GNU General Public
  11. * License version 2, as published by the Free Software Foundation, and
  12. * may be copied, distributed, and modified under those terms.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. */
  20. #include <linux/init.h>
  21. #include <linux/io.h>
  22. #include <linux/kernel.h>
  23. #include <linux/mm.h>
  24. #include <linux/module.h>
  25. #include <asm/mach/map.h>
  26. #include <asm/page.h>
  27. #include "board.h"
  28. #include "iomap.h"
  29. static struct map_desc tegra_io_desc[] __initdata = {
  30. {
  31. .virtual = (unsigned long)IO_PPSB_VIRT,
  32. .pfn = __phys_to_pfn(IO_PPSB_PHYS),
  33. .length = IO_PPSB_SIZE,
  34. .type = MT_DEVICE,
  35. },
  36. {
  37. .virtual = (unsigned long)IO_APB_VIRT,
  38. .pfn = __phys_to_pfn(IO_APB_PHYS),
  39. .length = IO_APB_SIZE,
  40. .type = MT_DEVICE,
  41. },
  42. {
  43. .virtual = (unsigned long)IO_CPU_VIRT,
  44. .pfn = __phys_to_pfn(IO_CPU_PHYS),
  45. .length = IO_CPU_SIZE,
  46. .type = MT_DEVICE,
  47. },
  48. {
  49. .virtual = (unsigned long)IO_IRAM_VIRT,
  50. .pfn = __phys_to_pfn(IO_IRAM_PHYS),
  51. .length = IO_IRAM_SIZE,
  52. .type = MT_DEVICE,
  53. },
  54. };
  55. void __init tegra_map_common_io(void)
  56. {
  57. debug_ll_io_init();
  58. iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc));
  59. }