Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48e076da authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Shawn Guo
Browse files

ARM: imx: rework mx27_pm_init() call



mx27_pm_init() uses its own initcall, unlike all of the other
functions like it. Replacing the initcall with a .init_late()
callback makes imx27 more like the others and lets us remove
the last caller of cpu_is_mx27().

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent c112d2ad
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ void imx_gpc_set_arm_power_in_lpm(bool power_off);
void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw);
void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw);
void imx25_pm_init(void);
void imx27_pm_init(void);

enum mxc_cpu_pwr_mode {
	WAIT_CLOCKED,		/* wfi only */
+1 −0
Original line number Diff line number Diff line
@@ -27,5 +27,6 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
	.map_io		= mx27_map_io,
	.init_early	= imx27_init_early,
	.init_irq	= mx27_init_irq,
	.init_late	= imx27_pm_init,
	.dt_compat	= imx27_dt_board_compat,
MACHINE_END
+2 −0
Original line number Diff line number Diff line
@@ -98,4 +98,6 @@ void __init imx27_soc_init(void)
	/* imx27 has the imx21 type audmux */
	platform_device_register_simple("imx21-audmux", 0, imx27_audmux_res,
					ARRAY_SIZE(imx27_audmux_res));

	imx27_pm_init();
}
+1 −7
Original line number Diff line number Diff line
@@ -37,13 +37,7 @@ static const struct platform_suspend_ops mx27_suspend_ops = {
	.valid = suspend_valid_only_mem,
};

static int __init mx27_pm_init(void)
void __init imx27_pm_init(void)
{
	if (!cpu_is_mx27())
		return 0;

	suspend_set_ops(&mx27_suspend_ops);
	return 0;
}

device_initcall(mx27_pm_init);