linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/3] [POWERPC] FSL UPM: routines to manage FSL UPMs
Date: Sun, 23 Dec 2007 14:59:35 +0300	[thread overview]
Message-ID: <20071223115935.GB5643@zarina> (raw)
In-Reply-To: <20071223132457.a40e8100.sfr@canb.auug.org.au>

On Sun, Dec 23, 2007 at 01:24:57PM +1100, Stephen Rothwell wrote:
> On Fri, 21 Dec 2007 23:39:25 +0300 Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> >
> > +int fsl_upm_get_for(struct device_node *node, const char *name,
> > +		    struct fsl_upm *upm)
> > +{
> > +	int ret;
> > +	struct device_node *lbus;
> > +	struct resource lbc_res;
> > +	ptrdiff_t mxmr_offs;
> > +
> > +	lbus = of_get_parent(node);
> > +	if (!lbus) {
> > +		pr_err("FSL UPM: can't get parent local bus node\n");
> > +		return -ENOENT;
> > +	}
> > +
> > +	ret = of_address_to_resource(lbus, 0, &lbc_res);
> 
> of_node_put(lbus) as of_get_parent() gets a reference.

Thanks, will fix.

> > +static inline void fsl_upm_start_pattern(struct fsl_upm *upm, u32 pat_offset)
> > +{
> > +	spin_lock_irqsave(&upm_lock, upm_lock_flags);
> 
> I may be wrong, but don't we need the "flags" argument to
> spin_lock_irqsave to be on the stack?  And the save and restore to be in
> the same function?

In general case, yes. Here, not exactly. We have to grab a lock at the
start(), do runs(), and release a lock at the end():

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

  reply	other threads:[~2007-12-23 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21 20:35 [PATCH 0/3] fsl upm, nand driver and MPC8360E-RDK as its first user Anton Vorontsov
2007-12-21 20:39 ` [PATCH 1/3] [POWERPC] FSL UPM: routines to manage FSL UPMs Anton Vorontsov
2007-12-21 21:28   ` Olof Johansson
2007-12-23  2:24   ` Stephen Rothwell
2007-12-23 11:59     ` Anton Vorontsov [this message]
2007-12-23 12:17       ` Anton Vorontsov
2007-12-23 12:25         ` Anton Vorontsov
2007-12-21 20:41 ` [PATCH 2/3] [POWERPC][NAND] FSL UPM NAND driver Anton Vorontsov
2007-12-23  2:33   ` Stephen Rothwell
2007-12-23 12:02     ` Anton Vorontsov
2007-12-21 20:41 ` [PATCH 3/3] [POWERPC] MPC8360E-RDK: add support for NAND on UPM Anton Vorontsov

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=20071223115935.GB5643@zarina \
    --to=cbouatmailru@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /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).