* [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS
@ 2011-10-19 14:28 jean.pihet
2011-10-19 14:28 ` [PATCH 1/2] OMAP: convert I2C driver to PM QoS for latency constraints jean.pihet
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: jean.pihet @ 2011-10-19 14:28 UTC (permalink / raw)
To: Kevin Hilman, Linux PM mailing list, linux-omap,
Rafael J. Wysocki, Paul Walmsley
Cc: Jean Pihet
From: Jean Pihet <j-pihet@ti.com>
. Convert the OMAP I2C driver to the PM QoS API for MPU latency constraints
. Remove the latency related functions from OMAP PM in favor of
the generic per-device PM QoS API
Apply on top of the OMAP PM QoS patch set [1].
Based on the pm-qos branch of the linux-pm git tree (3.1.0-rc3), cf. [2].
Tested on OMAP3 Beagleboard (ES2.x) with constraints on MPU, CORE, PER in
RETention and OFF modes.
[1] http://thread.gmane.org/gmane.linux.ports.arm.omap/65971
[2] git://github.com/rjwysocki/linux-pm.git
Jean Pihet (2):
OMAP: convert I2C driver to PM QoS for latency constraints
OMAP: PM: remove the latency related functions from the API
Documentation/arm/OMAP/omap_pm | 55 +++-------------
arch/arm/plat-omap/i2c.c | 20 ------
arch/arm/plat-omap/include/plat/omap-pm.h | 99 -----------------------------
arch/arm/plat-omap/omap-pm-noop.c | 88 -------------------------
drivers/i2c/busses/i2c-omap.c | 30 +++++-----
include/linux/i2c-omap.h | 1 -
6 files changed, 24 insertions(+), 269 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] OMAP: convert I2C driver to PM QoS for latency constraints
2011-10-19 14:28 [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS jean.pihet
@ 2011-10-19 14:28 ` jean.pihet
2011-12-15 0:17 ` Kevin Hilman
2011-10-19 14:28 ` [PATCH 2/2] OMAP: PM: remove the latency related functions from the API jean.pihet
2011-12-12 16:27 ` [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS Jean Pihet
2 siblings, 1 reply; 7+ messages in thread
From: jean.pihet @ 2011-10-19 14:28 UTC (permalink / raw)
To: Kevin Hilman, Linux PM mailing list, linux-omap,
Rafael J. Wysocki, Paul Walmsley
Cc: Jean Pihet
From: Jean Pihet <j-pihet@ti.com>
Convert the driver from the outdated omap_pm_set_max_mpu_wakeup_lat
API to the new PM QoS API.
Since the constraint is on the MPU subsystem, use the PM_QOS_CPU_DMA_LATENCY
class of PM QoS. The resulting MPU constraints are used by cpuidle to
decide the next power state of the MPU subsystem.
The I2C device latency timing is derived from the FIFO size and the
clock speed and so is applicable to all OMAP SoCs.
Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
arch/arm/plat-omap/i2c.c | 20 --------------------
drivers/i2c/busses/i2c-omap.c | 30 +++++++++++++++---------------
include/linux/i2c-omap.h | 1 -
3 files changed, 15 insertions(+), 36 deletions(-)
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index 3341ca4..e1e2502 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -34,7 +34,6 @@
#include <mach/irqs.h>
#include <plat/mux.h>
#include <plat/i2c.h>
-#include <plat/omap-pm.h>
#include <plat/omap_device.h>
#define OMAP_I2C_SIZE 0x3f
@@ -113,16 +112,6 @@ static inline int omap1_i2c_add_bus(int bus_id)
#ifdef CONFIG_ARCH_OMAP2PLUS
-/*
- * XXX This function is a temporary compatibility wrapper - only
- * needed until the I2C driver can be converted to call
- * omap_pm_set_max_dev_wakeup_lat() and handle a return code.
- */
-static void omap_pm_set_max_mpu_wakeup_lat_compat(struct device *dev, long t)
-{
- omap_pm_set_max_mpu_wakeup_lat(dev, t);
-}
-
static struct omap_device_pm_latency omap_i2c_latency[] = {
[0] = {
.deactivate_func = omap_device_idle_hwmods,
@@ -151,15 +140,6 @@ static inline int omap2_i2c_add_bus(int bus_id)
}
pdata = &i2c_pdata[bus_id - 1];
- /*
- * When waiting for completion of a i2c transfer, we need to
- * set a wake up latency constraint for the MPU. This is to
- * ensure quick enough wakeup from idle, when transfer
- * completes.
- * Only omap3 has support for constraints
- */
- if (cpu_is_omap34xx())
- pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
od = omap_device_build(name, bus_id, oh, pdata,
sizeof(struct omap_i2c_bus_platform_data),
omap_i2c_latency, ARRAY_SIZE(omap_i2c_latency), 0);
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 1a766cf..95e5205 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -40,6 +40,7 @@
#include <linux/slab.h>
#include <linux/i2c-omap.h>
#include <linux/pm_runtime.h>
+#include <linux/pm_qos.h>
/* I2C controller revisions */
#define OMAP_I2C_REV_2 0x20
@@ -179,8 +180,7 @@ struct omap_i2c_dev {
struct completion cmd_complete;
struct resource *ioarea;
u32 latency; /* maximum mpu wkup latency */
- void (*set_mpu_wkup_lat)(struct device *dev,
- long latency);
+ struct pm_qos_request pm_qos_request;
u32 speed; /* Speed of bus in Khz */
u16 cmd_err;
u8 *buf;
@@ -648,8 +648,14 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
if (r < 0)
goto out;
- if (dev->set_mpu_wkup_lat != NULL)
- dev->set_mpu_wkup_lat(dev->dev, dev->latency);
+ /*
+ * When waiting for completion of a i2c transfer, we need to
+ * set a wake up latency constraint for the MPU. This is to
+ * ensure quick enough wakeup from idle, when transfer
+ * completes.
+ */
+ pm_qos_add_request(&dev->pm_qos_request, PM_QOS_CPU_DMA_LATENCY,
+ dev->latency);
for (i = 0; i < num; i++) {
r = omap_i2c_xfer_msg(adap, &msgs[i], (i == (num - 1)));
@@ -657,8 +663,7 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
break;
}
- if (dev->set_mpu_wkup_lat != NULL)
- dev->set_mpu_wkup_lat(dev->dev, -1);
+ pm_qos_remove_request(&dev->pm_qos_request);
if (r == 0)
r = num;
@@ -1007,13 +1012,10 @@ omap_i2c_probe(struct platform_device *pdev)
goto err_release_region;
}
- if (pdata != NULL) {
+ if (pdata != NULL)
speed = pdata->clkrate;
- dev->set_mpu_wkup_lat = pdata->set_mpu_wkup_lat;
- } else {
+ else
speed = 100; /* Default speed */
- dev->set_mpu_wkup_lat = NULL;
- }
dev->speed = speed;
dev->idle = 1;
@@ -1066,10 +1068,8 @@ omap_i2c_probe(struct platform_device *pdev)
dev->fifo_size = (dev->fifo_size / 2);
dev->b_hw = 1; /* Enable hardware fixes */
}
- /* calculate wakeup latency constraint for MPU */
- if (dev->set_mpu_wkup_lat != NULL)
- dev->latency = (1000000 * dev->fifo_size) /
- (1000 * speed / 8);
+ /* calculate wakeup latency constraint */
+ dev->latency = (1000000 * dev->fifo_size) / (1000 * speed / 8);
}
/* reset ASAP, clearing any IRQs */
diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h
index 0aa0cbd..d06a8aa 100644
--- a/include/linux/i2c-omap.h
+++ b/include/linux/i2c-omap.h
@@ -32,7 +32,6 @@
struct omap_i2c_bus_platform_data {
u32 clkrate;
- void (*set_mpu_wkup_lat)(struct device *dev, long set);
int (*device_enable) (struct platform_device *pdev);
int (*device_shutdown) (struct platform_device *pdev);
int (*device_idle) (struct platform_device *pdev);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] OMAP: PM: remove the latency related functions from the API
2011-10-19 14:28 [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS jean.pihet
2011-10-19 14:28 ` [PATCH 1/2] OMAP: convert I2C driver to PM QoS for latency constraints jean.pihet
@ 2011-10-19 14:28 ` jean.pihet
2011-12-15 0:19 ` Kevin Hilman
2011-12-12 16:27 ` [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS Jean Pihet
2 siblings, 1 reply; 7+ messages in thread
From: jean.pihet @ 2011-10-19 14:28 UTC (permalink / raw)
To: Kevin Hilman, Linux PM mailing list, linux-omap,
Rafael J. Wysocki, Paul Walmsley
Cc: Jean Pihet
From: Jean Pihet <j-pihet@ti.com>
Remove the following functions from the API:
omap_pm_set_max_mpu_wakeup_lat
omap_pm_set_max_dev_wakeup_lat
omap_pm_set_max_sdma_lat
The generic per-device PM QoS functions shall be used instead, cf.
include/linux/pm_qos.h.
Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
Documentation/arm/OMAP/omap_pm | 55 +++-------------
arch/arm/plat-omap/include/plat/omap-pm.h | 99 -----------------------------
arch/arm/plat-omap/omap-pm-noop.c | 88 -------------------------
3 files changed, 9 insertions(+), 233 deletions(-)
diff --git a/Documentation/arm/OMAP/omap_pm b/Documentation/arm/OMAP/omap_pm
index 9012bb0..26f9669 100644
--- a/Documentation/arm/OMAP/omap_pm
+++ b/Documentation/arm/OMAP/omap_pm
@@ -29,21 +29,12 @@ Drivers need to express PM parameters which:
This document proposes the OMAP PM interface, including the following
-five power management functions for driver code:
+power management functions for driver code:
-1. Set the maximum MPU wakeup latency:
- (*pdata->set_max_mpu_wakeup_lat)(struct device *dev, unsigned long t)
-
-2. Set the maximum device wakeup latency:
- (*pdata->set_max_dev_wakeup_lat)(struct device *dev, unsigned long t)
-
-3. Set the maximum system DMA transfer start latency (CORE pwrdm):
- (*pdata->set_max_sdma_lat)(struct device *dev, long t)
-
-4. Set the minimum bus throughput needed by a device:
+1. Set the minimum bus throughput needed by a device:
(*pdata->set_min_bus_tput)(struct device *dev, u8 agent_id, unsigned long r)
-5. Return the number of times the device has lost context
+2. Return the number of times the device has lost context
(*pdata->get_dev_context_loss_count)(struct device *dev)
@@ -55,10 +46,12 @@ The OMAP PM layer is intended to be temporary
---------------------------------------------
The intention is that eventually the Linux PM QoS layer should support
-the range of power management features present in OMAP3. As this
+the range of power management features present in OMAP3. As this
happens, existing drivers using the OMAP PM interface can be modified
to use the Linux PM QoS code; and the OMAP PM interface can disappear.
+The set_min_bus_tput function shall be converted to a throughput PM QoS
+framework.
Driver usage of the OMAP PM functions
-------------------------------------
@@ -66,39 +59,9 @@ Driver usage of the OMAP PM functions
As the 'pdata' in the above examples indicates, these functions are
exposed to drivers through function pointers in driver .platform_data
structures. The function pointers are initialized by the board-*.c
-files to point to the corresponding OMAP PM functions:
-.set_max_dev_wakeup_lat will point to
-omap_pm_set_max_dev_wakeup_lat(), etc. Other architectures which do
-not support these functions should leave these function pointers set
-to NULL. Drivers should use the following idiom:
-
- if (pdata->set_max_dev_wakeup_lat)
- (*pdata->set_max_dev_wakeup_lat)(dev, t);
-
-The most common usage of these functions will probably be to specify
-the maximum time from when an interrupt occurs, to when the device
-becomes accessible. To accomplish this, driver writers should use the
-set_max_mpu_wakeup_lat() function to to constrain the MPU wakeup
-latency, and the set_max_dev_wakeup_lat() function to constrain the
-device wakeup latency (from clk_enable() to accessibility). For
-example,
-
- /* Limit MPU wakeup latency */
- if (pdata->set_max_mpu_wakeup_lat)
- (*pdata->set_max_mpu_wakeup_lat)(dev, tc);
-
- /* Limit device powerdomain wakeup latency */
- if (pdata->set_max_dev_wakeup_lat)
- (*pdata->set_max_dev_wakeup_lat)(dev, td);
-
- /* total wakeup latency in this example: (tc + td) */
-
-The PM parameters can be overwritten by calling the function again
-with the new value. The settings can be removed by calling the
-function with a t argument of -1 (except in the case of
-set_max_bus_tput(), which should be called with an r argument of 0).
-
-The fifth function above, omap_pm_get_dev_context_loss_count(),
+files to point to the corresponding OMAP PM functions.
+
+The omap_pm_get_dev_context_loss_count() function
is intended as an optimization to allow drivers to determine whether the
device has lost its internal context. If context has been lost, the
driver must restore its internal context before proceeding.
diff --git a/arch/arm/plat-omap/include/plat/omap-pm.h b/arch/arm/plat-omap/include/plat/omap-pm.h
index 0840df8..c371364 100644
--- a/arch/arm/plat-omap/include/plat/omap-pm.h
+++ b/arch/arm/plat-omap/include/plat/omap-pm.h
@@ -62,44 +62,6 @@ void omap_pm_if_exit(void);
* Device-driver-originated constraints (via board-*.c files, platform_data)
*/
-
-/**
- * omap_pm_set_max_mpu_wakeup_lat - set the maximum MPU wakeup latency
- * @dev: struct device * requesting the constraint
- * @t: maximum MPU wakeup latency in microseconds
- *
- * Request that the maximum interrupt latency for the MPU to be no
- * greater than @t microseconds. "Interrupt latency" in this case is
- * defined as the elapsed time from the occurrence of a hardware or
- * timer interrupt to the time when the device driver's interrupt
- * service routine has been entered by the MPU.
- *
- * It is intended that underlying PM code will use this information to
- * determine what power state to put the MPU powerdomain into, and
- * possibly the CORE powerdomain as well, since interrupt handling
- * code currently runs from SDRAM. Advanced PM or board*.c code may
- * also configure interrupt controller priorities, OCP bus priorities,
- * CPU speed(s), etc.
- *
- * This function will not affect device wakeup latency, e.g., time
- * elapsed from when a device driver enables a hardware device with
- * clk_enable(), to when the device is ready for register access or
- * other use. To control this device wakeup latency, use
- * omap_pm_set_max_dev_wakeup_lat()
- *
- * Multiple calls to omap_pm_set_max_mpu_wakeup_lat() will replace the
- * previous t value. To remove the latency target for the MPU, call
- * with t = -1.
- *
- * XXX This constraint will be deprecated soon in favor of the more
- * general omap_pm_set_max_dev_wakeup_lat()
- *
- * Returns -EINVAL for an invalid argument, -ERANGE if the constraint
- * is not satisfiable, or 0 upon success.
- */
-int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t);
-
-
/**
* omap_pm_set_min_bus_tput - set minimum bus throughput needed by device
* @dev: struct device * requesting the constraint
@@ -131,67 +93,6 @@ int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t);
*/
int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r);
-
-/**
- * omap_pm_set_max_dev_wakeup_lat - set the maximum device enable latency
- * @req_dev: struct device * requesting the constraint, or NULL if none
- * @dev: struct device * to set the constraint one
- * @t: maximum device wakeup latency in microseconds
- *
- * Request that the maximum amount of time necessary for a device @dev
- * to become accessible after its clocks are enabled should be no
- * greater than @t microseconds. Specifically, this represents the
- * time from when a device driver enables device clocks with
- * clk_enable(), to when the register reads and writes on the device
- * will succeed. This function should be called before clk_disable()
- * is called, since the power state transition decision may be made
- * during clk_disable().
- *
- * It is intended that underlying PM code will use this information to
- * determine what power state to put the powerdomain enclosing this
- * device into.
- *
- * Multiple calls to omap_pm_set_max_dev_wakeup_lat() will replace the
- * previous wakeup latency values for this device. To remove the
- * wakeup latency restriction for this device, call with t = -1.
- *
- * Returns -EINVAL for an invalid argument, -ERANGE if the constraint
- * is not satisfiable, or 0 upon success.
- */
-int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
- long t);
-
-
-/**
- * omap_pm_set_max_sdma_lat - set the maximum system DMA transfer start latency
- * @dev: struct device *
- * @t: maximum DMA transfer start latency in microseconds
- *
- * Request that the maximum system DMA transfer start latency for this
- * device 'dev' should be no greater than 't' microseconds. "DMA
- * transfer start latency" here is defined as the elapsed time from
- * when a device (e.g., McBSP) requests that a system DMA transfer
- * start or continue, to the time at which data starts to flow into
- * that device from the system DMA controller.
- *
- * It is intended that underlying PM code will use this information to
- * determine what power state to put the CORE powerdomain into.
- *
- * Since system DMA transfers may not involve the MPU, this function
- * will not affect MPU wakeup latency. Use set_max_cpu_lat() to do
- * so. Similarly, this function will not affect device wakeup latency
- * -- use set_max_dev_wakeup_lat() to affect that.
- *
- * Multiple calls to set_max_sdma_lat() will replace the previous t
- * value for this device. To remove the maximum DMA latency for this
- * device, call with t = -1.
- *
- * Returns -EINVAL for an invalid argument, -ERANGE if the constraint
- * is not satisfiable, or 0 upon success.
- */
-int omap_pm_set_max_sdma_lat(struct device *dev, long t);
-
-
/**
* omap_pm_set_min_clk_rate - set minimum clock rate requested by @dev
* @dev: struct device * requesting the constraint
diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c
index b0471bb2..bf9ad37 100644
--- a/arch/arm/plat-omap/omap-pm-noop.c
+++ b/arch/arm/plat-omap/omap-pm-noop.c
@@ -33,34 +33,6 @@ static u32 dummy_context_loss_counter;
* Device-driver-originated constraints (via board-*.c files)
*/
-int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
-{
- if (!dev || t < -1) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
- return -EINVAL;
- };
-
- if (t == -1)
- pr_debug("OMAP PM: remove max MPU wakeup latency constraint: "
- "dev %s\n", dev_name(dev));
- else
- pr_debug("OMAP PM: add max MPU wakeup latency constraint: "
- "dev %s, t = %ld usec\n", dev_name(dev), t);
-
- /*
- * For current Linux, this needs to map the MPU to a
- * powerdomain, then go through the list of current max lat
- * constraints on the MPU and find the smallest. If
- * the latency constraint has changed, the code should
- * recompute the state to enter for the next powerdomain
- * state.
- *
- * TI CDP code can call constraint_set here.
- */
-
- return 0;
-}
-
int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
{
if (!dev || (agent_id != OCP_INITIATOR_AGENT &&
@@ -88,66 +60,6 @@ int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
return 0;
}
-int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
- long t)
-{
- if (!req_dev || !dev || t < -1) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
- return -EINVAL;
- };
-
- if (t == -1)
- pr_debug("OMAP PM: remove max device latency constraint: "
- "dev %s\n", dev_name(dev));
- else
- pr_debug("OMAP PM: add max device latency constraint: "
- "dev %s, t = %ld usec\n", dev_name(dev), t);
-
- /*
- * For current Linux, this needs to map the device to a
- * powerdomain, then go through the list of current max lat
- * constraints on that powerdomain and find the smallest. If
- * the latency constraint has changed, the code should
- * recompute the state to enter for the next powerdomain
- * state. Conceivably, this code should also determine
- * whether to actually disable the device clocks or not,
- * depending on how long it takes to re-enable the clocks.
- *
- * TI CDP code can call constraint_set here.
- */
-
- return 0;
-}
-
-int omap_pm_set_max_sdma_lat(struct device *dev, long t)
-{
- if (!dev || t < -1) {
- WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
- return -EINVAL;
- };
-
- if (t == -1)
- pr_debug("OMAP PM: remove max DMA latency constraint: "
- "dev %s\n", dev_name(dev));
- else
- pr_debug("OMAP PM: add max DMA latency constraint: "
- "dev %s, t = %ld usec\n", dev_name(dev), t);
-
- /*
- * For current Linux PM QOS params, this code should scan the
- * list of maximum CPU and DMA latencies and select the
- * smallest, then set cpu_dma_latency pm_qos_param
- * accordingly.
- *
- * For future Linux PM QOS params, with separate CPU and DMA
- * latency params, this code should just set the dma_latency param.
- *
- * TI CDP code can call constraint_set here.
- */
-
- return 0;
-}
-
int omap_pm_set_min_clk_rate(struct device *dev, struct clk *c, long r)
{
if (!dev || !c || r < 0) {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS
2011-10-19 14:28 [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS jean.pihet
2011-10-19 14:28 ` [PATCH 1/2] OMAP: convert I2C driver to PM QoS for latency constraints jean.pihet
2011-10-19 14:28 ` [PATCH 2/2] OMAP: PM: remove the latency related functions from the API jean.pihet
@ 2011-12-12 16:27 ` Jean Pihet
2011-12-14 14:57 ` Jean Pihet
2 siblings, 1 reply; 7+ messages in thread
From: Jean Pihet @ 2011-12-12 16:27 UTC (permalink / raw)
To: Kevin Hilman, Linux PM mailing list, linux-omap,
Rafael J. Wysocki, Paul Walmsley, magnus.damm, Todd Poynor
Cc: Jean Pihet
Hi Kevin, Paul,
ping on this series
Thanks,
Jean
On Wed, Oct 19, 2011 at 4:28 PM, <jean.pihet@newoldbits.com> wrote:
> From: Jean Pihet <j-pihet@ti.com>
>
> . Convert the OMAP I2C driver to the PM QoS API for MPU latency constraints
> . Remove the latency related functions from OMAP PM in favor of
> the generic per-device PM QoS API
>
>
> Apply on top of the OMAP PM QoS patch set [1].
> Based on the pm-qos branch of the linux-pm git tree (3.1.0-rc3), cf. [2].
>
> Tested on OMAP3 Beagleboard (ES2.x) with constraints on MPU, CORE, PER in
> RETention and OFF modes.
>
> [1] http://thread.gmane.org/gmane.linux.ports.arm.omap/65971
> [2] git://github.com/rjwysocki/linux-pm.git
>
>
> Jean Pihet (2):
> OMAP: convert I2C driver to PM QoS for latency constraints
> OMAP: PM: remove the latency related functions from the API
>
> Documentation/arm/OMAP/omap_pm | 55 +++-------------
> arch/arm/plat-omap/i2c.c | 20 ------
> arch/arm/plat-omap/include/plat/omap-pm.h | 99 -----------------------------
> arch/arm/plat-omap/omap-pm-noop.c | 88 -------------------------
> drivers/i2c/busses/i2c-omap.c | 30 +++++-----
> include/linux/i2c-omap.h | 1 -
> 6 files changed, 24 insertions(+), 269 deletions(-)
>
> --
> 1.7.4.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS
2011-12-12 16:27 ` [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS Jean Pihet
@ 2011-12-14 14:57 ` Jean Pihet
0 siblings, 0 replies; 7+ messages in thread
From: Jean Pihet @ 2011-12-14 14:57 UTC (permalink / raw)
To: Kevin Hilman, Linux PM mailing list, linux-omap,
Rafael J. Wysocki, Paul Walmsley, magnus.damm, Todd Poynor
Cc: Jean Pihet
Hi Paul, Kevin,
This patch series is depending on the latest constraints stuff for
OMAP [1], which has been reviewed by Kevin.
[1] http://marc.info/?l=linux-omap&m=132387443205028&w=2
Regards,
Jean
On Mon, Dec 12, 2011 at 5:27 PM, Jean Pihet <jean.pihet@newoldbits.com> wrote:
> Hi Kevin, Paul,
>
> ping on this series
>
> Thanks,
> Jean
>
> On Wed, Oct 19, 2011 at 4:28 PM, <jean.pihet@newoldbits.com> wrote:
>> From: Jean Pihet <j-pihet@ti.com>
>>
>> . Convert the OMAP I2C driver to the PM QoS API for MPU latency constraints
>> . Remove the latency related functions from OMAP PM in favor of
>> the generic per-device PM QoS API
>>
>>
>> Apply on top of the OMAP PM QoS patch set [1].
>> Based on the pm-qos branch of the linux-pm git tree (3.1.0-rc3), cf. [2].
>>
>> Tested on OMAP3 Beagleboard (ES2.x) with constraints on MPU, CORE, PER in
>> RETention and OFF modes.
>>
>> [1] http://thread.gmane.org/gmane.linux.ports.arm.omap/65971
>> [2] git://github.com/rjwysocki/linux-pm.git
>>
>>
>> Jean Pihet (2):
>> OMAP: convert I2C driver to PM QoS for latency constraints
>> OMAP: PM: remove the latency related functions from the API
>>
>> Documentation/arm/OMAP/omap_pm | 55 +++-------------
>> arch/arm/plat-omap/i2c.c | 20 ------
>> arch/arm/plat-omap/include/plat/omap-pm.h | 99 -----------------------------
>> arch/arm/plat-omap/omap-pm-noop.c | 88 -------------------------
>> drivers/i2c/busses/i2c-omap.c | 30 +++++-----
>> include/linux/i2c-omap.h | 1 -
>> 6 files changed, 24 insertions(+), 269 deletions(-)
>>
>> --
>> 1.7.4.1
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] OMAP: convert I2C driver to PM QoS for latency constraints
2011-10-19 14:28 ` [PATCH 1/2] OMAP: convert I2C driver to PM QoS for latency constraints jean.pihet
@ 2011-12-15 0:17 ` Kevin Hilman
0 siblings, 0 replies; 7+ messages in thread
From: Kevin Hilman @ 2011-12-15 0:17 UTC (permalink / raw)
To: jean.pihet
Cc: Linux PM mailing list, linux-omap, Rafael J. Wysocki,
Paul Walmsley, magnus.damm, Todd Poynor, Jean Pihet
jean.pihet@newoldbits.com writes:
> From: Jean Pihet <j-pihet@ti.com>
>
> Convert the driver from the outdated omap_pm_set_max_mpu_wakeup_lat
> API to the new PM QoS API.
> Since the constraint is on the MPU subsystem, use the PM_QOS_CPU_DMA_LATENCY
> class of PM QoS. The resulting MPU constraints are used by cpuidle to
> decide the next power state of the MPU subsystem.
>
> The I2C device latency timing is derived from the FIFO size and the
> clock speed and so is applicable to all OMAP SoCs.
>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
Nice.
Acked-by: Kevin Hilman <khilman@ti.com>
I'll queue this with the other I2C changes I've queued once the QoS
series has been merged.
Kevin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] OMAP: PM: remove the latency related functions from the API
2011-10-19 14:28 ` [PATCH 2/2] OMAP: PM: remove the latency related functions from the API jean.pihet
@ 2011-12-15 0:19 ` Kevin Hilman
0 siblings, 0 replies; 7+ messages in thread
From: Kevin Hilman @ 2011-12-15 0:19 UTC (permalink / raw)
To: jean.pihet
Cc: Linux PM mailing list, linux-omap, Rafael J. Wysocki,
Paul Walmsley, magnus.damm, Todd Poynor, Jean Pihet
jean.pihet@newoldbits.com writes:
> From: Jean Pihet <j-pihet@ti.com>
>
> Remove the following functions from the API:
> omap_pm_set_max_mpu_wakeup_lat
> omap_pm_set_max_dev_wakeup_lat
> omap_pm_set_max_sdma_lat
>
> The generic per-device PM QoS functions shall be used instead, cf.
> include/linux/pm_qos.h.
>
> Signed-off-by: Jean Pihet <j-pihet@ti.com>
Acked-by: Kevin Hilman <khilman@ti.com>
Paul can pick this up once the QoS changes have merged and the I2C
driver (and any other in-tree users) have been converted.
Kevin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-12-15 0:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-19 14:28 [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS jean.pihet
2011-10-19 14:28 ` [PATCH 1/2] OMAP: convert I2C driver to PM QoS for latency constraints jean.pihet
2011-12-15 0:17 ` Kevin Hilman
2011-10-19 14:28 ` [PATCH 2/2] OMAP: PM: remove the latency related functions from the API jean.pihet
2011-12-15 0:19 ` Kevin Hilman
2011-12-12 16:27 ` [PATCH 0/2] OMAP: PM: switch from omap_pm_ functions to PM QoS Jean Pihet
2011-12-14 14:57 ` Jean Pihet
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).