Re: [PATCH 0/3] Introduce SET_NOIRQ_SYSTEM_SLEEP_PM_OPS and use it

2015-04-27 Thread santosh shilimkar



On 4/27/2015 11:24 AM, grygorii.stras...@linaro.org wrote:

From: Grygorii Strashko grygorii.stras...@linaro.org

While working on suspend-to-disk functionality on TI dra7-evm (DRA7xx SoC)
i've found that the most common problem I have to dial with is absence
of corresponding PM callbacks in drivers and, in particular, noirq callbacks.
So, I've fixed one driver first
commit 6248015d6867 ARM: omap-device: add missed callback for suspend-to-disk
but then found another one which need to be fixed too (omap_l3_noc.c).
At this moment I decided to make my life easier and added new macro
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS using the same approach as for the existing
SET_SYSTEM_SLEEP_PM_OPS macro.

SET_NOIRQ_SYSTEM_SLEEP_PM_OPS: defined for CONFIG_PM_SLEEP and
assigns -suspend_noirq, -freeze_noirq and -poweroff_noirq to the same
function. Vice versa happens for -resume_noirq, -thaw_noirq and
-restore_noirq.

Further two patches reuse this newly introduced macro.

SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, defined for CONFIG_PM_SLEEP, will
 point -suspend_noirq, -freeze_noirq and -poweroff_noirq to the same
 function. Vice versa happens for -resume_noirq, -thaw_noirq and
 -restore_noirq.


[...]



Grygorii Strashko (3):
   PM / Sleep: Add macro to define common noirq system PM callbacks
   bus: omap_l3_noc: add missed callbacks for suspend-to-disk
   ARM: omap-device: use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS

  arch/arm/mach-omap2/omap_device.c |  7 ++-
  drivers/bus/omap_l3_noc.c |  4 ++--
  include/linux/pm.h| 12 
  3 files changed, 16 insertions(+), 7 deletions(-)


Looks fine to me.
Acked-by: Santosh Shilimkar ssant...@kernel.org
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3.12 33/83] dmaengine: omap-dma: Fix memory leak when terminating running transfer

2015-04-27 Thread Jiri Slaby
From: Peter Ujfalusi peter.ujfal...@ti.com

3.12-stable review patch.  If anyone has any objections, please let me know.

===

commit 02d88b735f5a60f04dbf6d051b76e1877a0d0844 upstream.

In omap_dma_start_desc the vdesc-node is removed from the virt-dma
framework managed lists (to be precise from the desc_issued list).
If a terminate_all comes before the transfer finishes the omap_desc will
not be freed up because it is not in any of the lists and we stopped the
DMA channel so the transfer will not going to complete.
There is no special sequence for leaking memory when using cyclic (audio)
transfer: with every start and stop of a cyclic transfer the driver leaks
struct omap_desc worth of memory.

Free up the allocated memory directly in omap_dma_terminate_all() since the
framework will not going to do that for us.

Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
CC: linux-omap@vger.kernel.org
Signed-off-by: Vinod Koul vinod.k...@intel.com
Signed-off-by: Jiri Slaby jsl...@suse.cz
---
 drivers/dma/omap-dma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index ec3fc4fd9160..b94a37630e36 100644
--- a/drivers/dma/omap-dma.c
+++ b/drivers/dma/omap-dma.c
@@ -487,6 +487,7 @@ static int omap_dma_terminate_all(struct omap_chan *c)
 * c-desc is NULL and exit.)
 */
if (c-desc) {
+   omap_dma_desc_free(c-desc-vd);
c-desc = NULL;
/* Avoid stopping the dma twice */
if (!c-paused)
-- 
2.3.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: Constify irq_domain_ops

2015-04-27 Thread Krzysztof Kozlowski
The irq_domain_ops are not modified by the driver and the irqdomain core
code accepts pointer to a const data.

Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
 arch/arm/mach-omap2/omap-wakeupgen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c 
b/arch/arm/mach-omap2/omap-wakeupgen.c
index 3b56722dfd8a..8e52621b5a6b 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -444,7 +444,7 @@ static int wakeupgen_domain_alloc(struct irq_domain *domain,
return irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, 
parent_args);
 }
 
