pinctrl: sh-pfc: Add PORT_GP_{10,2[01]} helper macros
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 9 Aug 2017 12:19:40 +0000 (21:19 +0900)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 16 Aug 2017 12:26:30 +0000 (14:26 +0200)
This follows the style of existion PORT_GP_X macros and
will be used by a follow-up patch for the r8a77995 SoC.

Extracted from the initial r8a77995 patch in the BSP by Takeshi Kihara.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/sh-pfc/sh_pfc.h

index 4376397123de8a4832f01bfd3b5e2ecf417c03aa..89e77e59a3dc71840d13657939ff918442a6bb3e 100644 (file)
@@ -389,9 +389,13 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;
        PORT_GP_CFG_1(bank, 8,  fn, sfx, cfg)
 #define PORT_GP_9(bank, fn, sfx)       PORT_GP_CFG_9(bank, fn, sfx, 0)
 
-#define PORT_GP_CFG_12(bank, fn, sfx, cfg)                             \
+#define PORT_GP_CFG_10(bank, fn, sfx, cfg)                             \
        PORT_GP_CFG_9(bank, fn, sfx, cfg),                              \
-       PORT_GP_CFG_1(bank, 9,  fn, sfx, cfg),                          \
+       PORT_GP_CFG_1(bank, 9,  fn, sfx, cfg)
+#define PORT_GP_10(bank, fn, sfx)      PORT_GP_CFG_10(bank, fn, sfx, 0)
+
+#define PORT_GP_CFG_12(bank, fn, sfx, cfg)                             \
+       PORT_GP_CFG_10(bank, fn, sfx, cfg),                             \
        PORT_GP_CFG_1(bank, 10, fn, sfx, cfg),                          \
        PORT_GP_CFG_1(bank, 11, fn, sfx, cfg)
 #define PORT_GP_12(bank, fn, sfx)      PORT_GP_CFG_12(bank, fn, sfx, 0)
@@ -422,11 +426,19 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;
        PORT_GP_CFG_1(bank, 17, fn, sfx, cfg)
 #define PORT_GP_18(bank, fn, sfx)      PORT_GP_CFG_18(bank, fn, sfx, 0)
 
-#define PORT_GP_CFG_23(bank, fn, sfx, cfg)                             \
+#define PORT_GP_CFG_20(bank, fn, sfx, cfg)                             \
        PORT_GP_CFG_18(bank, fn, sfx, cfg),                             \
        PORT_GP_CFG_1(bank, 18, fn, sfx, cfg),                          \
-       PORT_GP_CFG_1(bank, 19, fn, sfx, cfg),                          \
-       PORT_GP_CFG_1(bank, 20, fn, sfx, cfg),                          \
+       PORT_GP_CFG_1(bank, 19, fn, sfx, cfg)
+#define PORT_GP_20(bank, fn, sfx)      PORT_GP_CFG_20(bank, fn, sfx, 0)
+
+#define PORT_GP_CFG_21(bank, fn, sfx, cfg)                             \
+       PORT_GP_CFG_20(bank, fn, sfx, cfg),                             \
+       PORT_GP_CFG_1(bank, 20, fn, sfx, cfg)
+#define PORT_GP_21(bank, fn, sfx)      PORT_GP_CFG_21(bank, fn, sfx, 0)
+
+#define PORT_GP_CFG_23(bank, fn, sfx, cfg)                             \
+       PORT_GP_CFG_21(bank, fn, sfx, cfg),                             \
        PORT_GP_CFG_1(bank, 21, fn, sfx, cfg),                          \
        PORT_GP_CFG_1(bank, 22, fn, sfx, cfg)
 #define PORT_GP_23(bank, fn, sfx)      PORT_GP_CFG_23(bank, fn, sfx, 0)