Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1722958
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andrew Jeffery <andrew@aj.id.au> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] pinctrl: aspeed: Rework strap register write logic for the AST2500 |
| Date | Wed, 30 Aug 2017 03:40:01 +0200 |
| Message-ID | <uk093-1O2-1@gated-at.bofh.it> (permalink) |
| References | <uhEcH-1bd-33@gated-at.bofh.it> |
| X-Original-To | linux-gpio@vger.kernel.org |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=T76GuraHOWA6B80wr0vFJnOFRj3WFGpHyXvbG/vNb +E=; b=E8ev2/DHMnjSaa8nxz4vXLDLx0lHUDAMNwehLc7ykd0/7Cw/1PQgyD0sx /LhRaDNhSe+shdfD4aCW7e7ltMK1axz8evuPOcU/J5AX7Uh167ty9D67+rLep6pJ 7dobTavs2pJMrffwtvObx4tD/LTlqs0LfM1QHvIcPQbGGygzoLoSwBGnwlF3Gjlp YyRWoqUTe4nk5+lKPdFXi1zA1EBWINMV0LcSLCeuXzEIFjP5T6B6eEi7lU+kgrw8 znfxye3kZY7JjrZLpQKUldxyWhtq3S6Lm8TW68xKxw01SdfMTOIdG/RV7XELuzJc IlIr1tPnSBuPjYXa/Uu6ESU9xmBLw== |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=T76GuraHOWA6B80wr0 vFJnOFRj3WFGpHyXvbG/vNb+E=; b=RpDepL5QwSeHZHiJiSRekWWSceR0pHUgey C8noCHoXxB/xJvkOYaVb/HaT2kM9md4Uzl3ZWojiZZANmhy9EZyUPT+fY4pHcCZq jA1RwtiVqrXcAYOLJoEdJTmUL9e+C1wQnUO9dKBeAJF8gFOkwHFOQaqEBxNwto+r 9TUVXS9/J213b4DHX/mfJomqLHKSyXjZGvPpgy9J6RGtsH7DFG5urGJHVnPoXFGI HrBaJG15pzGU32+whmqdde8w1MuSrnywlozRp/wITIuRKb4SOb2OsuW+GM3ovwco pb0ohM6+DdLpfgdh55GQMmsXu1Ak5VF6EcRntVIAllAUi2AJfcXg== |
| X-Me-Sender | <xms:EBemWeIM73PYa1S0UALdwai1XhTdiYiq11wY7H2tSuky_x2ZSh5G0A> |
| X-Sasl-Enc | pZR08zipIv/NZJJUteWyffhk3vN1ZTid6uWYb9xf7y19 1504057103 |
| Content-Type | multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-9pakij4eImAE9b00LrnU" |
| X-Mailer | Evolution 3.22.6-1ubuntu1 |
| MIME-Version | 1.0 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 114 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linus.walleij@linaro.org, joel@jms.id.au, linux-kernel@vger.kernel.org, Yong Li <sdliyong@gmail.com> |
| X-Original-Date | Wed, 30 Aug 2017 11:08:16 +0930 |
| X-Original-Message-ID | <1504057096.5933.12.camel@aj.id.au> |
| X-Original-References | <20170823134125.2339-1-andrew@aj.id.au> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1722958 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
Hi Linus,
On Wed, 2017-08-23 at 23:11 +0930, Andrew Jeffery wrote:
> Yong Li found that writes to the AST2500 strapping register were not
> properly supported by the Aspeed pinctrl core and provided a patch to
> rectify the problem. Several revisions of the patch were posted and
> ultimately v4 should have been applied, however some unfortunate
> liberal application of tags on my part lead to confusion between v3[1]
> and v4[2].
>
> Generate the diff between v3 and v4 to apply as a fixup patch.
>
> [1] http://patchwork.ozlabs.org/patch/801662/
> [2] http://patchwork.ozlabs.org/patch/802946/
>
> > Cc: Yong Li <sdliyong@gmail.com>
> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Just wondering if you're going to pick this up? It's a fix for "1865af212dfa
pinctrl: aspeed: Fix ast2500 strap register write logic" in pinctrl/devel and
pinctrl/for-next.
Cheers,
Andrew
> ---
> drivers/pinctrl/aspeed/pinctrl-aspeed.c | 26 ++++++++++++++++----------
> 1 file changed, 16 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed.c b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
> index f2d5133f6993..7f13ce8450a3 100644
> --- a/drivers/pinctrl/aspeed/pinctrl-aspeed.c
> +++ b/drivers/pinctrl/aspeed/pinctrl-aspeed.c
> @@ -183,7 +183,6 @@ static int aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
> {
> > int ret;
> > int i;
> > - unsigned int rev_id;
>
> > for (i = 0; i < expr->ndescs; i++) {
> > const struct aspeed_sig_desc *desc = &expr->descs[i];
> @@ -216,20 +215,27 @@ static int aspeed_sig_expr_set(const struct aspeed_sig_expr *expr,
>
> > /* On AST2500, Set bits in SCU7C are cleared from SCU70 */
> > if (desc->ip == ASPEED_IP_SCU && desc->reg == HW_STRAP1) {
> > + unsigned int rev_id;
> +
> > ret = regmap_read(maps[ASPEED_IP_SCU],
> > HW_REVISION_ID, &rev_id);
> > if (ret < 0)
> > return ret;
>
> > - if (0x04 == ((rev_id >> 24) & 0xff))
> > - ret = regmap_write(maps[desc->ip],
> > - HW_REVISION_ID, (~val & desc->mask));
> > - else
> > - ret = regmap_update_bits(maps[desc->ip],
> > - desc->reg, desc->mask, val);
> > - } else
> > - ret = regmap_update_bits(maps[desc->ip], desc->reg,
> > - desc->mask, val);
> > + if (0x04 == (rev_id >> 24)) {
> > + u32 value = ~val & desc->mask;
> +
> > + if (value) {
> > + ret = regmap_write(maps[desc->ip],
> > + HW_REVISION_ID, value);
> > + if (ret < 0)
> > + return ret;
> > + }
> > + }
> > + }
> +
> > + ret = regmap_update_bits(maps[desc->ip], desc->reg,
> > + desc->mask, val);
>
> > if (ret)
> > return ret;
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] pinctrl: aspeed: Rework strap register write logic for the AST2500 Andrew Jeffery <andrew@aj.id.au> - 2017-08-30 03:40 +0200
csiph-web