mach-imx27.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright 2012 Sascha Hauer, Pengutronix
  4. */
  5. #include <linux/init.h>
  6. #include <linux/irq.h>
  7. #include <linux/of_address.h>
  8. #include <linux/of_irq.h>
  9. #include <linux/of_platform.h>
  10. #include <linux/mm.h>
  11. #include <asm/mach/arch.h>
  12. #include <asm/mach/map.h>
  13. #include <asm/mach/time.h>
  14. #include "common.h"
  15. #include "hardware.h"
  16. #include "mx27.h"
  17. /* MX27 memory map definition */
  18. static struct map_desc imx27_io_desc[] __initdata = {
  19. /*
  20. * this fixed mapping covers:
  21. * - AIPI1
  22. * - AIPI2
  23. * - AITC
  24. * - ROM Patch
  25. * - and some reserved space
  26. */
  27. imx_map_entry(MX27, AIPI, MT_DEVICE),
  28. /*
  29. * this fixed mapping covers:
  30. * - CSI
  31. * - ATA
  32. */
  33. imx_map_entry(MX27, SAHB1, MT_DEVICE),
  34. /*
  35. * this fixed mapping covers:
  36. * - EMI
  37. */
  38. imx_map_entry(MX27, X_MEMC, MT_DEVICE),
  39. };
  40. /*
  41. * Initialize the memory map. It is called during the
  42. * system startup to create static physical to virtual
  43. * memory map for the IO modules.
  44. */
  45. static void __init mx27_map_io(void)
  46. {
  47. iotable_init(imx27_io_desc, ARRAY_SIZE(imx27_io_desc));
  48. }
  49. static void __init imx27_init_early(void)
  50. {
  51. mxc_set_cpu_type(MXC_CPU_MX27);
  52. }
  53. static const char * const imx27_dt_board_compat[] __initconst = {
  54. "fsl,imx27",
  55. NULL
  56. };
  57. DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
  58. .map_io = mx27_map_io,
  59. .init_early = imx27_init_early,
  60. .init_late = imx27_pm_init,
  61. .dt_compat = imx27_dt_board_compat,
  62. MACHINE_END