aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/cpuidle.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-08-20ARM: s3c: move into a common directoryArnd Bergmann1-60/+0
s3c24xx and s3c64xx have a lot in common, but are split across three separate directories, which makes the interaction of the header files more complicated than necessary. Move all three directories into a new mach-s3c, with a minimal set of changes to each file. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [krzk: Rebase, add s3c24xx and s3c64xx suffix to several files, add SPDX headers to new files, remove plat-samsung from MAINTAINERS] Co-developed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> https://lore.kernel.org/r/20200806182059.2431-39-krzk@kernel.org
2018-01-03ARM: S3C64XX: Add SPDX license identifiersKrzysztof Kozlowski1-10/+5
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>
2015-12-01ARM: s3c64xx: prepare initcalls for multiplatformArnd Bergmann1-1/+4
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-03-23ARM: cpuidle: Remove duplicate header inclusionDaniel Lezcano1-1/+1
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>
2014-11-12cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logicDaniel Lezcano1-1/+0
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>
2013-04-26ARM: s3c64xx: cpuidle: use init/exit common routineDaniel Lezcano1-13/+1
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-23cpuidle: remove en_core_tk_irqen flagDaniel Lezcano1-1/+0
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-01-10ARM: S3C64XX: Fix missing header error with CONFIG_CPU_IDLE enabledTomasz Figa1-2/+1
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-10ARM: S3C64XX: make regs-sys.h localKukjin Kim1-1/+2
The header file can be local in mach-s3c64xx/. Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-18ARM: S3C64XX: use timekeeping wrapper on cpuidleDaniel Lezcano1-11/+1
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-18ARM: S3C64XX: declare the states with the new api on cpuidleDaniel Lezcano1-19/+14
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-02-11ARM: S3C64XX: Reduce residency requirement for cpuidle WFI modeMark Brown1-1/+1
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-01-20ARM: S3C64XX: Add basic cpuidle driverMark Brown1-0/+91
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>