All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org,
	linux-wireless@vger.kernel.org, florian@openwrt.org,
	zajec5@gmail.com, m@bues.ch
Subject: Re: [PATCH 1/8] bcma: add locking around GPIO register accesses
Date: Tue, 20 Nov 2012 09:10:39 +0100	[thread overview]
Message-ID: <50AB3AFF.2000001@phrozen.org> (raw)
In-Reply-To: <1353365877-11131-2-git-send-email-hauke@hauke-m.de>

Hi Hauke

> u32 bcma_chipco_gpio_in(struct bcma_drv_cc *cc, u32 mask)
>   {
> -	return bcma_cc_read32(cc, BCMA_CC_GPIOIN)&  mask;
> +	unsigned long flags;
> +	u32 res;
> +
> +	spin_lock_irqsave(&cc->gpio_lock, flags);
> +	res = bcma_cc_read32(cc, BCMA_CC_GPIOIN)&  mask;
> +	spin_unlock_irqrestore(&cc->gpio_lock, flags);
> +
> +	return res;
>   }
>

Hi Hauke,

do you need to lock the read access ?

if bcma_cc_read32() is a simple memory read wrapper you most likely wont 
need the lock

	John

  reply	other threads:[~2012-11-20  8:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 22:57 [PATCH 0/8] bcma/ssb/BCM47XX: add GPIO driver to ssb/bcma Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 1/8] bcma: add locking around GPIO register accesses Hauke Mehrtens
2012-11-20  8:10   ` John Crispin [this message]
2012-11-20 21:05     ` Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 2/8] bcma: add bcma_chipco_gpio_pull{up,down} Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 3/8] bcma: add comment to bcma_chipco_gpio_control Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 4/8] bcma: add GPIO driver Hauke Mehrtens
2012-11-20  9:42   ` Florian Fainelli
2012-11-20 22:32     ` Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 5/8] ssb: add ssb_chipco_gpio_pull{up,down} Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 6/8] ssb: add locking around gpio register accesses Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 7/8] ssb: add GPIO driver Hauke Mehrtens
2012-11-19 23:18   ` [PATCH v2 " Hauke Mehrtens
2012-11-20  8:12   ` [PATCH " John Crispin
2012-11-20 21:07     ` Hauke Mehrtens
2012-11-19 22:57 ` [PATCH 8/8] MIPS: BCM47XX: remove " Hauke Mehrtens
2012-11-20  9:44   ` Florian Fainelli

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=50AB3AFF.2000001@phrozen.org \
    --to=john@phrozen.org \
    --cc=florian@openwrt.org \
    --cc=hauke@hauke-m.de \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=m@bues.ch \
    --cc=ralf@linux-mips.org \
    --cc=zajec5@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.