All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2010-12-02 13:59 G, Manjunath Kondaiah
  2010-12-02 14:23   ` G, Manjunath Kondaiah
  2010-12-03  8:38   ` Cousson, Benoit
  0 siblings, 2 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2010-12-02 13:59 UTC (permalink / raw)
  To: linux-omap
  Cc: G, Manjunath Kondaiah, Kevin Hilman, Paul Walmsley, linux-arm-kernel

Certain errata in OMAP2+ processors will require forcing
master standby to "no standby" mode before completing on going
operation. Without this, the results will be unpredictable.

Since current implementation of PM run time framework does not support
changing sysconfig settings during middle of the on going operation,
these API's will support the same. One API will force the device's
sysconfig mstandby mode settings to "no standby" and other API will
release "no standby" mode and sets it to "smart standby" or "no
standby? depending on HWMOD_SWSUP_MSTANDBY value.

The hwmod API "omap_hwmod_set_master_standbymode" will use
no_stdby_cnt(introduced in omap_hwmod structure) for controlling
access to sysconfig register settings in case of overlapping
request/release API's are called. It also disables interrupts during
syconfig register access.

These API's should be used by device drivers only incase of
erratum applicable to their modules if there is no other methods
to resolve.

These API's are required for multiple DMA errata which require
putting DMA controller in no mstandby mode before stopping dma.

The applicable errata:
1. Erratum ID: i557(Applicable for omap36xx all ES versions)
The channel hangs when the Pause bit (DMA4_CDPi [7] ) is cleared
through config port while in Standby.

2. Erratum ID: i541
sDMA FIFO draining does not finish. Applicable to all omap2+ except
omap4.

3. Erratum ID:i88
The sDMA to be put in no mstandby mode before disabling the channel
after completing the data transfer operation.
Applicable only for OMAP3430 ES1.0

Also fixes typo HWMOD_SWSUP_MSTDBY to HWMOD_SWSUP_MSTANDBY in
omap_hwmod.h

Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: linux-arm-kernel@lists.infradead.org
---
v3: Review comments incorporated for:
https://patchwork.kernel.org/patch/282212/

v4: added mutex changes
https://patchwork.kernel.org/patch/338611/

v5: typo fixes for errata and erratum
https://patchwork.kernel.org/patch/352481/

v6: fixed oh increment bug and also mutex(missing in v5)
https://patchwork.kernel.org/patch/372231/

v7: replaced mutex lock with spin lock. Added use count for controlling
access to sysconfig registers in case if overlapping request/release API's
are used.

