From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
Linus Walleij <linus.walleij@linaro.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Takeshi Kihara <takeshi.kihara.df@renesas.com>
Subject: Re: [PATCH 1/2] pinctrl: sh-pfc: r8a77990: Fix MOD_SEL bit numbering
Date: Thu, 20 Dec 2018 15:05:57 +0100 [thread overview]
Message-ID: <CAMuHMdUCm9reHy-q5YkMpoQwyyt6pg9GghYTqSkNXpr+vyximA@mail.gmail.com> (raw)
In-Reply-To: <1544609975-26477-2-git-send-email-yoshihiro.shimoda.uh@renesas.com>
Hi Shimoda-san,
On Wed, Dec 12, 2018 at 11:22 AM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> MOD_SEL register bit numbering was different from R-Car E3 SoC and
> R-Car H3/M3-[WN] SoCs.
>
> MOD_SEL 1-bit H3/M3-[WN] E3
> =============== ========== =====
> Set Value = H'0 b'0 b'0
> Set Value = H'1 b'1 b'1
>
> MOD_SEL 2-bits H3/M3-[WN] E3
> =============== ========== =====
> Set Value = H'0 b'00 b'00
> Set Value = H'1 b'01 b'10
> Set Value = H'2 b'10 b'01
> Set Value = H'3 b'11 b'11
>
> MOD_SEL 3-bits H3/M3-[WN] E3
> =============== ========== =====
> Set Value = H'0 b'000 b'000
> Set Value = H'1 b'001 b'100
> Set Value = H'2 b'010 b'010
> Set Value = H'3 b'011 b'110
> Set Value = H'4 b'100 b'001
> Set Value = H'5 b'101 b'101
> Set Value = H'6 b'110 b'011
> Set Value = H'7 b'111 b'111
>
> This patch replaces the #define name and value of MOD_SEL.
>
> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
> Fixes: 6d4036a1e3b3 ("pinctrl: sh-pfc: Initial R8A77990 PFC support")
> [shimoda: split a patch per SoC and revise the commit log]
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thanks, this fixes HSCIF4(B) RX.
> --- a/drivers/pinctrl/sh-pfc/pfc-r8a77990.c
> +++ b/drivers/pinctrl/sh-pfc/pfc-r8a77990.c
> @@ -392,28 +392,28 @@
> FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM(IP15_31_28) IP15_31_28
>
> /* MOD_SEL0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */
> -#define MOD_SEL0_30_29 FM(SEL_ADGB_0) FM(SEL_ADGB_1) FM(SEL_ADGB_2) F_(0, 0)
> +#define MOD_SEL0_30_29 FM(SEL_ADGB_0) FM(SEL_ADGB_2) FM(SEL_ADGB_1) F_(0, 0)
As this is not a plain reversal, but reordering based on the reverse of
the binary value, I think this would be easier to read if you would use
a macro to do the reordering.
I sent a patch showing what I had in mind.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2018-12-20 14:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-12 10:19 [PATCH 0/2] pinctrl: sh-pfc: r8a7799[05]: Fix MOD_SEL bit numbering Yoshihiro Shimoda
2018-12-12 10:19 ` [PATCH 1/2] pinctrl: sh-pfc: r8a77990: " Yoshihiro Shimoda
2018-12-20 14:05 ` Geert Uytterhoeven [this message]
2018-12-12 10:19 ` [PATCH 2/2] pinctrl: sh-pfc: r8a77995: " Yoshihiro Shimoda
2018-12-13 13:52 ` Laurent Pinchart
2018-12-14 10:41 ` Yoshihiro Shimoda
2018-12-14 12:51 ` Laurent Pinchart
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=CAMuHMdUCm9reHy-q5YkMpoQwyyt6pg9GghYTqSkNXpr+vyximA@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=geert+renesas@glider.be \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=takeshi.kihara.df@renesas.com \
--cc=yoshihiro.shimoda.uh@renesas.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 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).