xref: /openbmc/linux/arch/arm/mach-imx/mach-imx6ul.c (revision 3ddc8b84)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (C) 2015 Freescale Semiconductor, Inc.
4  */
5 #include <linux/irqchip.h>
6 #include <linux/of_platform.h>
7 #include <asm/mach/arch.h>
8 
9 #include "common.h"
10 #include "cpuidle.h"
11 #include "hardware.h"
12 
13 static void __init imx6ul_init_machine(void)
14 {
15 	imx_print_silicon_rev(cpu_is_imx6ull() ? "i.MX6ULL" : "i.MX6UL",
16 		imx_get_soc_revision());
17 
18 	of_platform_default_populate(NULL, NULL, NULL);
19 	imx_anatop_init();
20 	imx6ul_pm_init();
21 }
22 
23 static void __init imx6ul_init_irq(void)
24 {
25 	imx_init_revision_from_anatop();
26 	imx_src_init();
27 	irqchip_init();
28 	imx6_pm_ccm_init("fsl,imx6ul-ccm");
29 }
30 
31 static void __init imx6ul_init_late(void)
32 {
33 	imx6sx_cpuidle_init();
34 
35 	if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ))
36 		platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
37 }
38 
39 static const char * const imx6ul_dt_compat[] __initconst = {
40 	"fsl,imx6ul",
41 	"fsl,imx6ull",
42 	"fsl,imx6ulz",
43 	NULL,
44 };
45 
46 DT_MACHINE_START(IMX6UL, "Freescale i.MX6 Ultralite (Device Tree)")
47 	.init_irq	= imx6ul_init_irq,
48 	.init_machine	= imx6ul_init_machine,
49 	.init_late	= imx6ul_init_late,
50 	.dt_compat	= imx6ul_dt_compat,
51 MACHINE_END
52