summaryrefslogtreecommitdiff
path: root/arch/arm/mach-exynos/pm_domains.c
AgeCommit message (Collapse)Author
2015-05-13ARM: EXYNOS: Fix dereference of ERR_PTR returned by of_genpd_get_from_providerKrzysztof Kozlowski
ERR_PTR was dereferenced during sub domain parsing, if parent domain could not be obtained (because of invalid phandle or deferred registration of parent domain). The Exynos power domain code checked whether of_genpd_get_from_provider() returned NULL and in that case it skipped that power domain node. However this function returns ERR_PTR or valid pointer, not NULL. Fixes: 0f7807518fe1 ("ARM: EXYNOS: add support for sub-power domains") Cc: <stable@vger.kernel.org> [4.0+] Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-04-22Merge tag 'armsoc-soc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Olof Johansson: "Our SoC branch usually contains expanded support for new SoCs and other core platform code. In this case, that includes: - support for the new Annapurna Labs "Alpine" platform - a rework greatly simplifying adding new platform support to the MCPM subsystem (Multi-cluster power management) - cpuidle and PM improvements for Exynos3250 - misc updates for Renesas, OMAP, Meson, i.MX. Some of these could have gone in other branches but ended up here for various reasons" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (53 commits) ARM: alpine: add support for generic pci ARM: Exynos: migrate DCSCB to the new MCPM backend abstraction ARM: vexpress: migrate DCSCB to the new MCPM backend abstraction ARM: vexpress: DCSCB: tighten CPU validity assertion ARM: vexpress: migrate TC2 to the new MCPM backend abstraction ARM: MCPM: move the algorithmic complexity to the core code ARM: EXYNOS: allow cpuidle driver usage on Exynos3250 SoC ARM: EXYNOS: add AFTR mode support for Exynos3250 ARM: EXYNOS: add code for setting/clearing boot flag ARM: EXYNOS: fix CPU1 hotplug on Exynos3250 ARM: S3C64XX: Use fixed IRQ bases to avoid conflicts on Cragganmore ARM: cygnus: fix const declaration bcm_cygnus_dt_compat ARM: DRA7: hwmod: Fix the hwmod class for GPTimer4 ARM: DRA7: hwmod: Add data for GPTimers 13 through 16 ARM: EXYNOS: Remove left over 'extra_save' ARM: EXYNOS: Constify exynos_pm_data array ARM: EXYNOS: use static in suspend.c ARM: EXYNOS: Use platform device name as power domain name ARM: EXYNOS: add support for async-bridge clocks for pm_domains ARM: omap-device: add missed callback for suspend-to-disk ...
2015-03-18ARM: EXYNOS: Use platform device name as power domain nameKrzysztof Kozlowski
The power domain nodes in DTS may be very generic (e.g. "power-domain" for Exynos 5420) making it very hard to debug: $ cat /sys/kernel/debug/pm_genpd/pm_genpd_summary domain status slaves power-domain on Use platform device name instead so the names will be a little more user friendly: domain status slaves 100440e0.power-domain on Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Suggested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Suggested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-03-18ARM: EXYNOS: add support for async-bridge clocks for pm_domainsAndrzej Hajda
Since Exynos5420 there are async-bridges (ASB) between different IPs. These bridges must be operational during power domain on/off, ie. clocks used by these bridges should be enabled. This patch enabled these clocks during domain on/off. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-02-27ARM: EXYNOS: add support for sub-power domainsMarek Szyprowski
This patch adds support for making one power domain a sub-domain of other domain. This is useful for modeling power dependences for devices like TV Mixer or Camera ISP, which needs to have more than one power domain enabled to be operational. Based on previous work by Amit Daniel Kachhap <amit.daniel@samsung.com>. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Kukjin Kim <kgene@kernel.org>
2014-09-22ARM: exynos: Move to generic PM domain DT bindingsTomasz Figa
This patch moves Exynos PM domain code to use the new generic PM domain look-up framework introduced in previous patches, thus also allowing the new code to be compiled with CONFIG_ARCH_EXYNOS. This patch was originally submitted by Tomasz Figa when he was employed by Samsung. Link: http://marc.info/?l=linux-pm&m=139955336002083&w=2 Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@linaro.org> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-07-15ARM: EXYNOS: Remove regs-pmu.h header dependency from pm_domainPankaj Dubey
Current "pm_domain.c" file uses "S5P_INT_LOCAL_PWR_EN" definition from "regs-pmu.h" and hence needs to include this header file. As there is no other user of "S5P_INT_LOCAL_PWR_EN" definition other than pm_domain, to remove "regs-pmu.h" header file dependency from "pm_domain.c" it's better we define this definition in "pm_domain.c" file itself and thus it will help in removing header file inclusion from "pm_domain.c". Also removing "S5P_" prefix from macro. Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-07-11ARM: EXYNOS: Add support for clock handling in power domainPrathyush K
While powering on/off a local powerdomain in exynos5 chipsets, the input clocks to each device gets modified. This behaviour is based on the SYSCLK_SYS_PWR_REG registers. E.g. SYSCLK_MFC_SYS_PWR_REG = 0x0, the parent of input clock to MFC (aclk333) gets modified to oscclk = 0x1, no change in clocks. The recommended value of SYSCLK_SYS_PWR_REG before power gating any domain is 0x0. So we must also restore the clocks while powering on a domain everytime. This patch adds the framework for getting the required mux and parent clocks through a power domain device node. With this patch, while powering off a domain, parent is set to oscclk and while powering back on, its re-set to the correct parent which is as per the recommended pd on/off sequence. Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2014-02-14ARM: EXYNOS: Remove unused header file from pm_domains.cTushar Behera
plat/devs.h is not required in this file. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-12-21ARM: EXYNOS: Kill exynos_pm_late_initcall()Sylwester Nawrocki
The only thing exynos_pm_late_initcall() does is calling pm_genpd_poweroff_unused(), which is already stubbed when CONFIG_PM_GENERIC_DOMAINS is not enabled. So replace exynos_pm_late_initcall() with a direct call to pm_genpd_poweroff_unused(). Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-12-19ARM: EXYNOS: local regs-pmu.h header fileKukjin Kim
This moves regs-pmu.h file into mach-exynos directory. Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-06-15ARM: EXYNOS: Remove legacy power domain registration codeTomasz Figa
This patch removes static definitions of power domains and code responsible for registering them and adding devices to them, since only DT based boot is now supported on Exynos. Cc: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-06-10ARM: EXYNOS: no more support non-DT for EXYNOS SoCsKukjin Kim
As we discussed in mailing list, non-DT for EXYNOS SoCs will not be supported from v3.11. This patch removes regarding files for non-DT including board files and defconfig. Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Cc: Tomasz Figa <t.figa@samsung.com> Cc: Thomas Abraham <thomas.ab@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Olof Johansson <olof@lixom.net> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-11-22ARM: EXYNOS: Bind devices to power domains using DTTomasz Figa
This patch adds a way to specify bindings between devices and power domains using device tree. A device can be bound to particular power domain by adding a power-domain property containing a phandle to the domain. The device will be bound to the domain before binding a driver to it and unbound after unbinding a driver from it. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-11-22ARM: EXYNOS: Fix power domain name initializationTomasz Figa
This patch adds initialization of name field in generic power domain struct. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-11-22ARM: EXYNOS: Detect power domain state on registration from DTTomasz Figa
Initial state of power domains might vary on different boards and with different bootloaders. This patch adds detection of initial state of power domains when being registered from DT. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-08-10ARM: exynos: exynos_pm_add_dev_to_genpd may be unusedArnd Bergmann
exynos_pm_add_dev_to_genpd is used if one or more out of a large number of Kconfig symbols are enabled. However the new exynos_defconfig selects none of those, so the function becomes unused. Marking it so lets the compiler automatically discard it. Without this patch, building exynos_defconfig results in: arch/arm/mach-exynos/pm_domains.c:118:123: warning: 'exynos_pm_add_dev_to_genpd' defined but not used [-Wunused-function] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Cc: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-12ARM: EXYNOS: register devices in 'need_restore' state for pm_domainsMarek Szyprowski
Commit ca1d72f033 ('PM / Domains: Make it possible to add devices to inactive domains') introduced possibility to add devices to inactive power domains and added pm_genpd_dev_need_restore() function which lets platform core to notify power domain core that the specified device must be restored (with its runtime_resume() callback) before first use. This patch adds the pm_genpd_dev_need_restore() call what brings back the suspend/resume behaviour for the client devices known from the previous power domain driver (removed by commit 91cfbd4ee0 - 'ARM: EXYNOS: Hook up power domains to generic power domain infrastructure'). Client device drivers relay on that suspend/resume behaviour, thus this patch fixes runtime pm operation for client devices. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-07-12ARM: EXYNOS: read initial state of power domain from hw registersMarek Szyprowski
Some bootloaders disable unused power domains to reduce power consuption. Power domain driver can easily read the actual state from the hardware registers instead of assuming that their initial state is always 'on'. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-05-08ARM: exynos: use machine specific hook for late initShawn Guo
Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-10ARM: EXYNOS: Hook up JPEG PD to generic PD infrastructureSachin Kamat
Add JPEG power domain (PD) to generic power domain infrastructure. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-03-09ARM: EXYNOS: Hook up G2D PD to generic PD infrastructureSachin Kamat
Add G2D power domain (PD) to generic power domain infrastructure. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2012-01-27ARM: EXYNOS: Hook up power domains to generic power domain infrastructureThomas Abraham
Add support for generic power domain for Exynos4 platforms and remove the Samsung specific power domain control for Exynos4. The generic power domain infrastructure is used to control the power domains available on Exynos4. For non-dt platforms, the power domains are statically instantiated. For dt platforms, the power domain nodes found in the device tree are instantiated. Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>