linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: CSR: Adding CSR SiRFprimaII board support
Date: Mon, 4 Jul 2011 16:53:50 +0200	[thread overview]
Message-ID: <201107041653.50962.arnd@arndb.de> (raw)
In-Reply-To: <CAGsJ_4yHrYRQKO7tMeJhjj_aEhV69xnJSZzuHhq8hnBrmnG+dg@mail.gmail.com>

On Monday 04 July 2011, Barry Song wrote:
> Great idea. in fact there is only one reset bit for every device. So
> maybe the rstc.c can be
> ...

Yes, looks good.

>         /*
>          * Writing 1 to this bit resets corresponding block.
>          * Writing 0 to this bit de-asserts reset signal of
>          * the corresponding block.
>          */
>         writel(sirfsoc_rstc_base + (reset_bit / 32) * 4,
>                 readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) | reset_bit);
>         msleep(10);
>         writel(sirfsoc_rstc_base + (reset_bit / 32) * 4,
>                 readl(sirfsoc_rstc_base + (reset_bit / 32) * 4) & ~reset_bit);

One remark about the msleep here: I find arbitrary wait periods a
bit unclean, and most hardware allows you to poll whether it's
done by reading back the register you have just written.

If your hardware can do that, you can replace the msleep() with a
single readl or a readl()/msleep(1) loop?

	Arnd

  reply	other threads:[~2011-07-04 14:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28  3:32 [PATCH v2] ARM: CSR: Adding CSR SiRFprimaII board support Barry Song
2011-06-29 21:29 ` Arnd Bergmann
2011-06-30  3:39   ` Barry Song
2011-06-30  7:19   ` Barry Song
2011-06-30 10:36     ` Arnd Bergmann
2011-06-30 15:03       ` Rob Herring
2011-07-01  0:04       ` Barry Song
2011-07-01 16:26         ` Arnd Bergmann
2011-07-04 14:59         ` Grant Likely
2011-07-01  6:20       ` Barry Song
2011-07-01 16:19         ` Arnd Bergmann
2011-07-02 12:25           ` Russell King - ARM Linux
2011-07-02 19:34             ` Arnd Bergmann
2011-07-04  2:55           ` Barry Song
2011-07-04 14:53             ` Arnd Bergmann [this message]
2011-07-05  1:32               ` Barry Song
2011-07-05 11:10                 ` Arnd Bergmann
2011-07-05  8:34         ` Barry Song
2011-07-06  2:10           ` Barry Song
2011-07-06  5:30           ` Grant Likely
2011-07-06  5:58             ` Barry Song
2011-07-06  6:01               ` Barry Song
2011-07-06  6:28                 ` Grant Likely
2011-07-06  7:03                   ` Barry Song
2011-07-06  7:40                     ` Arnd Bergmann

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=201107041653.50962.arnd@arndb.de \
    --to=arnd@arndb.de \
    --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).