mach-imx1.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. */
  9. #include <linux/of_platform.h>
  10. #include <asm/mach/arch.h>
  11. #include <asm/mach/map.h>
  12. #include "common.h"
  13. #include "hardware.h"
  14. #define MX1_AVIC_ADDR 0x00223000
  15. static void __init imx1_init_early(void)
  16. {
  17. mxc_set_cpu_type(MXC_CPU_MX1);
  18. }
  19. static void __init imx1_init_irq(void)
  20. {
  21. void __iomem *avic_addr;
  22. avic_addr = ioremap(MX1_AVIC_ADDR, SZ_4K);
  23. WARN_ON(!avic_addr);
  24. mxc_init_irq(avic_addr);
  25. }
  26. static const char * const imx1_dt_board_compat[] __initconst = {
  27. "fsl,imx1",
  28. NULL
  29. };
  30. DT_MACHINE_START(IMX1_DT, "Freescale i.MX1 (Device Tree Support)")
  31. .map_io = debug_ll_io_init,
  32. .init_early = imx1_init_early,
  33. .init_irq = imx1_init_irq,
  34. .dt_compat = imx1_dt_board_compat,
  35. .restart = mxc_restart,
  36. MACHINE_END