All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shubhrajyoti <shubhrajyoti@ti.com>
To: "Govindraj.R" <govindraj.raja@ti.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Tony Lindgren <tony@atomide.com>, Kevin Hilman <khilman@ti.com>,
	Paul Walmsley <paul@pwsan.com>, Tero Kristo <t-kristo@ti.com>
Subject: Re: [REPOST PATCH 1/2 v4] OMAP2+: hwmod: Add API to enable IO ring wakeup.
Date: Mon, 14 Nov 2011 18:24:29 +0530	[thread overview]
Message-ID: <4EC10F85.8080407@ti.com> (raw)
In-Reply-To: <4EC0FF2D.5040006@ti.com>

On Monday 14 November 2011 05:14 PM, Shubhrajyoti wrote:
> On Monday 04 July 2011 10:25 AM, Govindraj.R wrote:
>> Add API to enable IO pad wakeup capability based on mux dynamic pad and
>> wake_up enable flag available from hwmod_mux initialization.
>>
>> Use the wakeup_enable flag and enable wakeup capability
>> for the given pads. Wakeup capability will be enabled/disabled
>> during hwmod idle transition based on whether wakeup_flag is
>> set or cleared.
>>
>> Map the enable/disable pad wakeup API's to hwmod_wakeup_enable/disable.
>>
>> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
>> ---
>>  arch/arm/mach-omap2/omap_hwmod.c |   59 ++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 59 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
>> index 293fa6c..3b28e0a 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>> @@ -1770,6 +1770,34 @@ static int __init omap_hwmod_setup_all(void)
>>  core_initcall(omap_hwmod_setup_all);
>>  
>>  /**
>> + * omap_hwmod_set_ioring_wakeup - enable io pad wakeup flag.
>> + * @oh: struct omap_hwmod *
>> + * @set: bool value indicating to set or clear wakeup status.
>> + *
>> + * Set or Clear wakeup flag for the io_pad.
>> + */
>> +static int omap_hwmod_set_ioring_wakeup(struct omap_hwmod *oh, bool set_wake)
>> +{
>> +	struct omap_device_pad *pad;
>> +	int ret = -EINVAL, j;
>> +
>> +	if (oh->mux && oh->mux->enabled) {
>> +		for (j = 0; j < oh->mux->nr_pads_dynamic; j++) {
>> +			pad = oh->mux->pads_dynamic[j];
>> +			if (pad->flags & OMAP_DEVICE_PAD_WAKEUP) {
>> +				if (set_wake)
>> +					pad->idle |= OMAP_WAKEUP_EN;
>> +				else
>> +					pad->idle &= ~OMAP_WAKEUP_EN;
> Will this not erase the other bits ?
> Should we read and erase only the wakeup  bits.
> Am I missing something ?
My bad please ignore
>> +				ret = 0;
>> +			}
>> +		}
>> +	}
>> +
>> +	return ret;
>> +}
>> +
>> +/**
>>   * omap_hwmod_enable - enable an omap_hwmod
>>   * @oh: struct omap_hwmod *
>>   *
>> @@ -2097,6 +2125,35 @@ int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
>>  {
>>  	return _del_initiator_dep(oh, init_oh);
>>  }
>> +/**
>> + * omap_hwmod_enable_ioring_wakeup - Set wakeup flag for iopad.
>> + * @oh: struct omap_hwmod *
>> + *
>> + * Traverse through dynamic pads, if pad is enabled then
>> + * set wakeup enable bit flag for the mux pin. Wakeup pad bit
>> + * will be set during hwmod idle transistion.
>> + * Return error if pads are not enabled or not available.
>> + */
>> +int omap_hwmod_enable_ioring_wakeup(struct omap_hwmod *oh)
>> +{
>> +	/* Enable pad wake-up capability */
>> +	return omap_hwmod_set_ioring_wakeup(oh, true);
>> +}
>> +
>> +/**
>> + * omap_hwmod_disable_ioring_wakeup - Clear wakeup flag for iopad.
>> + * @oh: struct omap_hwmod *
>> + *
>> + * Traverse through dynamic pads, if pad is enabled then
>> + * clear wakeup enable bit flag for the mux pin. Wakeup pad bit
>> + * will be set during hwmod idle transistion.
>> + * Return error if pads are not enabled or not available.
>> + */
>> +int omap_hwmod_disable_ioring_wakeup(struct omap_hwmod *oh)
>> +{
>> +	/* Disable pad wakeup capability */
>> +	return omap_hwmod_set_ioring_wakeup(oh, false);
>> +}
>>  
>>  /**
>>   * omap_hwmod_enable_wakeup - allow device to wake up the system
>> @@ -2123,6 +2180,7 @@ int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
>>  	v = oh->_sysc_cache;
>>  	_enable_wakeup(oh, &v);
>>  	_write_sysconfig(v, oh);
>> +	omap_hwmod_enable_ioring_wakeup(oh);
>>  	spin_unlock_irqrestore(&oh->_lock, flags);
>>  
>>  	return 0;
>> @@ -2153,6 +2211,7 @@ int omap_hwmod_disable_wakeup(struct omap_hwmod *oh)
>>  	v = oh->_sysc_cache;
>>  	_disable_wakeup(oh, &v);
>>  	_write_sysconfig(v, oh);
>> +	omap_hwmod_disable_ioring_wakeup(oh);
>>  	spin_unlock_irqrestore(&oh->_lock, flags);
>>  
>>  	return 0;


WARNING: multiple messages have this Message-ID (diff)
From: shubhrajyoti@ti.com (Shubhrajyoti)
To: linux-arm-kernel@lists.infradead.org
Subject: [REPOST PATCH 1/2 v4] OMAP2+: hwmod: Add API to enable IO ring wakeup.
Date: Mon, 14 Nov 2011 18:24:29 +0530	[thread overview]
Message-ID: <4EC10F85.8080407@ti.com> (raw)
In-Reply-To: <4EC0FF2D.5040006@ti.com>

On Monday 14 November 2011 05:14 PM, Shubhrajyoti wrote:
> On Monday 04 July 2011 10:25 AM, Govindraj.R wrote:
>> Add API to enable IO pad wakeup capability based on mux dynamic pad and
>> wake_up enable flag available from hwmod_mux initialization.
>>
>> Use the wakeup_enable flag and enable wakeup capability
>> for the given pads. Wakeup capability will be enabled/disabled
>> during hwmod idle transition based on whether wakeup_flag is
>> set or cleared.
>>
>> Map the enable/disable pad wakeup API's to hwmod_wakeup_enable/disable.
>>
>> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
>> ---
>>  arch/arm/mach-omap2/omap_hwmod.c |   59 ++++++++++++++++++++++++++++++++++++++
>>  1 files changed, 59 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
>> index 293fa6c..3b28e0a 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>> @@ -1770,6 +1770,34 @@ static int __init omap_hwmod_setup_all(void)
>>  core_initcall(omap_hwmod_setup_all);
>>  
>>  /**
>> + * omap_hwmod_set_ioring_wakeup - enable io pad wakeup flag.
>> + * @oh: struct omap_hwmod *
>> + * @set: bool value indicating to set or clear wakeup status.
>> + *
>> + * Set or Clear wakeup flag for the io_pad.
>> + */
>> +static int omap_hwmod_set_ioring_wakeup(struct omap_hwmod *oh, bool set_wake)
>> +{
>> +	struct omap_device_pad *pad;
>> +	int ret = -EINVAL, j;
>> +
>> +	if (oh->mux && oh->mux->enabled) {
>> +		for (j = 0; j < oh->mux->nr_pads_dynamic; j++) {
>> +			pad = oh->mux->pads_dynamic[j];
>> +			if (pad->flags & OMAP_DEVICE_PAD_WAKEUP) {
>> +				if (set_wake)
>> +					pad->idle |= OMAP_WAKEUP_EN;
>> +				else
>> +					pad->idle &= ~OMAP_WAKEUP_EN;
> Will this not erase the other bits ?
> Should we read and erase only the wakeup  bits.
> Am I missing something ?
My bad please ignore
>> +				ret = 0;
>> +			}
>> +		}
>> +	}
>> +
>> +	return ret;
>> +}
>> +
>> +/**
>>   * omap_hwmod_enable - enable an omap_hwmod
>>   * @oh: struct omap_hwmod *
>>   *
>> @@ -2097,6 +2125,35 @@ int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
>>  {
>>  	return _del_initiator_dep(oh, init_oh);
>>  }
>> +/**
>> + * omap_hwmod_enable_ioring_wakeup - Set wakeup flag for iopad.
>> + * @oh: struct omap_hwmod *
>> + *
>> + * Traverse through dynamic pads, if pad is enabled then
>> + * set wakeup enable bit flag for the mux pin. Wakeup pad bit
>> + * will be set during hwmod idle transistion.
>> + * Return error if pads are not enabled or not available.
>> + */
>> +int omap_hwmod_enable_ioring_wakeup(struct omap_hwmod *oh)
>> +{
>> +	/* Enable pad wake-up capability */
>> +	return omap_hwmod_set_ioring_wakeup(oh, true);
>> +}
>> +
>> +/**
>> + * omap_hwmod_disable_ioring_wakeup - Clear wakeup flag for iopad.
>> + * @oh: struct omap_hwmod *
>> + *
>> + * Traverse through dynamic pads, if pad is enabled then
>> + * clear wakeup enable bit flag for the mux pin. Wakeup pad bit
>> + * will be set during hwmod idle transistion.
>> + * Return error if pads are not enabled or not available.
>> + */
>> +int omap_hwmod_disable_ioring_wakeup(struct omap_hwmod *oh)
>> +{
>> +	/* Disable pad wakeup capability */
>> +	return omap_hwmod_set_ioring_wakeup(oh, false);
>> +}
>>  
>>  /**
>>   * omap_hwmod_enable_wakeup - allow device to wake up the system
>> @@ -2123,6 +2180,7 @@ int omap_hwmod_enable_wakeup(struct omap_hwmod *oh)
>>  	v = oh->_sysc_cache;
>>  	_enable_wakeup(oh, &v);
>>  	_write_sysconfig(v, oh);
>> +	omap_hwmod_enable_ioring_wakeup(oh);
>>  	spin_unlock_irqrestore(&oh->_lock, flags);
>>  
>>  	return 0;
>> @@ -2153,6 +2211,7 @@ int omap_hwmod_disable_wakeup(struct omap_hwmod *oh)
>>  	v = oh->_sysc_cache;
>>  	_disable_wakeup(oh, &v);
>>  	_write_sysconfig(v, oh);
>> +	omap_hwmod_disable_ioring_wakeup(oh);
>>  	spin_unlock_irqrestore(&oh->_lock, flags);
>>  
>>  	return 0;

  reply	other threads:[~2011-11-14 12:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02 10:52 [PATCH 0/2 v4] OMAP2+: hwmod: Add hwmod's API's for pad wakeup Govindraj.R
2011-07-02 10:52 ` Govindraj.R
2011-07-02 10:52 ` [PATCH 1/2 v4] OMAP2+: hwmod: Add API to enable IO ring wakeup Govindraj.R
2011-07-02 10:52   ` Govindraj.R
2011-07-04  4:55   ` [REPOST PATCH " Govindraj.R
2011-07-04  4:55     ` Govindraj.R
2011-11-14 11:44     ` Shubhrajyoti
2011-11-14 11:44       ` Shubhrajyoti
2011-11-14 12:54       ` Shubhrajyoti [this message]
2011-11-14 12:54         ` Shubhrajyoti
2011-07-02 10:52 ` [PATCH 2/2 v4] OMAP2+: hwmod: Add API to check IO PAD wakeup status Govindraj.R
2011-07-02 10:52   ` Govindraj.R
2011-07-02 16:37   ` Paul Walmsley
2011-07-02 16:37     ` Paul Walmsley
2011-07-04  5:08     ` Govindraj
2011-07-04  5:08       ` Govindraj
2011-07-04  4:58   ` [REPOST PATCH " Govindraj.R
2011-07-04  4:58     ` Govindraj.R
2011-07-04  5:02   ` Govindraj.R
2011-07-04  5:02     ` Govindraj.R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EC10F85.8080407@ti.com \
    --to=shubhrajyoti@ti.com \
    --cc=govindraj.raja@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.