]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 6 May 2014 21:26:19 +0000 (23:26 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 12 May 2014 07:05:01 +0000 (16:05 +0900)
commit68767564c236c073502b45caf4418a54b39bdc92
treea4498bea0f364e03247627e5259900f60e78243e
parent03a169e57a9a3fd69c1713c317a06f163ad63b5c
drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI

If the kernel is built to support multi-ARM configuration with shmobile
support built in, then drivers/sh is not built. This contains the PM
runtime code in drivers/sh/pm_runtime.c, which implicitly enables the
module clocks for all devices, and thus is quite essential.
Without this, the state of clocks depends on implicit reset state, or on
the bootloader.

If ARCH_SHMOBILE_MULTI then build the drivers/sh directory, but ensure that
bits that may conflict (drivers/sh/clk if the common clock framework is
enabled) or are not used (drivers/sh/intc), are not built.
Also, only enable the PM runtime code when actually running on a shmobile
SoCs that needs it.

ARCH_SHMOBILE_MULTI was added a while ago by commit
1da9a3c474db7082956fe96fa77213e386346ad5 ("ARM: shmobile: Introduce
ARCH_SHMOBILE_MULTI"), but drivers/sh was compiled for both
ARCH_SHMOBILE_LEGACY and ARCH_SHMOBILE_MULTI until commit
cc32239ec44ebea5195d7c7796e660ee4cc65693 ("ARM: Rename ARCH_SHMOBILE to
ARCH_SHMOBILE_LEGACY").

Inspired by a patch from Ben Dooks <ben.dooks@codethink.co.uk>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/Makefile
drivers/sh/Makefile
drivers/sh/pm_runtime.c