This patch has dependency on the patch series:
http://www.spinics.net/lists/linux-omap/msg40188.html
(OMAP2+: hwmod core upgrades for 2.6.38: first set)
Apply the above set of patches before using this patch.

 arch/arm/mach-omap2/omap_hwmod.c              |   70 +++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/omap_device.h |    2 +
 arch/arm/plat-omap/include/plat/omap_hwmod.h  |    3 +
 arch/arm/plat-omap/omap_device.c              |   60 +++++++++++++++++++++
 4 files changed, 135 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 8a9847e..287818b 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1474,6 +1474,76 @@ int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode)
 }
 
 /**
+ * omap_hwmod_set_master_standbymode - set the hwmod's OCP mstandby mode
+ * @oh: struct omap_hwmod *
+ * @midlemode: flag to set mstandby to either "no standby" or "smart standby"
+ *
+ * Sets the IP block's OCP mstandby mode in hardware, and updates our
+ * local copy.  Intended to be used by drivers that have some erratum
+ * that requires direct manipulation of the MIDLEMODE bits.  Returns
+ * -EINVAL if @oh is null, or passes along the return value from
+ * _set_master_standbymode().
+ *
+ * Any users of this function should be scrutinized carefully.
+ */
+int omap_hwmod_set_master_standbymode(struct omap_hwmod *oh, u8 idlemode)
+{
+	u32 v;
+	u8 sf;
+	int retval = -1;
+	unsigned int long flags;
+
+	if (!oh)
+		return -EINVAL;
+
+	if (!oh->class->sysc)
+		return -EINVAL;
+
+	spin_lock_irqsave(&oh->_lock, flags);
+
+	v = oh->_sysc_cache;
+	sf = oh->class->sysc->sysc_flags;
+
+	if (!(sf & SYSC_HAS_MIDLEMODE)) {
+		spin_unlock_irqrestore(&oh->_lock, flags);
+		return -EINVAL;
+	}
+
+	if (idlemode) {
+		if (oh->no_stdby_cnt) {
+			atomic_inc(oh->no_stdby_cnt);
+			goto in_nostandby_mode;
+		}
+		atomic_inc(oh->no_stdby_cnt);
+		idlemode = HWMOD_IDLEMODE_NO;
+	} else {
+		if (oh->no_stdby_cnt == 1) {
+			atomic_dec(oh->no_stdby_cnt);
+			idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ?
+				HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART;
+		} else if (oh->no_stdby_cnt > 1) {
+			goto out_nostandby_mode;
+		} else {
+			goto in_nostandby_mode;
+		}
+	}
+	retval = _set_master_standbymode(oh, idlemode, &v);
+
+	if (!retval)
+		_write_sysconfig(v, oh);
+
+	return retval;
+
+out_nostandby_mode:
+	atomic_dec(oh->no_stdby_cnt);
+
+in_nostandby_mode:
+	spin_unlock_irqrestore(&oh->_lock, flags);
+
+	return retval;
+}
+
+/**
  * omap_hwmod_register - register a struct omap_hwmod
  * @oh: struct omap_hwmod *
  *
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index 28e2d1a..4fbf7c1 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -116,6 +116,8 @@ int omap_device_enable_hwmods(struct omap_device *od);
 int omap_device_disable_clocks(struct omap_device *od);
 int omap_device_enable_clocks(struct omap_device *od);
 
+int omap_device_require_no_mstandby(struct platform_device *pdev);
+int omap_device_release_no_mstandby(struct platform_device *pdev);
 
 /*
  * Entries should be kept in latency order ascending
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 62bdb23..9d591fb 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -508,6 +508,7 @@ struct omap_hwmod {
 	u8				masters_cnt;
 	u8				slaves_cnt;
 	u8				hwmods_cnt;
+	u8				no_stdby_cnt;
 	u8				_int_flags;
 	u8				_state;
 	u8				_postsetup_state;
@@ -537,6 +538,8 @@ int omap_hwmod_disable_clocks(struct omap_hwmod *oh);
 
 int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode);
 
+int omap_hwmod_set_master_standbymode(struct omap_hwmod *oh, u8 idlemode);
+
 int omap_hwmod_reset(struct omap_hwmod *oh);
 void omap_hwmod_ocp_barrier(struct omap_hwmod *oh);
 
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index abe933c..2d42ab2 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -584,6 +584,66 @@ int omap_device_idle(struct platform_device *pdev)
 }
 
 /**
+ * omap_device_require_no_mstandby - set no mstandby mode of an omap_device
+ * @od: struct omap_device * to idle
+ *
+ * Sets the IP block's OCP master standby to no mstandby mode in hardware.
+ *
+ * Intended to be used by drivers that have some erratum that requires direct
+ * manipulation of the MSTANDBYMODE bits. Returns -EINVAL if the
+ * omap_device is not currently enabled or passes along the return value
+ * of omap_hwmod_set_master_standbymode().
+ */
+int omap_device_require_no_mstandby(struct platform_device *pdev)
+{
+	int ret  = 0, i;
+	struct omap_device *od;
+
+	od = _find_by_pdev(pdev);
+	if (od->_state != OMAP_DEVICE_STATE_ENABLED) {
+		WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n",
+		     od->pdev.name, od->pdev.id, __func__, od->_state);
+		return -EINVAL;
+	}
+
+	for (i = 0; i < od->hwmods_cnt; i++)
+		ret = omap_hwmod_set_master_standbymode(od->hwmods[i], true);
+
+	return ret;
+}
+
+/**
+ * omap_device_release_no_mstandby - releases no mstandby mode of an omap_device
+ * @od: struct omap_device * to idle
+ *
+ * Release no mstandby mode and sets the master standby to either no standby or
+ * smart standby in IP block's OCP in hardware depending on status of the flag
+ * HWMOD_SWSUP_MSTANDBY.
+ *
+ * Intended to be used by drivers that have some erratum that requires direct
+ * manipulation of the MSTANDBYMODE bits. Returns -EINVAL if the
+ * omap_device is not currently enabled or passes along the return value
+ * of omap_hwmod_set_master_standbymode().
+ */
+int omap_device_release_no_mstandby(struct platform_device *pdev)
+{
+	int ret  = 0, i;
+	struct omap_device *od;
+
+	od = _find_by_pdev(pdev);
+	if (od->_state != OMAP_DEVICE_STATE_ENABLED) {
+		WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n",
+		     od->pdev.name, od->pdev.id, __func__, od->_state);
+		return -EINVAL;
+	}
+
+	for (i = 0; i < od->hwmods_cnt; i++)
+		ret = omap_hwmod_set_master_standbymode(od->hwmods[i], false);
+
+	return ret;
+}
+
+/**
  * omap_device_shutdown - shut down an omap_device
  * @od: struct omap_device * to shut down
  *
-- 
1.7.1


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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2010-12-02 13:59 [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode G, Manjunath Kondaiah
@ 2010-12-02 14:23   ` G, Manjunath Kondaiah
  2010-12-03  8:38   ` Cousson, Benoit
  1 sibling, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2010-12-02 14:23 UTC (permalink / raw)
  To: linux-omap; +Cc: Kevin Hilman, Paul Walmsley, linux-arm-kernel


* G, Manjunath Kondaiah <manjugk@ti.com> [2010-12-02 19:29:52 +0530]:

> Certain errata in OMAP2+ processors will require forcing
> master standby to "no standby" mode before completing on going
> operation. Without this, the results will be unpredictable.
> 
> Since current implementation of PM run time framework does not support
> changing sysconfig settings during middle of the on going operation,
> these API's will support the same. One API will force the device's
> sysconfig mstandby mode settings to "no standby" and other API will
> release "no standby" mode and sets it to "smart standby" or "no
> standby? depending on HWMOD_SWSUP_MSTANDBY value.
> 
> The hwmod API "omap_hwmod_set_master_standbymode" will use
> no_stdby_cnt(introduced in omap_hwmod structure) for controlling
> access to sysconfig register settings in case of overlapping
> request/release API's are called. It also disables interrupts during
> syconfig register access.
> 
> These API's should be used by device drivers only incase of
> erratum applicable to their modules if there is no other methods
> to resolve.
> 
> These API's are required for multiple DMA errata which require
> putting DMA controller in no mstandby mode before stopping dma.
> 
> The applicable errata:
> 1. Erratum ID: i557(Applicable for omap36xx all ES versions)
> The channel hangs when the Pause bit (DMA4_CDPi [7] ) is cleared
> through config port while in Standby.
> 
> 2. Erratum ID: i541
> sDMA FIFO draining does not finish. Applicable to all omap2+ except
> omap4.
> 
> 3. Erratum ID:i88
> The sDMA to be put in no mstandby mode before disabling the channel
> after completing the data transfer operation.
> Applicable only for OMAP3430 ES1.0
> 
> Also fixes typo HWMOD_SWSUP_MSTDBY to HWMOD_SWSUP_MSTANDBY in
> omap_hwmod.h
> 
> Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: linux-arm-kernel@lists.infradead.org

Pls ignore this patch. I have resent this patch as:
[PATCH v7 RESEND] OMAP2+: PM: omap device: API's for handling mstandby
mode

Sorry for noise.

-Manjunath

[...]

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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2010-12-02 14:23   ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2010-12-02 14:23 UTC (permalink / raw)
  To: linux-arm-kernel


* G, Manjunath Kondaiah <manjugk@ti.com> [2010-12-02 19:29:52 +0530]:

> Certain errata in OMAP2+ processors will require forcing
> master standby to "no standby" mode before completing on going
> operation. Without this, the results will be unpredictable.
> 
> Since current implementation of PM run time framework does not support
> changing sysconfig settings during middle of the on going operation,
> these API's will support the same. One API will force the device's
> sysconfig mstandby mode settings to "no standby" and other API will
> release "no standby" mode and sets it to "smart standby" or "no
> standby? depending on HWMOD_SWSUP_MSTANDBY value.
> 
> The hwmod API "omap_hwmod_set_master_standbymode" will use
> no_stdby_cnt(introduced in omap_hwmod structure) for controlling
> access to sysconfig register settings in case of overlapping
> request/release API's are called. It also disables interrupts during
> syconfig register access.
> 
> These API's should be used by device drivers only incase of
> erratum applicable to their modules if there is no other methods
> to resolve.
> 
> These API's are required for multiple DMA errata which require
> putting DMA controller in no mstandby mode before stopping dma.
> 
> The applicable errata:
> 1. Erratum ID: i557(Applicable for omap36xx all ES versions)
> The channel hangs when the Pause bit (DMA4_CDPi [7] ) is cleared
> through config port while in Standby.
> 
> 2. Erratum ID: i541
> sDMA FIFO draining does not finish. Applicable to all omap2+ except
> omap4.
> 
> 3. Erratum ID:i88
> The sDMA to be put in no mstandby mode before disabling the channel
> after completing the data transfer operation.
> Applicable only for OMAP3430 ES1.0
> 
> Also fixes typo HWMOD_SWSUP_MSTDBY to HWMOD_SWSUP_MSTANDBY in
> omap_hwmod.h
> 
> Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Cc: linux-arm-kernel at lists.infradead.org

Pls ignore this patch. I have resent this patch as:
[PATCH v7 RESEND] OMAP2+: PM: omap device: API's for handling mstandby
mode

Sorry for noise.

-Manjunath

[...]

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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2010-12-02 13:59 [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode G, Manjunath Kondaiah
@ 2010-12-03  8:38   ` Cousson, Benoit
  2010-12-03  8:38   ` Cousson, Benoit
  1 sibling, 0 replies; 17+ messages in thread
From: Cousson, Benoit @ 2010-12-03  8:38 UTC (permalink / raw)
  To: G, Manjunath Kondaiah, Paul Walmsley
  Cc: linux-omap, Kevin Hilman, linux-arm-kernel

On 12/2/2010 2:59 PM, G, Manjunath Kondaiah wrote:
> Certain errata in OMAP2+ processors will require forcing
> master standby to "no standby" mode before completing on going
> operation. Without this, the results will be unpredictable.
>
> Since current implementation of PM run time framework does not support
> changing sysconfig settings during middle of the on going operation,
> these API's will support the same. One API will force the device's
> sysconfig mstandby mode settings to "no standby" and other API will
> release "no standby" mode and sets it to "smart standby" or "no
> standby? depending on HWMOD_SWSUP_MSTANDBY value.
>
> The hwmod API "omap_hwmod_set_master_standbymode" will use
> no_stdby_cnt(introduced in omap_hwmod structure) for controlling
> access to sysconfig register settings in case of overlapping
> request/release API's are called. It also disables interrupts during
> syconfig register access.
>
> These API's should be used by device drivers only incase of
> erratum applicable to their modules if there is no other methods
> to resolve.
>
> These API's are required for multiple DMA errata which require
> putting DMA controller in no mstandby mode before stopping dma.
>
> The applicable errata:
> 1. Erratum ID: i557(Applicable for omap36xx all ES versions)
> The channel hangs when the Pause bit (DMA4_CDPi [7] ) is cleared
> through config port while in Standby.
>
> 2. Erratum ID: i541
> sDMA FIFO draining does not finish. Applicable to all omap2+ except
> omap4.
>
> 3. Erratum ID:i88
> The sDMA to be put in no mstandby mode before disabling the channel
> after completing the data transfer operation.
> Applicable only for OMAP3430 ES1.0
>
> Also fixes typo HWMOD_SWSUP_MSTDBY to HWMOD_SWSUP_MSTANDBY in
> omap_hwmod.h
>
> Signed-off-by: G, Manjunath Kondaiah<manjugk@ti.com>
> Cc: Kevin Hilman<khilman@deeprootsystems.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: linux-arm-kernel@lists.infradead.org

You have to CC lakml during send-email, but it should not be in the 
changelog.

On the other hand, it is a good practice to add all the authors of the 
file you change in CC.

> ---
> v3: Review comments incorporated for:
> https://patchwork.kernel.org/patch/282212/
>
> v4: added mutex changes
> https://patchwork.kernel.org/patch/338611/
>
> v5: typo fixes for errata and erratum
> https://patchwork.kernel.org/patch/352481/
>
> v6: fixed oh increment bug and also mutex(missing in v5)
> https://patchwork.kernel.org/patch/372231/
>
> v7: replaced mutex lock with spin lock. Added use count for controlling
> access to sysconfig registers in case if overlapping request/release API's
> are used.

I'm not sure it should be done here. I'd rather keep that code in the 
DMA, since this is the only user of that feature.
These hwmod APIs are rather low level and should never be used except 
for workaround. So I'd prefer keeping this API simple and not sexy at 
all in order to prevent people to abuse it.

Regards,
Benoit

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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2010-12-03  8:38   ` Cousson, Benoit
  0 siblings, 0 replies; 17+ messages in thread
From: Cousson, Benoit @ 2010-12-03  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/2/2010 2:59 PM, G, Manjunath Kondaiah wrote:
> Certain errata in OMAP2+ processors will require forcing
> master standby to "no standby" mode before completing on going
> operation. Without this, the results will be unpredictable.
>
> Since current implementation of PM run time framework does not support
> changing sysconfig settings during middle of the on going operation,
> these API's will support the same. One API will force the device's
> sysconfig mstandby mode settings to "no standby" and other API will
> release "no standby" mode and sets it to "smart standby" or "no
> standby? depending on HWMOD_SWSUP_MSTANDBY value.
>
> The hwmod API "omap_hwmod_set_master_standbymode" will use
> no_stdby_cnt(introduced in omap_hwmod structure) for controlling
> access to sysconfig register settings in case of overlapping
> request/release API's are called. It also disables interrupts during
> syconfig register access.
>
> These API's should be used by device drivers only incase of
> erratum applicable to their modules if there is no other methods
> to resolve.
>
> These API's are required for multiple DMA errata which require
> putting DMA controller in no mstandby mode before stopping dma.
>
> The applicable errata:
> 1. Erratum ID: i557(Applicable for omap36xx all ES versions)
> The channel hangs when the Pause bit (DMA4_CDPi [7] ) is cleared
> through config port while in Standby.
>
> 2. Erratum ID: i541
> sDMA FIFO draining does not finish. Applicable to all omap2+ except
> omap4.
>
> 3. Erratum ID:i88
> The sDMA to be put in no mstandby mode before disabling the channel
> after completing the data transfer operation.
> Applicable only for OMAP3430 ES1.0
>
> Also fixes typo HWMOD_SWSUP_MSTDBY to HWMOD_SWSUP_MSTANDBY in
> omap_hwmod.h
>
> Signed-off-by: G, Manjunath Kondaiah<manjugk@ti.com>
> Cc: Kevin Hilman<khilman@deeprootsystems.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: linux-arm-kernel at lists.infradead.org

You have to CC lakml during send-email, but it should not be in the 
changelog.

On the other hand, it is a good practice to add all the authors of the 
file you change in CC.

> ---
> v3: Review comments incorporated for:
> https://patchwork.kernel.org/patch/282212/
>
> v4: added mutex changes
> https://patchwork.kernel.org/patch/338611/
>
> v5: typo fixes for errata and erratum
> https://patchwork.kernel.org/patch/352481/
>
> v6: fixed oh increment bug and also mutex(missing in v5)
> https://patchwork.kernel.org/patch/372231/
>
> v7: replaced mutex lock with spin lock. Added use count for controlling
> access to sysconfig registers in case if overlapping request/release API's
> are used.

I'm not sure it should be done here. I'd rather keep that code in the 
DMA, since this is the only user of that feature.
These hwmod APIs are rather low level and should never be used except 
for workaround. So I'd prefer keeping this API simple and not sexy at 
all in order to prevent people to abuse it.

Regards,
Benoit

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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2010-12-03  8:38   ` Cousson, Benoit
@ 2010-12-03  9:47     ` G, Manjunath Kondaiah
  -1 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2010-12-03  9:47 UTC (permalink / raw)
  To: Cousson, Benoit; +Cc: Paul Walmsley, linux-omap, Kevin Hilman, linux-arm-kernel

* Cousson, Benoit <b-cousson@ti.com> [2010-12-03 09:38:35 +0100]:

> On 12/2/2010 2:59 PM, G, Manjunath Kondaiah wrote:
> >Certain errata in OMAP2+ processors will require forcing
> >master standby to "no standby" mode before completing on going
> >operation. Without this, the results will be unpredictable.
> >
> >Since current implementation of PM run time framework does not support
> >changing sysconfig settings during middle of the on going operation,
> >these API's will support the same. One API will force the device's
> >sysconfig mstandby mode settings to "no standby" and other API will
> >release "no standby" mode and sets it to "smart standby" or "no
> >standby? depending on HWMOD_SWSUP_MSTANDBY value.
> >
> >The hwmod API "omap_hwmod_set_master_standbymode" will use
> >no_stdby_cnt(introduced in omap_hwmod structure) for controlling
> >access to sysconfig register settings in case of overlapping
> >request/release API's are called. It also disables interrupts during
> >syconfig register access.
> >
> >These API's should be used by device drivers only incase of
> >erratum applicable to their modules if there is no other methods
> >to resolve.
> >
> >These API's are required for multiple DMA errata which require
> >putting DMA controller in no mstandby mode before stopping dma.
> >
> >The applicable errata:
> >1. Erratum ID: i557(Applicable for omap36xx all ES versions)
> >The channel hangs when the Pause bit (DMA4_CDPi [7] ) is cleared
> >through config port while in Standby.
> >
> >2. Erratum ID: i541
> >sDMA FIFO draining does not finish. Applicable to all omap2+ except
> >omap4.
> >
> >3. Erratum ID:i88
> >The sDMA to be put in no mstandby mode before disabling the channel
> >after completing the data transfer operation.
> >Applicable only for OMAP3430 ES1.0
> >
> >Also fixes typo HWMOD_SWSUP_MSTDBY to HWMOD_SWSUP_MSTANDBY in
> >omap_hwmod.h
> >
> >Signed-off-by: G, Manjunath Kondaiah<manjugk@ti.com>
> >Cc: Kevin Hilman<khilman@deeprootsystems.com>
> >Cc: Paul Walmsley<paul@pwsan.com>
> >Cc: linux-arm-kernel@lists.infradead.org
> 
> You have to CC lakml during send-email, but it should not be in the
> changelog.
> 
> On the other hand, it is a good practice to add all the authors of
> the file you change in CC.
> 
> >---
> >v3: Review comments incorporated for:
> >https://patchwork.kernel.org/patch/282212/
> >
> >v4: added mutex changes
> >https://patchwork.kernel.org/patch/338611/
> >
> >v5: typo fixes for errata and erratum
> >https://patchwork.kernel.org/patch/352481/
> >
> >v6: fixed oh increment bug and also mutex(missing in v5)
> >https://patchwork.kernel.org/patch/372231/
> >
> >v7: replaced mutex lock with spin lock. Added use count for controlling
> >access to sysconfig registers in case if overlapping request/release API's
> >are used.
> 
> I'm not sure it should be done here. I'd rather keep that code in
> the DMA, since this is the only user of that feature.

Are you referring to spin lock or usage count? 

-Manjunath



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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2010-12-03  9:47     ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2010-12-03  9:47 UTC (permalink / raw)
  To: linux-arm-kernel

* Cousson, Benoit <b-cousson@ti.com> [2010-12-03 09:38:35 +0100]:

> On 12/2/2010 2:59 PM, G, Manjunath Kondaiah wrote:
> >Certain errata in OMAP2+ processors will require forcing
> >master standby to "no standby" mode before completing on going
> >operation. Without this, the results will be unpredictable.
> >
> >Since current implementation of PM run time framework does not support
> >changing sysconfig settings during middle of the on going operation,
> >these API's will support the same. One API will force the device's
> >sysconfig mstandby mode settings to "no standby" and other API will
> >release "no standby" mode and sets it to "smart standby" or "no
> >standby? depending on HWMOD_SWSUP_MSTANDBY value.
> >
> >The hwmod API "omap_hwmod_set_master_standbymode" will use
> >no_stdby_cnt(introduced in omap_hwmod structure) for controlling
> >access to sysconfig register settings in case of overlapping
> >request/release API's are called. It also disables interrupts during
> >syconfig register access.
> >
> >These API's should be used by device drivers only incase of
> >erratum applicable to their modules if there is no other methods
> >to resolve.
> >
> >These API's are required for multiple DMA errata which require
> >putting DMA controller in no mstandby mode before stopping dma.
> >
> >The applicable errata:
> >1. Erratum ID: i557(Applicable for omap36xx all ES versions)
> >The channel hangs when the Pause bit (DMA4_CDPi [7] ) is cleared
> >through config port while in Standby.
> >
> >2. Erratum ID: i541
> >sDMA FIFO draining does not finish. Applicable to all omap2+ except
> >omap4.
> >
> >3. Erratum ID:i88
> >The sDMA to be put in no mstandby mode before disabling the channel
> >after completing the data transfer operation.
> >Applicable only for OMAP3430 ES1.0
> >
> >Also fixes typo HWMOD_SWSUP_MSTDBY to HWMOD_SWSUP_MSTANDBY in
> >omap_hwmod.h
> >
> >Signed-off-by: G, Manjunath Kondaiah<manjugk@ti.com>
> >Cc: Kevin Hilman<khilman@deeprootsystems.com>
> >Cc: Paul Walmsley<paul@pwsan.com>
> >Cc: linux-arm-kernel at lists.infradead.org
> 
> You have to CC lakml during send-email, but it should not be in the
> changelog.
> 
> On the other hand, it is a good practice to add all the authors of
> the file you change in CC.
> 
> >---
> >v3: Review comments incorporated for:
> >https://patchwork.kernel.org/patch/282212/
> >
> >v4: added mutex changes
> >https://patchwork.kernel.org/patch/338611/
> >
> >v5: typo fixes for errata and erratum
> >https://patchwork.kernel.org/patch/352481/
> >
> >v6: fixed oh increment bug and also mutex(missing in v5)
> >https://patchwork.kernel.org/patch/372231/
> >
> >v7: replaced mutex lock with spin lock. Added use count for controlling
> >access to sysconfig registers in case if overlapping request/release API's
> >are used.
> 
> I'm not sure it should be done here. I'd rather keep that code in
> the DMA, since this is the only user of that feature.

Are you referring to spin lock or usage count? 

-Manjunath

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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2010-12-03  9:47     ` G, Manjunath Kondaiah
@ 2010-12-03 12:19       ` Cousson, Benoit
  -1 siblings, 0 replies; 17+ messages in thread
From: Cousson, Benoit @ 2010-12-03 12:19 UTC (permalink / raw)
  To: G, Manjunath Kondaiah, Paul Walmsley
  Cc: linux-omap, Kevin Hilman, linux-arm-kernel

On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> * Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:

[...]

>>> v7: replaced mutex lock with spin lock. Added use count for controlling
>>> access to sysconfig registers in case if overlapping request/release API's
>>> are used.
>>
>> I'm not sure it should be done here. I'd rather keep that code in
>> the DMA, since this is the only user of that feature.
>
> Are you referring to spin lock or usage count?

The spinlock is needed, I was referring to the usage count.

That being said, the API proposed by Paul (request/release
) sound like a get/put, so maybe he had that kind of usage in mind.

I'm still not convince it should be done at hwmod API level.


Paul,
Any thoughts on that?

Regards,
Benoit

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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2010-12-03 12:19       ` Cousson, Benoit
  0 siblings, 0 replies; 17+ messages in thread
From: Cousson, Benoit @ 2010-12-03 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> * Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:

[...]

>>> v7: replaced mutex lock with spin lock. Added use count for controlling
>>> access to sysconfig registers in case if overlapping request/release API's
>>> are used.
>>
>> I'm not sure it should be done here. I'd rather keep that code in
>> the DMA, since this is the only user of that feature.
>
> Are you referring to spin lock or usage count?

The spinlock is needed, I was referring to the usage count.

That being said, the API proposed by Paul (request/release
) sound like a get/put, so maybe he had that kind of usage in mind.

I'm still not convince it should be done at hwmod API level.


Paul,
Any thoughts on that?

Regards,
Benoit

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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2010-12-03 12:19       ` Cousson, Benoit
@ 2010-12-14  1:48         ` G, Manjunath Kondaiah
  -1 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2010-12-14  1:48 UTC (permalink / raw)
  To: Cousson, Benoit; +Cc: Paul Walmsley, linux-omap, Kevin Hilman, linux-arm-kernel

Paul/Benoit,

On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> 
> [...]
> 
> >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> >>>access to sysconfig registers in case if overlapping request/release API's
> >>>are used.
> >>
> >>I'm not sure it should be done here. I'd rather keep that code in
> >>the DMA, since this is the only user of that feature.
> >
> >Are you referring to spin lock or usage count?
> 
> The spinlock is needed, I was referring to the usage count.
> 
> That being said, the API proposed by Paul (request/release
> ) sound like a get/put, so maybe he had that kind of usage in mind.
> 
> I'm still not convince it should be done at hwmod API level.
> 
> 
> Paul,
> Any thoughts on that?

How do we proceed further?

-Manjunath


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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2010-12-14  1:48         ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2010-12-14  1:48 UTC (permalink / raw)
  To: linux-arm-kernel

Paul/Benoit,

On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> 
> [...]
> 
> >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> >>>access to sysconfig registers in case if overlapping request/release API's
> >>>are used.
> >>
> >>I'm not sure it should be done here. I'd rather keep that code in
> >>the DMA, since this is the only user of that feature.
> >
> >Are you referring to spin lock or usage count?
> 
> The spinlock is needed, I was referring to the usage count.
> 
> That being said, the API proposed by Paul (request/release
> ) sound like a get/put, so maybe he had that kind of usage in mind.
> 
> I'm still not convince it should be done at hwmod API level.
> 
> 
> Paul,
> Any thoughts on that?

How do we proceed further?

-Manjunath

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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2010-12-14  1:48         ` G, Manjunath Kondaiah
@ 2011-01-24  9:33           ` G, Manjunath Kondaiah
  -1 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2011-01-24  9:33 UTC (permalink / raw)
  To: G, Manjunath Kondaiah
  Cc: Cousson, Benoit, Paul Walmsley, linux-omap, Kevin Hilman,
	linux-arm-kernel

Paul/Benoit,

On Tue, Dec 14, 2010 at 07:18:22AM +0530, G, Manjunath Kondaiah wrote:
> Paul/Benoit,
> 
> On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> > On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> > >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> > 
> > [...]
> > 
> > >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> > >>>access to sysconfig registers in case if overlapping request/release API's
> > >>>are used.
> > >>
> > >>I'm not sure it should be done here. I'd rather keep that code in
> > >>the DMA, since this is the only user of that feature.
> > >
> > >Are you referring to spin lock or usage count?
> > 
> > The spinlock is needed, I was referring to the usage count.
> > 
> > That being said, the API proposed by Paul (request/release
> > ) sound like a get/put, so maybe he had that kind of usage in mind.
> > 
> > I'm still not convince it should be done at hwmod API level.
> > 
> > 
> > Paul,
> > Any thoughts on that?
> 
> How do we proceed further?
Gentle reminder!

Can we please align on this so that DMA sysconfig patches can be
upstreamed?

Discussion on this topic can be accessed at:
https://patchwork.kernel.org/patch/372231/
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg39728.html

-Manjunath

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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2011-01-24  9:33           ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2011-01-24  9:33 UTC (permalink / raw)
  To: linux-arm-kernel

Paul/Benoit,

On Tue, Dec 14, 2010 at 07:18:22AM +0530, G, Manjunath Kondaiah wrote:
> Paul/Benoit,
> 
> On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> > On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> > >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> > 
> > [...]
> > 
> > >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> > >>>access to sysconfig registers in case if overlapping request/release API's
> > >>>are used.
> > >>
> > >>I'm not sure it should be done here. I'd rather keep that code in
> > >>the DMA, since this is the only user of that feature.
> > >
> > >Are you referring to spin lock or usage count?
> > 
> > The spinlock is needed, I was referring to the usage count.
> > 
> > That being said, the API proposed by Paul (request/release
> > ) sound like a get/put, so maybe he had that kind of usage in mind.
> > 
> > I'm still not convince it should be done at hwmod API level.
> > 
> > 
> > Paul,
> > Any thoughts on that?
> 
> How do we proceed further?
Gentle reminder!

Can we please align on this so that DMA sysconfig patches can be
upstreamed?

Discussion on this topic can be accessed at:
https://patchwork.kernel.org/patch/372231/
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg39728.html

-Manjunath

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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2011-01-24  9:33           ` G, Manjunath Kondaiah
@ 2011-01-26  0:41             ` G, Manjunath Kondaiah
  -1 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2011-01-26  0:41 UTC (permalink / raw)
  To: Cousson, Benoit, Paul Walmsley, linux-omap, Kevin Hilman, linux-ar
  Cc: adrian.hunter, peter.ujfalusi, tony

On Mon, Jan 24, 2011 at 03:03:49PM +0530, G, Manjunath Kondaiah wrote:
> Paul/Benoit,
> 
> On Tue, Dec 14, 2010 at 07:18:22AM +0530, G, Manjunath Kondaiah wrote:
> > Paul/Benoit,
> > 
> > On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> > > On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> > > >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> > > 
> > > [...]
> > > 
> > > >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> > > >>>access to sysconfig registers in case if overlapping request/release API's
> > > >>>are used.
> > > >>
> > > >>I'm not sure it should be done here. I'd rather keep that code in
> > > >>the DMA, since this is the only user of that feature.
> > > >
> > > >Are you referring to spin lock or usage count?
> > > 
> > > The spinlock is needed, I was referring to the usage count.
> > > 
> > > That being said, the API proposed by Paul (request/release
> > > ) sound like a get/put, so maybe he had that kind of usage in mind.
> > > 
> > > I'm still not convince it should be done at hwmod API level.
> > > 
> > > 
> > > Paul,
> > > Any thoughts on that?
> > 
> > How do we proceed further?
> Gentle reminder!
> 
> Can we please align on this so that DMA sysconfig patches can be
> upstreamed?
> 
> Discussion on this topic can be accessed at:
> https://patchwork.kernel.org/patch/372231/
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg39728.html

As there is no response from paul on this topic, I will go ahead with usage
count logic proposed by Adrian Hunter <adrian.hunter@nokia.com> at:
https://patchwork.kernel.org/patch/366831/
Above logic has got:
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

-Manjunath

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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2011-01-26  0:41             ` G, Manjunath Kondaiah
  0 siblings, 0 replies; 17+ messages in thread
From: G, Manjunath Kondaiah @ 2011-01-26  0:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jan 24, 2011 at 03:03:49PM +0530, G, Manjunath Kondaiah wrote:
> Paul/Benoit,
> 
> On Tue, Dec 14, 2010 at 07:18:22AM +0530, G, Manjunath Kondaiah wrote:
> > Paul/Benoit,
> > 
> > On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> > > On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> > > >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> > > 
> > > [...]
> > > 
> > > >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> > > >>>access to sysconfig registers in case if overlapping request/release API's
> > > >>>are used.
> > > >>
> > > >>I'm not sure it should be done here. I'd rather keep that code in
> > > >>the DMA, since this is the only user of that feature.
> > > >
> > > >Are you referring to spin lock or usage count?
> > > 
> > > The spinlock is needed, I was referring to the usage count.
> > > 
> > > That being said, the API proposed by Paul (request/release
> > > ) sound like a get/put, so maybe he had that kind of usage in mind.
> > > 
> > > I'm still not convince it should be done at hwmod API level.
> > > 
> > > 
> > > Paul,
> > > Any thoughts on that?
> > 
> > How do we proceed further?
> Gentle reminder!
> 
> Can we please align on this so that DMA sysconfig patches can be
> upstreamed?
> 
> Discussion on this topic can be accessed at:
> https://patchwork.kernel.org/patch/372231/
> http://www.mail-archive.com/linux-omap at vger.kernel.org/msg39728.html

As there is no response from paul on this topic, I will go ahead with usage
count logic proposed by Adrian Hunter <adrian.hunter@nokia.com> at:
https://patchwork.kernel.org/patch/366831/
Above logic has got:
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

-Manjunath

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

* Re: [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
  2011-01-26  0:41             ` G, Manjunath Kondaiah
@ 2011-01-26 19:05               ` Paul Walmsley
  -1 siblings, 0 replies; 17+ messages in thread
From: Paul Walmsley @ 2011-01-26 19:05 UTC (permalink / raw)
  To: G, Manjunath Kondaiah
  Cc: Cousson, Benoit, linux-omap, Kevin Hilman, linux-arm-kernel,
	adrian.hunter, peter.ujfalusi, tony

On Wed, 26 Jan 2011, G, Manjunath Kondaiah wrote:

> On Mon, Jan 24, 2011 at 03:03:49PM +0530, G, Manjunath Kondaiah wrote:
> > Paul/Benoit,
> > 
> > On Tue, Dec 14, 2010 at 07:18:22AM +0530, G, Manjunath Kondaiah wrote:
> > > Paul/Benoit,
> > > 
> > > On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> > > > On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> > > > >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> > > > 
> > > > [...]
> > > > 
> > > > >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> > > > >>>access to sysconfig registers in case if overlapping request/release API's
> > > > >>>are used.
> > > > >>
> > > > >>I'm not sure it should be done here. I'd rather keep that code in
> > > > >>the DMA, since this is the only user of that feature.
> > > > >
> > > > >Are you referring to spin lock or usage count?
> > > > 
> > > > The spinlock is needed, I was referring to the usage count.
> > > > 
> > > > That being said, the API proposed by Paul (request/release
> > > > ) sound like a get/put, so maybe he had that kind of usage in mind.
> > > > 
> > > > I'm still not convince it should be done at hwmod API level.
> > > > 
> > > > 
> > > > Paul,
> > > > Any thoughts on that?
> > > 
> > > How do we proceed further?
> > Gentle reminder!
> > 
> > Can we please align on this so that DMA sysconfig patches can be
> > upstreamed?
> > 
> > Discussion on this topic can be accessed at:
> > https://patchwork.kernel.org/patch/372231/
> > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg39728.html
> 
> As there is no response from paul on this topic, I will go ahead with usage
> count logic proposed by Adrian Hunter <adrian.hunter@nokia.com> at:
> https://patchwork.kernel.org/patch/366831/
> Above logic has got:
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

Yes, that's probably a good idea for right now.  There's a wider spectrum 
of opinion than I had thought on whether this type of thing belongs in the 
hwmod code.  I'd like to have a greater degree of alignment on that before 
we merge something into the hwmod code.

So, unless there is some reason why it will cause problems not to have 
this in the hwmod code for right now, please just go ahead and deal with 
it in your DMA code, and then we will move it to the hwmod code later as 
needed.


- Paul

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

* [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode
@ 2011-01-26 19:05               ` Paul Walmsley
  0 siblings, 0 replies; 17+ messages in thread
From: Paul Walmsley @ 2011-01-26 19:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 26 Jan 2011, G, Manjunath Kondaiah wrote:

> On Mon, Jan 24, 2011 at 03:03:49PM +0530, G, Manjunath Kondaiah wrote:
> > Paul/Benoit,
> > 
> > On Tue, Dec 14, 2010 at 07:18:22AM +0530, G, Manjunath Kondaiah wrote:
> > > Paul/Benoit,
> > > 
> > > On Fri, Dec 03, 2010 at 01:19:06PM +0100, Cousson, Benoit wrote:
> > > > On 12/3/2010 10:47 AM, G, Manjunath Kondaiah wrote:
> > > > >* Cousson, Benoit<b-cousson@ti.com>  [2010-12-03 09:38:35 +0100]:
> > > > 
> > > > [...]
> > > > 
> > > > >>>v7: replaced mutex lock with spin lock. Added use count for controlling
> > > > >>>access to sysconfig registers in case if overlapping request/release API's
> > > > >>>are used.
> > > > >>
> > > > >>I'm not sure it should be done here. I'd rather keep that code in
> > > > >>the DMA, since this is the only user of that feature.
> > > > >
> > > > >Are you referring to spin lock or usage count?
> > > > 
> > > > The spinlock is needed, I was referring to the usage count.
> > > > 
> > > > That being said, the API proposed by Paul (request/release
> > > > ) sound like a get/put, so maybe he had that kind of usage in mind.
> > > > 
> > > > I'm still not convince it should be done at hwmod API level.
> > > > 
> > > > 
> > > > Paul,
> > > > Any thoughts on that?
> > > 
> > > How do we proceed further?
> > Gentle reminder!
> > 
> > Can we please align on this so that DMA sysconfig patches can be
> > upstreamed?
> > 
> > Discussion on this topic can be accessed at:
> > https://patchwork.kernel.org/patch/372231/
> > http://www.mail-archive.com/linux-omap at vger.kernel.org/msg39728.html
> 
> As there is no response from paul on this topic, I will go ahead with usage
> count logic proposed by Adrian Hunter <adrian.hunter@nokia.com> at:
> https://patchwork.kernel.org/patch/366831/
> Above logic has got:
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

Yes, that's probably a good idea for right now.  There's a wider spectrum 
of opinion than I had thought on whether this type of thing belongs in the 
hwmod code.  I'd like to have a greater degree of alignment on that before 
we merge something into the hwmod code.

So, unless there is some reason why it will cause problems not to have 
this in the hwmod code for right now, please just go ahead and deal with 
it in your DMA code, and then we will move it to the hwmod code later as 
needed.


- Paul

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

end of thread, other threads:[~2011-01-26 19:05 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 13:59 [PATCH v7] OMAP2+: PM: omap device: API's for handling mstandby mode G, Manjunath Kondaiah
2010-12-02 14:23 ` G, Manjunath Kondaiah
2010-12-02 14:23   ` G, Manjunath Kondaiah
2010-12-03  8:38 ` Cousson, Benoit
2010-12-03  8:38   ` Cousson, Benoit
2010-12-03  9:47   ` G, Manjunath Kondaiah
2010-12-03  9:47     ` G, Manjunath Kondaiah
2010-12-03 12:19     ` Cousson, Benoit
2010-12-03 12:19       ` Cousson, Benoit
2010-12-14  1:48       ` G, Manjunath Kondaiah
2010-12-14  1:48         ` G, Manjunath Kondaiah
2011-01-24  9:33         ` G, Manjunath Kondaiah
2011-01-24  9:33           ` G, Manjunath Kondaiah
2011-01-26  0:41           ` G, Manjunath Kondaiah
2011-01-26  0:41             ` G, Manjunath Kondaiah
2011-01-26 19:05             ` Paul Walmsley
2011-01-26 19:05               ` Paul Walmsley

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.