All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan O'Donovan <dan@emutex.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linus.walleij@linaro.org, heikki.krogerus@linux.intel.com,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH 4/5] pinctrl: cherryview: prevent concurrent access to GPIO controllers
Date: Thu, 9 Jun 2016 17:11:07 +0100	[thread overview]
Message-ID: <5759951B.5090209@emutex.com> (raw)
In-Reply-To: <20160606103124.GV1743@lahna.fi.intel.com>


On 06/06/2016 11:31 AM, Mika Westerberg wrote:
> On Thu, Jun 02, 2016 at 10:55:42PM +0100, Dan O'Donovan wrote:
>> Due to a silicon issue on the Atom X5-Z8000 "Cherry Trail" processor
>> series, a common lock must be used to prevent concurrent accesses
>> across the 4 GPIO controllers managed by this driver.
>>
>> See Intel Atom Z8000 Processor Series Specification Update
>> (Rev. 005), errata #CHT34, for further information.
>>
>> Signed-off-by: Dan O'Donovan <dan@emutex.com>
> This should be the first patch in the series. It should also be tagged
> for stable.
Makes sense.  I'll submit a new patch set to address this and other comments.  Thanks!
>
>> ---
>>  drivers/pinctrl/intel/pinctrl-cherryview.c | 84 ++++++++++++++++--------------
>>  1 file changed, 46 insertions(+), 38 deletions(-)
>>
>> diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
>> index 7df4b40..5064f93 100644
>> --- a/drivers/pinctrl/intel/pinctrl-cherryview.c
>> +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
>> @@ -160,7 +160,6 @@ struct chv_pin_context {
>>   * @pctldev: Pointer to the pin controller device
>>   * @chip: GPIO chip in this pin controller
>>   * @regs: MMIO registers
>> - * @lock: Lock to serialize register accesses
>>   * @intr_lines: Stores mapping between 16 HW interrupt wires and GPIO
>>   *		offset (in GPIO number space)
>>   * @community: Community this pinctrl instance represents
>> @@ -174,7 +173,6 @@ struct chv_pinctrl {
>>  	struct pinctrl_dev *pctldev;
>>  	struct gpio_chip chip;
>>  	void __iomem *regs;
>> -	raw_spinlock_t lock;
>>  	unsigned int intr_lines[16];
>>  	const struct chv_community *community;
>>  	u32 saved_intmask;
>> @@ -659,6 +657,17 @@ static const struct chv_community *chv_communities[] = {
>>  	&southeast_community,
>>  };
>>  
>> +/*
>> + * Lock to serialize register accesses
>> + *
>> + * Due to a silicon issue, a shared lock must be used to prevent
>> + * concurrent accesses across the 4 GPIO controllers.
>> + *
>> + * See Intel Atom Z8000 Processor Series Specification Update (Rev. 005),
>> + * errata #CHT34, for further information.
>> + */
>> +static DEFINE_RAW_SPINLOCK(chv_reg_lock);
> Can we call it chv_lock instead?
Ok
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2016-06-09 16:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 21:55 [PATCH 0/5] pinctrl: cherryview: fixes and enhancements Dan O'Donovan
2016-06-02 21:55 ` [PATCH 1/5] pinctrl: cherryview: convert bare unsigned to unsigned int Dan O'Donovan
2016-06-06 10:28   ` Mika Westerberg
2016-06-09 16:04     ` Dan O'Donovan
2016-06-02 21:55 ` [PATCH 2/5] pinctrl: cherryview: add option to set open-drain pin config Dan O'Donovan
2016-06-06 10:32   ` Mika Westerberg
2016-06-02 21:55 ` [PATCH 3/5] pinctrl: cherryview: add handlers for pin_config_group_get/set Dan O'Donovan
2016-06-02 21:55 ` [PATCH 4/5] pinctrl: cherryview: prevent concurrent access to GPIO controllers Dan O'Donovan
2016-06-06 10:31   ` Mika Westerberg
2016-06-09 16:11     ` Dan O'Donovan [this message]
2016-06-02 21:55 ` [PATCH 5/5] pinctrl: cherryview: restore padctrl1 reg when gpio is disabled Dan O'Donovan
2016-06-06 10:40   ` Mika Westerberg
2016-06-09 16:41     ` Dan O'Donovan
2016-06-10  6:00       ` Mika Westerberg
2016-06-10  8:43         ` Dan O'Donovan
2016-06-08  8:32 ` [PATCH 0/5] pinctrl: cherryview: fixes and enhancements Linus Walleij
2016-06-10 12:23 ` [PATCH v2 0/3] " Dan O'Donovan
2016-06-10 12:23   ` [PATCH v2 1/3] pinctrl: cherryview: prevent concurrent access to GPIO controllers Dan O'Donovan
2016-06-13 12:23     ` Linus Walleij
2016-06-13 12:30       ` Dan O'Donovan
2016-06-10 12:23   ` [PATCH v2 2/3] pinctrl: cherryview: add option to set open-drain pin config Dan O'Donovan
2016-06-13 12:25     ` Linus Walleij
2016-06-10 12:23   ` [PATCH v2 3/3] pinctrl: cherryview: add handlers for pin_config_group_get/set Dan O'Donovan
2016-06-13 12:26     ` Linus Walleij
2016-06-13  9:21   ` [PATCH v2 0/3] pinctrl: cherryview: fixes and enhancements Mika Westerberg

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=5759951B.5090209@emutex.com \
    --to=dan@emutex.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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.