Commit graph

12 commits

Author SHA1 Message Date
Krzysztof Kozlowski
28a196fe6c ARM: S3C64XX: Add SPDX license identifiers
Replace GPL license statements with SPDX license identifiers (GPL-2.0
and GPL-2.0+).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
2018-01-03 18:42:53 +01:00
Arnd Bergmann
a0e157afd0 ARM: s3c64xx: prepare initcalls for multiplatform
In a multiplatform kernel, each initcall is run regardless
of the platform it is meant for, so it must not attempt to
access SoC-specific registers.

This adds 'if (soc_is_s3c64xx)' to all initcalls that are
specific to the s3c64xx platform, to prevent them from breaking
other platforms once we can build them into a combined kernel.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
2015-12-01 21:50:24 +01:00
Daniel Lezcano
eeebc3bb4d ARM: cpuidle: Remove duplicate header inclusion
The cpu_do_idle() function is always used by the cpuidle drivers.

That led to have each driver including cpuidle.h and proc-fns.h, they are
always paired. That makes a lot of duplicate headers inclusion. Instead of
including both in each .c file, move the proc-fns.h header inclusion in the
cpuidle.h header file directly, so we can save some line of code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2015-03-23 18:03:11 +01:00
Daniel Lezcano
b82b6cca48 cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logic
The only place where the time is invalid is when the ACPI_CSTATE_FFH entry
method is not set. Otherwise for all the drivers, the time can be correctly
measured.

Instead of duplicating the CPUIDLE_FLAG_TIME_VALID flag in all the drivers
for all the states, just invert the logic by replacing it by the flag
CPUIDLE_FLAG_TIME_INVALID, hence we can set this flag only for the acpi idle
driver, remove the former flag from all the drivers and invert the logic with
this flag in the different governor.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-11-12 21:17:27 +01:00
Daniel Lezcano
9fe3d35a32 ARM: s3c64xx: cpuidle: use init/exit common routine
Remove the duplicated code and use the cpuidle common code for initialization.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-04-26 13:34:02 +02:00
Daniel Lezcano
554c06ba3e cpuidle: remove en_core_tk_irqen flag
The en_core_tk_irqen flag is set in all the cpuidle driver which
means it is not necessary to specify this flag.

Remove the flag and the code related to it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>  # for mach-omap2/*
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-04-23 13:45:22 +02:00
Tomasz Figa
3a71c5c375 ARM: S3C64XX: Fix missing header error with CONFIG_CPU_IDLE enabled
Recently the regs-syscon-power.h header was moved from
mach-s3c64xx/include/mach to mach-s3c64xx/, but cpuidle.c was not
updated to include the header from its new location, which caused
build error with CONFIG_CPU_IDLE enabled.

This patch fixed the problem by updating the include line with
proper header location.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-01-10 10:45:41 -08:00
Kukjin Kim
f2bfd174bd ARM: S3C64XX: make regs-sys.h local
The header file can be local in mach-s3c64xx/.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-01-10 10:45:40 -08:00
Daniel Lezcano
aba607d63c ARM: S3C64XX: use timekeeping wrapper on cpuidle
The timekeeping is computed from the cpuidle core if we set
the .en_core_tk_irqen flag. Let's use it and remove the duplicated
code.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-18 07:19:49 +09:00
Daniel Lezcano
4c8b207528 ARM: S3C64XX: declare the states with the new api on cpuidle
The states are now part of the cpuidle_driver structure, so we can
declare the states in this structure directly. That saves us an extra
variable declaration and a memcpy.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-18 07:19:42 +09:00
Mark Brown
90ca2979ed ARM: S3C64XX: Reduce residency requirement for cpuidle WFI mode
Entering and leaving WFI is really cheap so there's no reason to have much
of a residency requirement for the state. Lower it to 1ms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-02-11 08:02:43 +09:00
Mark Brown
2abf13c9ff ARM: S3C64XX: Add basic cpuidle driver
Add a very basic cpuidle driver for S3C64xx which merely drives the CPU
into IDLE mode. We could do this with pm_idle but the more modern idiom
is to use cpuidle and the intention is to go further and support STOP
and DEEP-STOP states in conjunction with the pm_domain framework.

The actual state entry code was lifted from Tomasz Figa's work on spica.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-01-20 09:39:52 +09:00