linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: OMAP3: PM: fix I/O wakeup and I/O chain clock control detection
Date: Thu, 6 Oct 2011 23:29:12 +0100	[thread overview]
Message-ID: <20111006222912.GA27281@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.DEB.2.00.1110061346570.4611@utopia.booyaka.com>

On Thu, Oct 06, 2011 at 01:47:22PM -0600, Paul Walmsley wrote:
> +	if ((omap_rev() == OMAP3430_REV_ES3_1 ||
> +	     omap_rev() == OMAP3430_REV_ES3_1_2) ||
> +	    cpu_is_omap3630())
> +		omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;

	(a || b) || c === a || b || c

IOW, no need for the additional parens.

> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 7255d9b..a6156bd 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -99,31 +99,28 @@ static void omap3_enable_io_chain(void)
>  {
>  	int timeout = 0;
>  
> -	if (omap_rev() >= OMAP3430_REV_ES3_1) {
> -		omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
> -				     PM_WKEN);
> -		/* Do a readback to assure write has been done */
> -		omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
> -
> -		while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
> -			 OMAP3430_ST_IO_CHAIN_MASK)) {
> -			timeout++;
> -			if (timeout > 1000) {
> -				printk(KERN_ERR "Wake up daisy chain "
> -				       "activation failed.\n");
> -				return;
> -			}
> -			omap2_prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
> -					     WKUP_MOD, PM_WKEN);
> +	omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
> +				   PM_WKEN);
> +	/* Do a readback to assure write has been done */
> +	omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
> +
> +	while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
> +		 OMAP3430_ST_IO_CHAIN_MASK)) {
> +		timeout++;
> +		if (timeout > 1000) {
> +			printk(KERN_ERR "Wake up daisy chain "
> +			       "activation failed.\n");
> +			return;
>  		}
> +		omap2_prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
> +					   WKUP_MOD, PM_WKEN);
>  	}

This should've been caught before.  Two things:

1. Do you know how long it takes this to time out?
2. Don't wrap error printks, it prevents them being grepped for.

  parent reply	other threads:[~2011-10-06 22:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 19:11 [PATCH] ARM: OMAP3: PM: fix I/O wakeup and I/O chain clock control detection Paul Walmsley
2011-10-06 19:42 ` Steve Sakoman
2011-10-06 19:46   ` Paul Walmsley
2011-10-06 19:47   ` [PATCH v2] " Paul Walmsley
2011-10-06 21:22     ` Steve Sakoman
2011-10-06 21:25       ` [PATCH v3] " Paul Walmsley
2011-10-06 23:46         ` Kevin Hilman
2011-10-06 22:29     ` Russell King - ARM Linux [this message]
2011-10-06 23:07       ` [PATCH v2] " Paul Walmsley
2011-10-06 23:18       ` [PATCH v3] " Paul Walmsley
2011-10-07 20:40         ` Kevin Hilman

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=20111006222912.GA27281@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 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).