Skip to content

Commit

Permalink
ARM: imx: make imx51/3 suspend optional
Browse files Browse the repository at this point in the history
A recent change to the imx53 power management caused a build
regression when CONFIG_SOC_IMX53 is disabled:

mach-imx/built-in.o:(.init.rodata+0x60): undefined reference to `imx53_suspend'
mach-imx/built-in.o:(.init.rodata+0x64): undefined reference to `imx53_suspend_sz'

This avoids the problem by compiling the code in question
conditionally on the presence of CONFIG_SOC_IMX53. For
consistency, I'm also changing the same thing for
CONFIG_SOC_IMX51.

An additional benefit of this approach is reduced code size
for kernels that only include support for one of the two
SoCs.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 1579c7b ("ARM: imx53: Set DDR pins to high impedance when in suspend to RAM.")
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
  • Loading branch information
Arnd Bergmann authored and Shawn Guo committed Jun 3, 2015
1 parent da946ae commit e20d7b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/arm/mach-imx/pm-imx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,12 @@ static int __init imx5_pm_common_init(const struct imx5_pm_data *data)

void __init imx51_pm_init(void)
{
imx5_pm_common_init(&imx51_pm_data);
if (IS_ENABLED(CONFIG_SOC_IMX51))
imx5_pm_common_init(&imx51_pm_data);
}

void __init imx53_pm_init(void)
{
imx5_pm_common_init(&imx53_pm_data);
if (IS_ENABLED(CONFIG_SOC_IMX53))
imx5_pm_common_init(&imx53_pm_data);
}

0 comments on commit e20d7b5

Please sign in to comment.