All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] amba/dma: pl330: add Power Management support
@ 2014-09-16 12:59 Krzysztof Kozlowski
  2014-09-16 12:59 ` [PATCH v5 1/4] PM / Runtime: Add getter for quering the IRQ safe option Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2014-09-16 12:59 UTC (permalink / raw)
  To: Russell King, Dan Williams, Vinod Koul, linux-kernel, dmaengine,
	Ulf Hansson, Grant Likely, Lars-Peter Clausen, Michal Simek,
	Rafael J. Wysocki, Len Brown, Pavel Machek, Randy Dunlap,
	Alan Stern, linux-doc, linux-pm
  Cc: Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz,
	Krzysztof Kozlowski

Hi,


This is fifth version of patches adding runtime PM to the pl330
driver.

The runtime PM of pl330 driver requires interrupt safe suspend/resume
callbacks which is in conflict with current amba bus driver.
The latter also unprepares and prepares the AMBA bus clock which
is not safe for atomic context.

The patchset solves this in patch 3/4 by handling clocks in different
way if device driver set interrupt safe runtime PM.

Any comments are welcome.


Tested on boards with pl330 DMA driver:
 - Trats2 (Exynos4212)
 - Samsung Gear2-like development board (Exynos3250)


TODO/ideas:
===========
Consider renaming existing pm_runtime_irq_safe() function to keep
up with naming convention after adding pm_runtime_is_irq_safe() in
patch 1/4.
This naming:
 - pm_runtime_irq_safe() as setter,
 - pm_runtime_is_irq_safe() as getter,
is contradictory to naming of other PM runtime functions, e.g.:
 - pm_runtime_set_active() as setter,
 - pm_runtime_active() as getter.
I didn't change the naming of pm_runtime_irq_safe() because I wanted
to minimize the impact of the patches.


Changes since v4:
=================
1. Patch 3/4: Explicitly initialize amba_device.irq_safe field after
   probing driver (suggested by Russell King).

Changes since v3:
=================
1. Patch 1/4: Document new API in Documentation/power/runtime_pm.txt
   (pointed by Alan Stern).

Changes since v2:
=================
1. Add patch 1 (PM / Runtime: Add getter for quering the IRQ safe option)
2. Add patch 2 (amba: Add helper macros for (un)preparing AMBA clock)
3. Patch 3/4: Rewrite the idea. If IRQ safe runtime PM is set then
   do not unprepare/prepare the clocks. Suggested by Russell King.
4. Patch 4/4: During system sleep unprepare the clock.

Changes since v1:
=================
1. Add patch 1 (amba: Allow AMBA drivers to use their own runtime PM).
2. Patch 2/2: Apply Michal Simek's suggestions.
3. Patch 2/2: Fix atomic context safeness in pl330_issue_pending().


Best regards,
Krzysztof Kozlowski


Krzysztof Kozlowski (4):
  PM / Runtime: Add getter for quering the IRQ safe option
  amba: Add helper macros for (un)preparing AMBA clock
  amba: Don't unprepare the clocks if device driver wants IRQ safe
    runtime PM
  dma: pl330: add Power Management support

 Documentation/power/runtime_pm.txt |  4 ++
 drivers/amba/bus.c                 | 29 ++++++++++++--
 drivers/dma/pl330.c                | 77 ++++++++++++++++++++++++++++++++++++--
 include/linux/amba/bus.h           |  7 ++++
 include/linux/pm_runtime.h         |  6 +++
 5 files changed, 115 insertions(+), 8 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-09-17 17:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16 12:59 [PATCH v5 0/4] amba/dma: pl330: add Power Management support Krzysztof Kozlowski
2014-09-16 12:59 ` [PATCH v5 1/4] PM / Runtime: Add getter for quering the IRQ safe option Krzysztof Kozlowski
2014-09-16 18:27   ` Ulf Hansson
2014-09-16 12:59 ` [PATCH v5 2/4] amba: Add helper macros for (un)preparing AMBA clock Krzysztof Kozlowski
2014-09-16 12:59 ` [PATCH v5 3/4] amba: Don't unprepare the clocks if device driver wants IRQ safe runtime PM Krzysztof Kozlowski
2014-09-16 18:25   ` Ulf Hansson
2014-09-16 19:52     ` Russell King - ARM Linux
2014-09-17 17:59       ` Ulf Hansson
2014-09-16 12:59 ` [PATCH v5 4/4] dma: pl330: add Power Management support Krzysztof Kozlowski
2014-09-16 16:18 ` [PATCH v5 0/4] amba/dma: " Russell King - ARM Linux
2014-09-16 16:28   ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.