linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/5] amba/dma: pl330: add Power Management support
@ 2014-10-20  9:04 Krzysztof Kozlowski
  2014-10-20  9:04 ` [PATCH v8 1/5] PM / Runtime: Add getter for querying the IRQ safe option Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 40+ messages in thread
From: Krzysztof Kozlowski @ 2014-10-20  9:04 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek, Jonathan Corbet,
	Russell King, Dan Williams, Vinod Koul, Ulf Hansson, Alan Stern,
	Krzysztof Kozlowski, linux-pm, linux-doc, linux-kernel,
	dmaengine, Lars-Peter Clausen, Michal Simek
  Cc: Kyungmin Park, Marek Szyprowski, Bartlomiej Zolnierkiewicz

Hi,


Changes since v7:
=================
1. Add reviewed-by Ulf Hansson (patches 3, 4 and 5).
2. Patch 2/5: Fix missing return in amba_pclk_prepare() (suggested by
   Ulf Hansson).
3. Rebased on next-20141020.

Changes since v6:
=================
1. Add patch 5 removing the amba_pclk_*able macros.
2. Patch 2/5: Remove IS_ERR, use static inline functions instead
   of macros.
3. Patch 4/5: Force runtime suspend/resume in system sleep
   callbacks. Put with autosuspend at end of probe instead of no_idle.
   Suggested by Ulf Hansson.

Changes since v5:
=================
1. Patch 1/4: Add Ulf Hansson's reviewed-by.
2. Patch 4/4: Use PM runtime autosuspend (suggested by Ulf Hansson).
3. Rebase on next-20140922. 

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 querying 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().


Description:
============
This patchset adds runtime and system 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/5 by handling clocks in different
way if device driver set interrupt safe runtime PM.

Any comments are welcome.


Tested on board with pl330 DMA driver:
 - Trats2 (Exynos4212)


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/5.
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.


Best regards,
Krzysztof Kozlowski


Krzysztof Kozlowski (5):
  PM / Runtime: Add getter for querying the IRQ safe option
  amba: Add helpers 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
  amba: Remove unused amba_pclk_enable/disable macros

 Documentation/power/runtime_pm.txt |  4 ++
 drivers/amba/bus.c                 | 29 ++++++++++--
 drivers/dma/pl330.c                | 94 ++++++++++++++++++++++++++++++++++++--
 include/linux/amba/bus.h           | 13 ++++--
 include/linux/pm_runtime.h         |  6 +++
 5 files changed, 134 insertions(+), 12 deletions(-)

-- 
1.9.1


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

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

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20  9:04 [PATCH v8 0/5] amba/dma: pl330: add Power Management support Krzysztof Kozlowski
2014-10-20  9:04 ` [PATCH v8 1/5] PM / Runtime: Add getter for querying the IRQ safe option Krzysztof Kozlowski
2014-10-31  9:14   ` Krzysztof Kozlowski
2014-10-31  9:29     ` Ulf Hansson
2014-10-31  9:33       ` Russell King - ARM Linux
2014-10-31  9:54         ` Ulf Hansson
2014-10-31  9:33       ` Krzysztof Kozlowski
2014-10-31 14:22     ` Pavel Machek
2014-10-31 14:40       ` Krzysztof Kozlowski
2014-11-01  0:29         ` Laurent Pinchart
2014-11-03  9:36           ` Krzysztof Kozlowski
2014-11-03 16:27           ` Vinod Koul
2014-11-03 16:59             ` Laurent Pinchart
2014-11-05 14:09               ` Vinod Koul
2014-11-03 17:04             ` Russell King - ARM Linux
2014-11-05 14:04               ` Vinod Koul
2014-11-05 14:54               ` Laurent Pinchart
2014-10-31 23:11   ` Rafael J. Wysocki
2014-10-31 23:04     ` Russell King - ARM Linux
2014-11-01  0:42       ` Rafael J. Wysocki
2014-11-03  8:51         ` Krzysztof Kozlowski
2014-10-20  9:04 ` [PATCH v8 2/5] amba: Add helpers for (un)preparing AMBA clock Krzysztof Kozlowski
2014-10-21  8:05   ` Ulf Hansson
2014-10-20  9:04 ` [PATCH v8 3/5] amba: Don't unprepare the clocks if device driver wants IRQ safe runtime PM Krzysztof Kozlowski
2014-11-01  0:45   ` Rafael J. Wysocki
2014-11-01  0:55     ` Russell King - ARM Linux
2014-11-01  1:01       ` Russell King - ARM Linux
2014-11-03  8:36         ` Krzysztof Kozlowski
2014-11-03 10:04           ` Russell King - ARM Linux
2014-11-03 15:41             ` Alan Stern
2014-11-03 15:44               ` Russell King - ARM Linux
2014-11-04  7:59                 ` Krzysztof Kozlowski
2014-11-04  1:57               ` Rafael J. Wysocki
2014-11-04  8:01                 ` Krzysztof Kozlowski
2014-11-04  9:11                 ` Ulf Hansson
2014-11-04 13:59                   ` Rafael J. Wysocki
2014-11-04 16:19                     ` Ulf Hansson
2014-11-03 17:17         ` Kevin Hilman
2014-10-20  9:04 ` [PATCH v8 4/5] dma: pl330: add Power Management support Krzysztof Kozlowski
2014-10-20  9:04 ` [PATCH v8 5/5] amba: Remove unused amba_pclk_enable/disable macros Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).