mach-imx6sx.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright 2014 Freescale Semiconductor, Inc.
  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 version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/irqchip.h>
  9. #include <linux/of_platform.h>
  10. #include <asm/mach/arch.h>
  11. #include <asm/mach/map.h>
  12. #include "common.h"
  13. #include "cpuidle.h"
  14. static void __init imx6sx_init_machine(void)
  15. {
  16. struct device *parent;
  17. mxc_arch_reset_init_dt();
  18. parent = imx_soc_device_init();
  19. if (parent == NULL)
  20. pr_warn("failed to initialize soc device\n");
  21. of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
  22. imx_anatop_init();
  23. imx6sx_pm_init();
  24. }
  25. static void __init imx6sx_init_irq(void)
  26. {
  27. imx_init_revision_from_anatop();
  28. imx_init_l2cache();
  29. imx_src_init();
  30. imx_gpc_init();
  31. irqchip_init();
  32. }
  33. static void __init imx6sx_init_late(void)
  34. {
  35. imx6q_cpuidle_init();
  36. if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ))
  37. platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
  38. }
  39. static const char * const imx6sx_dt_compat[] __initconst = {
  40. "fsl,imx6sx",
  41. NULL,
  42. };
  43. DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
  44. .map_io = debug_ll_io_init,
  45. .init_irq = imx6sx_init_irq,
  46. .init_machine = imx6sx_init_machine,
  47. .dt_compat = imx6sx_dt_compat,
  48. .init_late = imx6sx_init_late,
  49. .restart = mxc_restart,
  50. MACHINE_END