io.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * arch/arm/mach-tegra/io.c
  4. *
  5. * Copyright (C) 2010 Google, Inc.
  6. *
  7. * Author:
  8. * Colin Cross <[email protected]>
  9. * Erik Gilling <[email protected]>
  10. */
  11. #include <linux/init.h>
  12. #include <linux/io.h>
  13. #include <linux/kernel.h>
  14. #include <linux/mm.h>
  15. #include <linux/module.h>
  16. #include <asm/mach/map.h>
  17. #include <asm/page.h>
  18. #include "board.h"
  19. #include "iomap.h"
  20. static struct map_desc tegra_io_desc[] __initdata = {
  21. {
  22. .virtual = (unsigned long)IO_PPSB_VIRT,
  23. .pfn = __phys_to_pfn(IO_PPSB_PHYS),
  24. .length = IO_PPSB_SIZE,
  25. .type = MT_DEVICE,
  26. },
  27. {
  28. .virtual = (unsigned long)IO_APB_VIRT,
  29. .pfn = __phys_to_pfn(IO_APB_PHYS),
  30. .length = IO_APB_SIZE,
  31. .type = MT_DEVICE,
  32. },
  33. {
  34. .virtual = (unsigned long)IO_CPU_VIRT,
  35. .pfn = __phys_to_pfn(IO_CPU_PHYS),
  36. .length = IO_CPU_SIZE,
  37. .type = MT_DEVICE,
  38. },
  39. {
  40. .virtual = (unsigned long)IO_IRAM_VIRT,
  41. .pfn = __phys_to_pfn(IO_IRAM_PHYS),
  42. .length = IO_IRAM_SIZE,
  43. .type = MT_DEVICE,
  44. },
  45. };
  46. void __init tegra_map_common_io(void)
  47. {
  48. debug_ll_io_init();
  49. iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc));
  50. }