1
0
Fork 0
Commit Graph

7 Commits (845a326f95f14544e5b3c4b4c8549b3871c8c354)

Author SHA1 Message Date
Ulf Hansson 72ecd79386 ARM: ux500: Fix regression while init PM domains
The commit afece3ab9a ("PM / Domains: Add time accounting to various
genpd states") causes a boot regression for ux500.

The problem occurs when the ux500 machine code calls pm_genpd_init(), which
since the above change triggers a call to ktime_get(). More precisely,
because ux500 initializes PM domains in the init_IRQ() phase of the boot,
timekeeping has not yet been initialized.

Fix the problem by moving the initialization of the PM domains to after
timekeeping has been initialized.

Fixes: afece3ab9a ("PM / Domains: Add time accounting to various genpd..")
Cc: Thara Gopinath <thara.gopinath@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2017-10-19 17:46:36 +02:00
Arnd Bergmann f0e8faa7a5 ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation
This function clearly never worked and always returns true,
as pointed out by gcc-7:

arch/arm/mach-ux500/pm.c: In function 'prcmu_is_cpu_in_wfi':
arch/arm/mach-ux500/pm.c:137:212: error: ?:
using integer constants in boolean context, the expression
will always evaluate to 'true' [-Werror=int-in-bool-context]

With the added braces, the condition actually makes sense.

Fixes: 34fe6f107e ("mfd : Check if the other db8500 core is in WFI")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-01-12 13:25:39 +01:00
Linus Walleij 26ef94dc8b ARM: ux500: get rid of static GIC dist base
The GIC distributor was mapped statically for the PM code
but the driver already get the base address from the DT.
Augment the PM code to get the base from the device tree
and remove the static map.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-05-18 15:07:15 +02:00
Ulf Hansson cd931dcfda ARM: ux500: Initial support for PM domains
The ux500 SoC uses the generic PM domain and requires the domains to be
specified through DT.

Currently the genpd callbacks for handling power gating|ungating are
implemented as dummy functions. To be able to enable those to perform
PM domain gating/ungating, each device that resides in the VAPE domain
must be properly handled from a runtime PM perspective.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-10-28 10:48:23 +01:00
Ulf Hansson ead9e2936b ARM: ux500: Enable system suspend with WFI support
When building for CONFIG_SUSPEND, add the platform suspend callbacks
to enable system suspend for ux500.

At this initial step, only WFI state is supported, which is reached
for both PM_SUSPEND_MEM and PM_SUSPEND_STANDBY.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-01-07 15:01:58 +01:00
Linus Walleij 174e779662 ARM: ux500: get rid of <mach/[hardware|db8500-regs].h>
This removes <mach/hardware.h> and <mach/db8500-regs.h>
from the Ux500, merging them into the local include
"db8500-regs.h" in mach-ux500. There is some impact
outside the ux500 machine, but most of it is dealt with
in earlier patches.

Contains portions of a clean-up patch from Arnd Bergmann.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-08 13:59:28 +02:00
Linus Walleij 1e22a8c614 ARM: ux500: move PM-related PRCMU functions to machine
We are trying to decompose and decentralize the code in
the DB8500 PRCMU out into subdrivers. The code moved in
this patch concerns a group of functions used for
decoupling and recoupling the IRQs from the GIC. During
sleep and idle the Ux500 system will transfer all IRQ
handling to the PRCMU using these functions.

Basically we are left with the two alternatives of code
placement as:

- arch/arm/mach-ux500/pm.c - this because the code is
  closely related to the GIC, and takes ownership of
  some of the registers from the PRCMU related to this
  PM functionality.

- drivers/mfd/db8500-prcmu-pm.c - because the code is
  affecting stuff in the PRCMU register range. But then
  this code needs to remap and handle GIC registers.

This patch implementation is taking the first approach.

Currently the cpuidle driver is the only piece of code
using this set of functions, but it will later also be
used by the suspend/resume code which is currently under
review.

The header file is moved to:
<linux/platform_data/arm-ux500-pm.h>
The function prototypes need to be placed in a globally
visible header since the CPUidle code is planned to move
out to drivers/cpuidle.

Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-08 13:57:53 +02:00