public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Anna, Suman" <s-anna@ti.com>
Cc: "Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Hiroshi.DOYU@nokia.com" <Hiroshi.DOYU@nokia.com>,
	"Clark, Rob" <rob@ti.com>, "Kanigeri, Hari" <h-kanigeri2@ti.com>,
	"C.A, Subramaniam" <subramaniam.ca@ti.com>
Subject: Re: [PATCH 2/5] omap: mailbox: correct OMAP4 reset logic
Date: Mon, 22 Feb 2010 13:38:13 -0800	[thread overview]
Message-ID: <20100222213813.GV18786@atomide.com> (raw)
In-Reply-To: <20100222201547.GR18786@atomide.com>

* Tony Lindgren <tony@atomide.com> [100222 12:11]:
> * Anna, Suman <s-anna@ti.com> [100222 12:04]:
> > Hi Santosh,
> > 
> > > -----Original Message-----
> > > From: Shilimkar, Santosh
> > > Sent: Saturday, February 20, 2010 12:53 PM
> > > To: Anna, Suman; linux-omap@vger.kernel.org
> > > Cc: Hiroshi.DOYU@nokia.com; Clark, Rob; Kanigeri, Hari; C.A, Subramaniam
> > > Subject: RE: [PATCH 2/5] omap: mailbox: correct OMAP4 reset logic
> > > 
> > > > -----Original Message-----
> > > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > > owner@vger.kernel.org] On Behalf Of Anna,
> > > > Suman
> > > > Sent: Friday, February 19, 2010 2:37 AM
> > > > To: linux-omap@vger.kernel.org
> > > > Cc: Hiroshi.DOYU@nokia.com; Clark, Rob; Kanigeri, Hari; C.A, Subramaniam
> > > > Subject: [PATCH 2/5] omap: mailbox: correct OMAP4 reset logic
> > > >
> > > > From 2488815a9facca29e2da3ddd279de441a5de6a58 Mon Sep 17 00:00:00 2001
> > > > From: Suman Anna <s-anna@ti.com>
> > > > Date: Tue, 26 Jan 2010 16:55:29 -0600
> > > > Subject: [PATCH 2/5] omap: mailbox: correct OMAP4 reset logic
> > > >
> > > > OMAP4 mailbox has a different register set. There is
> > > > no MAILBOX_SYSSTATUS register. The reset is indicated
> > > > with the SOFTRESET bit of the MAILBOX_SYSCONFIG register
> > > > itself. This bit should read 0 for a successful Reset.
> > > > Also, the SOFTRESET bit occupies bit0 and not bit1 as with
> > > > previous generations.
> > > >
> > > > Signed-off-by: Suman Anna <s-anna@ti.com>
> > > > ---
> > > >  arch/arm/mach-omap2/mailbox.c |   38 +++++++++++++++++++++++++++-------
> > > ----
> > > >  1 files changed, 27 insertions(+), 11 deletions(-)
> > > >
> > > > diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-
> > > omap2/mailbox.c
> > > > index c970cf6..88e9043 100644
> > > > --- a/arch/arm/mach-omap2/mailbox.c
> > > > +++ b/arch/arm/mach-omap2/mailbox.c
> > > > @@ -40,6 +40,7 @@
> > > >  #define AUTOIDLE	(1 << 0)
> > > >  #define SOFTRESET	(1 << 1)
> > > >  #define SMARTIDLE	(2 << 3)
> > > > +#define OMAP4_SOFTRESET	(1 << 0)
> > > >
> > > >  /* SYSSTATUS: register bit definition */
> > > >  #define RESETDONE	(1 << 0)
> > > > @@ -99,17 +100,32 @@ static int omap2_mbox_startup(struct omap_mbox
> > > *mbox)
> > > >  	}
> > > >  	clk_enable(mbox_ick_handle);
> > > >
> > > > -	mbox_write_reg(SOFTRESET, MAILBOX_SYSCONFIG);
> > > > -	timeout = jiffies + msecs_to_jiffies(20);
> > > > -	do {
> > > > -		l = mbox_read_reg(MAILBOX_SYSSTATUS);
> > > > -		if (l & RESETDONE)
> > > > -			break;
> > > > -	} while (!time_after(jiffies, timeout));
> > > > -
> > > > -	if (!(l & RESETDONE)) {
> > > > -		pr_err("Can't take mmu out of reset\n");
> > > > -		return -ENODEV;
> > > > +	if (cpu_is_omap44xx()) {
> > > Not so strong opinion but can we make use of mailbox ip revision instead
> > > of cpu_is_xxxx() check.
> > > 
> > 
> > This may be a better option in the longer-run, but the current mailbox registers are assigned based on the cpu_is_xxxx() macro, and I have used this readily available macro rather doing a new one. Also, note that the IP revision value is not published in the TRM.
> 
> In the long run the most flexible option is to check the revision
> for each device during init.
> 
> Anyways, sounds like that's another patch on top of these patches.

As we probably won't have the hwmod patch done for this merge window,
I've added these except for the one to fix compile warning.

Regards,

Tony

  reply	other threads:[~2010-02-22 21:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 21:07 [PATCH 2/5] omap: mailbox: correct OMAP4 reset logic Anna, Suman
2010-02-20 18:53 ` Shilimkar, Santosh
2010-02-22 20:07   ` Anna, Suman
2010-02-22 20:15     ` Tony Lindgren
2010-02-22 21:38       ` Tony Lindgren [this message]
     [not found]   ` <7E59F0E987E71F40A4E30590884852DC01725109D4@dnce01.ent.ti.com>
2010-02-22 20:14     ` Anna, Suman

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=20100222213813.GV18786@atomide.com \
    --to=tony@atomide.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=h-kanigeri2@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob@ti.com \
    --cc=s-anna@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=subramaniam.ca@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox