Commit 8d3b2e3d authored by Biju Das's avatar Biju Das Committed by Geert Uytterhoeven

pinctrl: renesas: r8a7791: Optimize pinctrl image size for R8A774[34]

This driver supports both RZ/G1[MN] and R-Car M2-W/M2-N SoCs.
Optimize pinctrl image size for RZ/G1[MN], when support for R-Car
M2-W/M2-N (R8A779[13]) is not enabled.
Signed-off-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20201019124258.4574-7-biju.das.jz@bp.renesas.comSigned-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 529b8eec
...@@ -1700,6 +1700,7 @@ static const struct sh_pfc_pin pinmux_pins[] = { ...@@ -1700,6 +1700,7 @@ static const struct sh_pfc_pin pinmux_pins[] = {
PINMUX_GPIO_GP_ALL(), PINMUX_GPIO_GP_ALL(),
}; };
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
/* - ADI -------------------------------------------------------------------- */ /* - ADI -------------------------------------------------------------------- */
static const unsigned int adi_common_pins[] = { static const unsigned int adi_common_pins[] = {
/* ADIDATA, ADICS/SAMP, ADICLK */ /* ADIDATA, ADICS/SAMP, ADICLK */
...@@ -1765,6 +1766,7 @@ static const unsigned int adi_chsel2_b_mux[] = { ...@@ -1765,6 +1766,7 @@ static const unsigned int adi_chsel2_b_mux[] = {
/* ADICHS B 2 */ /* ADICHS B 2 */
ADICHS2_B_MARK, ADICHS2_B_MARK,
}; };
#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */
/* - Audio Clock ------------------------------------------------------------ */ /* - Audio Clock ------------------------------------------------------------ */
static const unsigned int audio_clk_a_pins[] = { static const unsigned int audio_clk_a_pins[] = {
...@@ -2553,6 +2555,8 @@ static const unsigned int intc_irq3_pins[] = { ...@@ -2553,6 +2555,8 @@ static const unsigned int intc_irq3_pins[] = {
static const unsigned int intc_irq3_mux[] = { static const unsigned int intc_irq3_mux[] = {
IRQ3_MARK, IRQ3_MARK,
}; };
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
/* - MLB+ ------------------------------------------------------------------- */ /* - MLB+ ------------------------------------------------------------------- */
static const unsigned int mlb_3pin_pins[] = { static const unsigned int mlb_3pin_pins[] = {
RCAR_GP_PIN(7, 7), RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9), RCAR_GP_PIN(7, 7), RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9),
...@@ -2560,6 +2564,8 @@ static const unsigned int mlb_3pin_pins[] = { ...@@ -2560,6 +2564,8 @@ static const unsigned int mlb_3pin_pins[] = {
static const unsigned int mlb_3pin_mux[] = { static const unsigned int mlb_3pin_mux[] = {
MLB_CLK_MARK, MLB_SIG_MARK, MLB_DAT_MARK, MLB_CLK_MARK, MLB_SIG_MARK, MLB_DAT_MARK,
}; };
#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */
/* - MMCIF ------------------------------------------------------------------ */ /* - MMCIF ------------------------------------------------------------------ */
static const unsigned int mmc_data1_pins[] = { static const unsigned int mmc_data1_pins[] = {
/* D[0] */ /* D[0] */
...@@ -4452,7 +4458,9 @@ static const unsigned int vin2_clk_mux[] = { ...@@ -4452,7 +4458,9 @@ static const unsigned int vin2_clk_mux[] = {
static const struct { static const struct {
struct sh_pfc_pin_group common[346]; struct sh_pfc_pin_group common[346];
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
struct sh_pfc_pin_group automotive[9]; struct sh_pfc_pin_group automotive[9];
#endif
} pinmux_groups = { } pinmux_groups = {
.common = { .common = {
SH_PFC_PIN_GROUP(audio_clk_a), SH_PFC_PIN_GROUP(audio_clk_a),
...@@ -4802,6 +4810,7 @@ static const struct { ...@@ -4802,6 +4810,7 @@ static const struct {
SH_PFC_PIN_GROUP(vin2_clkenb), SH_PFC_PIN_GROUP(vin2_clkenb),
SH_PFC_PIN_GROUP(vin2_clk), SH_PFC_PIN_GROUP(vin2_clk),
}, },
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
.automotive = { .automotive = {
SH_PFC_PIN_GROUP(adi_common), SH_PFC_PIN_GROUP(adi_common),
SH_PFC_PIN_GROUP(adi_chsel0), SH_PFC_PIN_GROUP(adi_chsel0),
...@@ -4813,8 +4822,10 @@ static const struct { ...@@ -4813,8 +4822,10 @@ static const struct {
SH_PFC_PIN_GROUP(adi_chsel2_b), SH_PFC_PIN_GROUP(adi_chsel2_b),
SH_PFC_PIN_GROUP(mlb_3pin), SH_PFC_PIN_GROUP(mlb_3pin),
} }
#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */
}; };
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
static const char * const adi_groups[] = { static const char * const adi_groups[] = {
"adi_common", "adi_common",
"adi_chsel0", "adi_chsel0",
...@@ -4825,6 +4836,7 @@ static const char * const adi_groups[] = { ...@@ -4825,6 +4836,7 @@ static const char * const adi_groups[] = {
"adi_chsel1_b", "adi_chsel1_b",
"adi_chsel2_b", "adi_chsel2_b",
}; };
#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */
static const char * const audio_clk_groups[] = { static const char * const audio_clk_groups[] = {
"audio_clk_a", "audio_clk_a",
...@@ -5002,9 +5014,11 @@ static const char * const intc_groups[] = { ...@@ -5002,9 +5014,11 @@ static const char * const intc_groups[] = {
"intc_irq3", "intc_irq3",
}; };
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
static const char * const mlb_groups[] = { static const char * const mlb_groups[] = {
"mlb_3pin", "mlb_3pin",
}; };
#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */
static const char * const mmc_groups[] = { static const char * const mmc_groups[] = {
"mmc_data1", "mmc_data1",
...@@ -5359,7 +5373,9 @@ static const char * const vin2_groups[] = { ...@@ -5359,7 +5373,9 @@ static const char * const vin2_groups[] = {
static const struct { static const struct {
struct sh_pfc_function common[58]; struct sh_pfc_function common[58];
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
struct sh_pfc_function automotive[2]; struct sh_pfc_function automotive[2];
#endif
} pinmux_functions = { } pinmux_functions = {
.common = { .common = {
SH_PFC_FUNCTION(audio_clk), SH_PFC_FUNCTION(audio_clk),
...@@ -5421,10 +5437,12 @@ static const struct { ...@@ -5421,10 +5437,12 @@ static const struct {
SH_PFC_FUNCTION(vin1), SH_PFC_FUNCTION(vin1),
SH_PFC_FUNCTION(vin2), SH_PFC_FUNCTION(vin2),
}, },
#if defined(CONFIG_PINCTRL_PFC_R8A7791) || defined(CONFIG_PINCTRL_PFC_R8A7793)
.automotive = { .automotive = {
SH_PFC_FUNCTION(adi), SH_PFC_FUNCTION(adi),
SH_PFC_FUNCTION(mlb), SH_PFC_FUNCTION(mlb),
} }
#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */
}; };
static const struct pinmux_cfg_reg pinmux_config_regs[] = { static const struct pinmux_cfg_reg pinmux_config_regs[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment