public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: LW@KARO-electronics.de (Lothar Waßmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] collie: don't read GPSR
Date: Fri, 17 Jun 2011 16:49:31 +0200	[thread overview]
Message-ID: <19963.27003.636701.332500@ipc1.ka-ro> (raw)
In-Reply-To: <1308319892-13057-1-git-send-email-dbaryshkov@gmail.com>

Hi,

Dmitry Eremin-Solenikov writes:
> On StrongARM GPSR is write-only according to docs, so don't read from
> it. Just set the required GPIO.
> 
Anyway GPSR (and GPCR) is a bit oriented register that allows
asserting individual bits without the need for read-modify-write
cycles, making the access inherently multithread safe. Using
read-modify-write on this register is contrary to the HW design.

A quick grep of the kernel source shows another abuse like this in
drivers/video/sa1100fb.c:             GPSR |= SHANNON_GPIO_DISP_EN;
drivers/video/sa1100fb.c:             GPCR |= SHANNON_GPIO_DISP_EN;


Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

  reply	other threads:[~2011-06-17 14:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17 14:11 [PATCH] collie: don't read GPSR Dmitry Eremin-Solenikov
2011-06-17 14:49 ` Lothar Waßmann [this message]
2011-06-17 15:07 ` Eric Miao
2011-06-17 15:35   ` Dmitry Eremin-Solenikov

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=19963.27003.636701.332500@ipc1.ka-ro \
    --to=lw@karo-electronics.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