Hi Shimoda-san, On Wed, Dec 12, 2018 at 11:22 AM Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> wrote: > From: Takeshi Kihara <takeshi.kihara.df@xxxxxxxxxxx> > 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@xxxxxxxxxxx> > 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@xxxxxxxxxxx> 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@xxxxxxxxxxxxxx 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