-static struct irq_domain_ops wakeupgen_domain_ops = {
+static const struct irq_domain_ops wakeupgen_domain_ops = {
.xlate  = wakeupgen_domain_xlate,
.alloc  = wakeupgen_domain_alloc,
.free   = irq_domain_free_irqs_common,
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mfd: Constify regmap and irq configuration data

2015-04-27 Thread Krzysztof Kozlowski
Constify in various drivers configuration data which is not modified:
 - regmap_irq_chip,
 - individual regmap_irq's in array,
 - regmap_config,
 - irq_domain_ops,

Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
 drivers/mfd/88pm860x-core.c   | 2 +-
 drivers/mfd/ab8500-core.c | 2 +-
 drivers/mfd/arizona-irq.c | 2 +-
 drivers/mfd/da9052-irq.c  | 4 ++--
 drivers/mfd/da9055-core.c | 6 +++---
 drivers/mfd/da9063-irq.c  | 4 ++--
 drivers/mfd/da9150-core.c | 4 ++--
 drivers/mfd/db8500-prcmu.c| 2 +-
 drivers/mfd/intel_soc_pmic_core.h | 2 +-
 drivers/mfd/intel_soc_pmic_crc.c  | 2 +-
 drivers/mfd/lp8788-irq.c  | 2 +-
 drivers/mfd/max8925-core.c| 2 +-
 drivers/mfd/max8997-irq.c | 2 +-
 drivers/mfd/max8998-irq.c | 2 +-
 drivers/mfd/mt6397-core.c | 2 +-
 drivers/mfd/stmpe.c   | 2 +-
 drivers/mfd/tc3589x.c | 2 +-
 drivers/mfd/tps6586x.c| 2 +-
 drivers/mfd/twl6030-irq.c | 2 +-
 drivers/mfd/wm831x-irq.c  | 2 +-
 drivers/mfd/wm8994-irq.c  | 6 +++---
 include/linux/mfd/da9055/core.h   | 2 +-
 22 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c
index d2a85cde68da..e03b7f45b8f7 100644
--- a/drivers/mfd/88pm860x-core.c
+++ b/drivers/mfd/88pm860x-core.c
@@ -566,7 +566,7 @@ static int pm860x_irq_domain_map(struct irq_domain *d, 
unsigned int virq,
return 0;
 }
 
-static struct irq_domain_ops pm860x_irq_domain_ops = {
+static const struct irq_domain_ops pm860x_irq_domain_ops = {
.map= pm860x_irq_domain_map,
.xlate  = irq_domain_xlate_onetwocell,
 };
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index c80a2925f8e5..000da72a0ae9 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -574,7 +574,7 @@ static int ab8500_irq_map(struct irq_domain *d, unsigned 
int virq,
return 0;
 }
 
-static struct irq_domain_ops ab8500_irq_ops = {
+static const struct irq_domain_ops ab8500_irq_ops = {
.map= ab8500_irq_map,
.xlate  = irq_domain_xlate_twocell,
 };
diff --git a/drivers/mfd/arizona-irq.c b/drivers/mfd/arizona-irq.c
index d063b94b94b5..2b9965d53e4e 100644
--- a/drivers/mfd/arizona-irq.c
+++ b/drivers/mfd/arizona-irq.c
@@ -186,7 +186,7 @@ static int arizona_irq_map(struct irq_domain *h, unsigned 
int virq,
return 0;
 }
 
-static struct irq_domain_ops arizona_domain_ops = {
+static const struct irq_domain_ops arizona_domain_ops = {
.map= arizona_irq_map,
.xlate  = irq_domain_xlate_twocell,
 };
diff --git a/drivers/mfd/da9052-irq.c b/drivers/mfd/da9052-irq.c
index e65ca194fa98..f4cb4613140b 100644
--- a/drivers/mfd/da9052-irq.c
+++ b/drivers/mfd/da9052-irq.c
@@ -35,7 +35,7 @@
 #define DA9052_IRQ_MASK_POS_7  0x40
 #define DA9052_IRQ_MASK_POS_8  0x80
 
-static struct regmap_irq da9052_irqs[] = {
+static const struct regmap_irq da9052_irqs[] = {
[DA9052_IRQ_DCIN] = {
.reg_offset = 0,
.mask = DA9052_IRQ_MASK_POS_1,
@@ -166,7 +166,7 @@ static struct regmap_irq da9052_irqs[] = {
},
 };
 
-static struct regmap_irq_chip da9052_regmap_irq_chip = {
+static const struct regmap_irq_chip da9052_regmap_irq_chip = {
.name = da9052_irq,
.status_base = DA9052_EVENT_A_REG,
.mask_base = DA9052_IRQ_MASK_A_REG,
diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c
index b4d920c1ead1..177e65a12c12 100644
--- a/drivers/mfd/da9055-core.c
+++ b/drivers/mfd/da9055-core.c
@@ -222,7 +222,7 @@ static bool da9055_register_volatile(struct device *dev, 
unsigned int reg)
}
 }
 
-static struct regmap_irq da9055_irqs[] = {
+static const struct regmap_irq da9055_irqs[] = {
[DA9055_IRQ_NONKEY] = {
.reg_offset = 0,
.mask = DA9055_IRQ_NONKEY_MASK,
@@ -245,7 +245,7 @@ static struct regmap_irq da9055_irqs[] = {
},
 };
 
-struct regmap_config da9055_regmap_config = {
+const struct regmap_config da9055_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
 
@@ -367,7 +367,7 @@ static const struct mfd_cell da9055_devs[] = {
},
 };
 
-static struct regmap_irq_chip da9055_regmap_irq_chip = {
+static const struct regmap_irq_chip da9055_regmap_irq_chip = {
.name = da9055_irq,
.status_base = DA9055_REG_EVENT_A,
.mask_base = DA9055_REG_IRQ_MASK_A,
diff --git a/drivers/mfd/da9063-irq.c b/drivers/mfd/da9063-irq.c
index 822922602ce9..eaf1ec9208b2 100644
--- a/drivers/mfd/da9063-irq.c
+++ b/drivers/mfd/da9063-irq.c
@@ -34,7 +34,7 @@ struct da9063_irq_data {
u8 mask;
 };
 
-static struct regmap_irq da9063_irqs[] = {
+static const struct regmap_irq da9063_irqs[] = {
/* DA9063 event A register */
[DA9063_IRQ_ONKEY] = {
.reg_offset = DA9063_REG_EVENT_A_OFFSET,
@@ -153,7 +153,7 @@ static struct 

Re: [PATCH 0/5] PM / clock_ops: provide default runtime ops and cleanup users

2015-04-27 Thread Simon Horman
On Fri, Apr 24, 2015 at 04:51:03PM +0200, Geert Uytterhoeven wrote:
 On Fri, Apr 24, 2015 at 4:41 PM, Rafael J. Wysocki r...@rjwysocki.net wrote:
  On Thursday, April 23, 2015 02:03:08 PM Rajendra Nayak wrote:
  Most users of PM clocks do the exact same thing in runtime callbacks.
  Provide default callbacks and cleanup the existing users (keystone/davinci
  /omap1/sh)
 
  Rajendra Nayak (5):
PM / clock_ops: Provide default runtime ops to users
arm: keystone: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS
arm: omap1: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS
arm: davinci: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS
drivers: sh: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS
 
   arch/arm/mach-davinci/pm_domain.c  | 32 +-
   arch/arm/mach-keystone/pm_domain.c | 33 +-
   arch/arm/mach-omap1/pm_bus.c   | 37 ++
   drivers/base/power/clock_ops.c | 38 ++
   drivers/sh/pm_runtime.c| 47 
  ++
   include/linux/pm_clock.h   | 10 
   6 files changed, 54 insertions(+), 143 deletions(-)
 
  It is not particularly clear to me who is supposed to apply this series, but
  I can do that if people don't have problems with that.
 
 All later patches depend on the first patch.
 
 For shmobile, Simon has queued up changes for drivers/sh/pm_runtime.c,
 but I think they don't conflict with this series.

Yes, that is the case. I have some patches (from Geert) queued up for v4.1.
I have confirmed that they do not conflict with the shmobile (last) patch
if this series.

details
The patches are in the sh-drivers-for-v4.1 branch of my renesas tree; I
rebased them yesterday; they should hit next today if there is a next
today; I plan to send a pull request to Linus in the not to distant future;
and I envisage they should end up in v4.1-rc2 or rc3.  /details

On Fri, Apr 24, 2015 at 08:34:33AM -0700, santosh shilimkar wrote:
 On 4/24/2015 7:41 AM, Rafael J. Wysocki wrote:
 On Thursday, April 23, 2015 02:03:08 PM Rajendra Nayak wrote:

[snip]

 It is not particularly clear to me who is supposed to apply this series, but
 I can do that if people don't have problems with that.
 
 
 I am fine by that given dependency with first patch.
 Another way is, you pick up the first patch and give us an
 immutable branch.
 
 Either way is fine by me.

Likewise.

Here is an ack for the shmobile (last) patch if you decide to take it
through your tree.

Acked-by: Simon Horman horms+rene...@verge.net.au

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


OMAP baseline test results for v4.1-rc1

2015-04-27 Thread Paul Walmsley

Here are some basic OMAP test results for Linux v4.1-rc1.
Logs and other details at:

http://www.pwsan.com/omap/testlogs/test_v4.1-rc1/20150426200156/


Test summary


Build: uImage:
Pass ( 3/ 3): omap1_defconfig, omap1_defconfig_1510innovator_only,
  omap1_defconfig_5912osk_only

Build: uImage+dtb:
Pass (13/13): omap2plus_defconfig_am33xx_only/am335x-bone,
  omap2plus_defconfig/omap4-panda,
  omap2plus_defconfig/omap4-panda-es,
  omap2plus_defconfig/omap4-var-som,
  omap2plus_defconfig/omap3-evm-37xx,
  omap2plus_defconfig_n800_only_a/omap2420-n800,
  omap2plus_defconfig/omap2430-sdp,
  omap2plus_defconfig/am3517-evm,
  omap2plus_defconfig/omap3-beagle,
  omap2plus_defconfig/omap3-beagle-xm,
  omap2plus_defconfig/omap3-sbc-t3517,
  omap2plus_defconfig/omap5-uevm,
  omap2plus_defconfig/omap5-sbc-t54

Build: zImage:
Pass (17/17): omap2plus_defconfig, omap2plus_defconfig_am33xx_only,
  omap2plus_defconfig_n800_only_a,
  omap2plus_defconfig_n800_multi_omap2xxx,
  omap2plus_defconfig_2430sdp_only,
  omap2plus_defconfig_cpupm, omap2plus_defconfig_no_pm,
  omap2plus_defconfig_omap2_4_only,
  omap2plus_defconfig_omap3_4_only,
  omap2plus_defconfig_omap5_only,
  omap2plus_defconfig_dra7xx_only,
  omap2plus_defconfig_am43xx_only,
  rmk_omap3430_ldp_oldconfig,
  rmk_omap3430_ldp_allnoconfig,
  rmk_omap4430_sdp_oldconfig,
  rmk_omap4430_sdp_allnoconfig, multi_v7_defconfig

Build warnings from toolchain: uImage:
FAIL ( 3/ 3): omap1_defconfig, omap1_defconfig_1510innovator_only,
  omap1_defconfig_5912osk_only

Build warnings from toolchain: uImage+dtb:
(none)

Build warnings from toolchain: zImage:
FAIL (14/17): omap2plus_defconfig, omap2plus_defconfig_am33xx_only,
  omap2plus_defconfig_n800_only_a,
  omap2plus_defconfig_n800_multi_omap2xxx,
  omap2plus_defconfig_2430sdp_only,
  omap2plus_defconfig_cpupm, omap2plus_defconfig_no_pm,
  omap2plus_defconfig_omap2_4_only,
  omap2plus_defconfig_omap3_4_only,
  omap2plus_defconfig_omap5_only,
  omap2plus_defconfig_dra7xx_only,
  omap2plus_defconfig_am43xx_only,
  rmk_omap3430_ldp_oldconfig,
  rmk_omap4430_sdp_oldconfig

Boot to userspace:
FAIL ( 6/17): 4460varsomom, 2430sdp, 3530es3beagle, 3530es31beagle,
  cmt3517, 5430es2sbct54
skip ( 2/17): 5912osk, 3517evm
Pass ( 9/17): am335xbonelt, am335xbone, 4430es2panda, 4460pandaes,
  37xxevm, 3730beaglexm, 3730es12beaglexm, 5430es2uevm,
  2420n800

Kernel warnings during boot to userspace:
FAIL ( 1/17): 4430es2panda

PM: chip retention via suspend:
FAIL ( 8/12): am335xbonelt, 4430es2panda, 4460varsomom,
  3530es3beagle, 3530es31beagle, 2430sdp, 5430es2uevm,
  5430es2sbct54
Pass ( 4/12): 4460pandaes, 37xxevm, 3730beaglexm, 3730es12beaglexm

PM: chip retention via dynamic idle:
FAIL ( 9/12): am335xbonelt, 4430es2panda, 4460pandaes,
  4460varsomom, 3530es3beagle, 3530es31beagle, 2430sdp,
  5430es2uevm, 5430es2sbct54
Pass ( 3/12): 37xxevm, 3730beaglexm, 3730es12beaglexm

PM: chip off (except CORE, due to errata) via suspend:
Pass ( 1/ 1): 3730beaglexm

PM: chip off (except CORE, due to errata) via dynamic idle:
Pass ( 1/ 1): 3730beaglexm

PM: chip off via suspend:
FAIL ( 2/ 4): 3530es3beagle, 3530es31beagle
Pass ( 2/ 4): 37xxevm, 3730es12beaglexm

PM: chip off via dynamic idle:
FAIL ( 2/ 4): 3530es3beagle, 3530es31beagle
Pass ( 2/ 4): 37xxevm, 3730es12beaglexm

Kernel warnings during PM test:
FAIL ( 1/17): 4430es2panda

Obsolete Kconfig symbols:
FAIL ( 1/20): multi_v7_defconfig


vmlinux object size
(delta in bytes from test_v4.0 (39a8804455fb23f09157341d3ba7db6d7ae6ee76)):
   text data  bsstotal  kernel
 +39378 +632 +760   +40770  omap1_defconfig
 +41722 +616 +760   +43098  omap1_defconfig_1510innovator_only
 +40430 +592 +728   +41750  omap1_defconfig_5912osk_only
+329506   +29440+1472  +360418  multi_v7_defconfig
+230849  +164752+1664  +397265  omap2plus_defconfig
+203731  +159872+1520  +365123  omap2plus_defconfig_2430sdp_only
+234533  +172200+1664  +408397  omap2plus_defconfig_am33xx_only
+235213  +172832+1664  +409709  omap2plus_defconfig_am43xx_only
+235137  +164808+1728  +401673  omap2plus_defconfig_cpupm
+235341  +173200+1728  +410269  

Re: n900 in 4.1-rc0

2015-04-27 Thread Tyler Baker
Hi Pavel,

On 26 April 2015 at 03:20, Pavel Machek pa...@ucw.cz wrote:
 Hi!

  Just tried booting 4.1-rc0 on n900 (commit
  34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085) and it is broken.
 
  Any ideas?

 Looks like DT and legacy booting are working fine in our
 labs. [0][1]

 Interesting web pages, thanks.

No problem.


 I noticed that legacy booting indicates broken today, but... Is there
 list of your targets somewhere?

It looks to have failed it's boot test on the stable v3.14 based LSK
today, however it is booting fine still on the upstream development
trees. You can also use a query[0] to refine your view if you would
like. The up to date list of targets can be found here[1] and if
interested in receiving email reports you can subscribe here[2].


 Best regards,
 Pavel



 [0] http://kernelci.org/boot/omap3-n900/
 [1] http://kernelci.org/boot/omap3-n900,legacy/

 --
 (english) http://www.livejournal.com/~pavelmachek
 (cesky, pictures) 
 http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Cheers,

Tyler

[0] http://kernelci.org/boot/?n900fail
[1] https://wiki.linaro.org/ProductTechnology/kernelci.org
[2] https://lists.linaro.org/mailman/listinfo/kernel-build-reports
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] bus: omap_l3_noc: add missed callbacks for suspend-to-disk

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org

Add missed callbacks needed for proper supporting of suspend-to-disk
by using recently introduced macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS.

Cc: Tony Lindgren t...@atomide.com
Cc: Nishanth Menon n...@ti.com
Cc: Kevin Hilman khil...@linaro.org
Cc: Santosh Shilimkar ssant...@kernel.org
Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org
---
 drivers/bus/omap_l3_noc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 11f7982..6ae3884 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -300,7 +300,7 @@ static int omap_l3_probe(struct platform_device *pdev)
return ret;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 
 /**
  * l3_resume_noirq() - resume function for l3_noc
@@ -346,7 +346,7 @@ static int l3_resume_noirq(struct device *dev)
 }
 
 static const struct dev_pm_ops l3_dev_pm_ops = {
-   .resume_noirq   = l3_resume_noirq,
+   SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, l3_resume_noirq)
 };
 
 #define L3_DEV_PM_OPS (l3_dev_pm_ops)
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] ARM: omap-device: use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org

Use recently introduced macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS to
set up PM callbacks. This also fixes missed assignment of
.poweroff_noirq() callback.

Cc: Tony Lindgren t...@atomide.com
Cc: Nishanth Menon n...@ti.com
Cc: Kevin Hilman khil...@linaro.org
Cc: Santosh Shilimkar ssant...@kernel.org
Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org
---
 arch/arm/mach-omap2/omap_device.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_device.c 
b/arch/arm/mach-omap2/omap_device.c
index 166b18f..83a0f5a 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -688,11 +688,8 @@ struct dev_pm_domain omap_device_pm_domain = {
SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,
   NULL)
USE_PLATFORM_PM_SLEEP_OPS
-   .suspend_noirq = _od_suspend_noirq,
-   .resume_noirq = _od_resume_noirq,
-   .freeze_noirq = _od_suspend_noirq,
-   .thaw_noirq = _od_resume_noirq,
-   .restore_noirq = _od_resume_noirq,
+   SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(_od_suspend_noirq,
+ _od_resume_noirq)
}
 };
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] PM / Sleep: Add macro to define common noirq system PM callbacks

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org

The same approach is used as for the existing SET_SYSTEM_SLEEP_PM_OPS,
but for noirq callbacks.

New SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, defined for CONFIG_PM_SLEEP, will
point -suspend_noirq, -freeze_noirq and -poweroff_noirq to the same
function. Vice versa happens for -resume_noirq, -thaw_noirq and
-restore_noirq.

Cc: Tony Lindgren t...@atomide.com
Cc: Nishanth Menon n...@ti.com
Cc: Kevin Hilman khil...@linaro.org
Cc: Santosh Shilimkar ssant...@kernel.org
Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org
---
 include/linux/pm.h | 12 
 1 file changed, 12 insertions(+)

diff --git a/include/linux/pm.h b/include/linux/pm.h
index 2d29c64..4890743 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -342,6 +342,18 @@ struct dev_pm_ops {
 #define SET_LATE_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
 #endif
 
+#ifdef CONFIG_PM_SLEEP
+#define SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
+   .suspend_noirq = suspend_fn, \
+   .resume_noirq = resume_fn, \
+   .freeze_noirq = suspend_fn, \
+   .thaw_noirq = resume_fn, \
+   .poweroff_noirq = suspend_fn, \
+   .restore_noirq = resume_fn,
+#else
+#define SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
+#endif
+
 #ifdef CONFIG_PM
 #define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
.runtime_suspend = suspend_fn, \
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] Introduce SET_NOIRQ_SYSTEM_SLEEP_PM_OPS and use it

2015-04-27 Thread grygorii.strashko
From: Grygorii Strashko grygorii.stras...@linaro.org

While working on suspend-to-disk functionality on TI dra7-evm (DRA7xx SoC)
i've found that the most common problem I have to dial with is absence
of corresponding PM callbacks in drivers and, in particular, noirq callbacks.
So, I've fixed one driver first
commit 6248015d6867 ARM: omap-device: add missed callback for suspend-to-disk
but then found another one which need to be fixed too (omap_l3_noc.c).
At this moment I decided to make my life easier and added new macro
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS using the same approach as for the existing
SET_SYSTEM_SLEEP_PM_OPS macro.

SET_NOIRQ_SYSTEM_SLEEP_PM_OPS: defined for CONFIG_PM_SLEEP and
assigns -suspend_noirq, -freeze_noirq and -poweroff_noirq to the same
function. Vice versa happens for -resume_noirq, -thaw_noirq and
-restore_noirq.

Further two patches reuse this newly introduced macro.

SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, defined for CONFIG_PM_SLEEP, will
point -suspend_noirq, -freeze_noirq and -poweroff_noirq to the same
function. Vice versa happens for -resume_noirq, -thaw_noirq and
-restore_noirq.

Cc: Tony Lindgren t...@atomide.com
Cc: Nishanth Menon n...@ti.com
Cc: Kevin Hilman khil...@linaro.org
Cc: Santosh Shilimkar ssant...@kernel.org

Grygorii Strashko (3):
  PM / Sleep: Add macro to define common noirq system PM callbacks
  bus: omap_l3_noc: add missed callbacks for suspend-to-disk
  ARM: omap-device: use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS

 arch/arm/mach-omap2/omap_device.c |  7 ++-
 drivers/bus/omap_l3_noc.c |  4 ++--
 include/linux/pm.h| 12 
 3 files changed, 16 insertions(+), 7 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] bus: omap_l3_noc: add missed callbacks for suspend-to-disk

2015-04-27 Thread Nishanth Menon
On Mon, Apr 27, 2015 at 1:24 PM,  grygorii.stras...@linaro.org wrote:
 From: Grygorii Strashko grygorii.stras...@linaro.org

 Add missed callbacks needed for proper supporting of suspend-to-disk
 by using recently introduced macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS.

 Cc: Tony Lindgren t...@atomide.com
 Cc: Nishanth Menon n...@ti.com
 Cc: Kevin Hilman khil...@linaro.org
 Cc: Santosh Shilimkar ssant...@kernel.org
 Signed-off-by: Grygorii Strashko grygorii.stras...@linaro.org
 ---
  drivers/bus/omap_l3_noc.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

 diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
 index 11f7982..6ae3884 100644
 --- a/drivers/bus/omap_l3_noc.c
 +++ b/drivers/bus/omap_l3_noc.c
 @@ -300,7 +300,7 @@ static int omap_l3_probe(struct platform_device *pdev)
 return ret;
  }

 -#ifdef CONFIG_PM
 +#ifdef CONFIG_PM_SLEEP

  /**
   * l3_resume_noirq() - resume function for l3_noc
 @@ -346,7 +346,7 @@ static int l3_resume_noirq(struct device *dev)
  }

  static const struct dev_pm_ops l3_dev_pm_ops = {
 -   .resume_noirq   = l3_resume_noirq,
 +   SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, l3_resume_noirq)
  };

  #define L3_DEV_PM_OPS (l3_dev_pm_ops)
 --
 1.9.1

 --
 To unsubscribe from this list: send the line unsubscribe linux-pm in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

Acked-by: Nishanth Menon n...@ti.com

-- 
---
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html