io.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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/kernel.h>
  21. #include <linux/module.h>
  22. #include <linux/init.h>
  23. #include <linux/mm.h>
  24. #include <linux/io.h>
  25. #include <asm/page.h>
  26. #include <asm/mach/map.h>
  27. #include "board.h"
  28. static struct map_desc tegra_io_desc[] __initdata = {
  29. {
  30. .virtual = (unsigned long)IO_PPSB_VIRT,
  31. .pfn = __phys_to_pfn(IO_PPSB_PHYS),
  32. .length = IO_PPSB_SIZE,
  33. .type = MT_DEVICE,
  34. },
  35. {
  36. .virtual = (unsigned long)IO_APB_VIRT,
  37. .pfn = __phys_to_pfn(IO_APB_PHYS),
  38. .length = IO_APB_SIZE,
  39. .type = MT_DEVICE,
  40. },
  41. {
  42. .virtual = (unsigned long)IO_CPU_VIRT,
  43. .pfn = __phys_to_pfn(IO_CPU_PHYS),
  44. .length = IO_CPU_SIZE,
  45. .type = MT_DEVICE,
  46. },
  47. {
  48. .virtual = (unsigned long)IO_IRAM_VIRT,
  49. .pfn = __phys_to_pfn(IO_IRAM_PHYS),
  50. .length = IO_IRAM_SIZE,
  51. .type = MT_DEVICE,
  52. },
  53. };
  54. void __init tegra_map_common_io(void)
  55. {
  56. iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc));
  57. }