pinctrl: renesas: Share more pin group data
Subsystems (3)
Geert Uytterhoeven
maintainercover pinctrl: renesas: Share more pin group data
Hi Linus,
It is fairly common for the pins in a pin group to be a subset of the pins in another pin group, e.g. in case of resizable buses. Currently we have support for sharing pin data for VIN (video-in), where the number of data lanes used can be varied.
This patch series, after a few customary cleanups, adds the infastructure for defining pin groups that share pin data with another group, either as an arbitrary subset, or as a resizable bus, and converts lots of existing pin groups to make use of this. This not only saves memory, but also makes it easier to review future support for new SoCs and for new pin groups on existing SoCs.
This reduces kernel size for a kernel including all Renesas pin control drivers by ca. 5 KiB.
If accepted, I intend to queue this in renesas-pinctrl for v5.18. Thanks for your comments!
Geert Uytterhoeven (60):
pinctrl: renesas: r8a77470: Reduce size for narrow VIN1 channel
pinctrl: renesas: Rename sh_pfc_soc_operations instances
pinctrl: renesas: Reformat macros defining struct initializers
pinctrl: renesas: Rename SH_PFC_PIN_GROUP{,_ALIAS} args
pinctrl: renesas: Add generic support for pin group subsets
pinctrl: renesas: Add generic support for resizable buses
pinctrl: renesas: r8a7740: Share BSC pin group data
pinctrl: renesas: emev2: Share CF pin group data
pinctrl: renesas: r8a7791: Share HSCIF1 pin group data
pinctrl: renesas: sh73a0: Share KEYIN pin group data
pinctrl: renesas: r8a7740: Share LCD pin group data
pinctrl: renesas: sh73a0: Share LCD pin group data
pinctrl: renesas: r8a73a4: Share MMC pin group data
pinctrl: renesas: r8a7740: Share MMC pin group data
pinctrl: renesas: r8a77470: Share MMC pin group data
pinctrl: renesas: r8a7778: Share MMC pin group data
pinctrl: renesas: r8a7779: Share MMC pin group data
pinctrl: renesas: r8a7790: Share MMC pin group data
pinctrl: renesas: r8a7791: Share MMC pin group data
pinctrl: renesas: r8a7794: Share MMC pin group data
pinctrl: renesas: r8a77970: Share MMC pin group data
pinctrl: renesas: r8a77980: Share MMC pin group data
pinctrl: renesas: r8a77995: Share MMC pin group data
pinctrl: renesas: r8a779a0: Share MMC pin group data
pinctrl: renesas: sh73a0: Share MMC pin group data
pinctrl: renesas: r8a77470: Share QSPI pin group data
pinctrl: renesas: r8a7790: Share QSPI pin group data
pinctrl: renesas: r8a7791: Share QSPI pin group data
pinctrl: renesas: r8a7792: Share QSPI pin group data
pinctrl: renesas: r8a7794: Share QSPI pin group data
pinctrl: renesas: r8a77950: Share QSPI pin group data
pinctrl: renesas: r8a77951: Share QSPI pin group data
pinctrl: renesas: r8a77965: Share QSPI pin group data
pinctrl: renesas: r8a7796: Share QSPI pin group data
pinctrl: renesas: r8a77990: Share QSPI pin group data
pinctrl: renesas: r8a779a0: Share QSPI pin group data
pinctrl: renesas: r8a77970: Share RPC pin group data
pinctrl: renesas: r8a77980: Share RPC pin group data
pinctrl: renesas: r8a73a4: Share SDHI pin group data
pinctrl: renesas: r8a7740: Share SDHI pin group data
pinctrl: renesas: r8a77470: Share SDHI pin group data
pinctrl: renesas: r8a7778: Share SDHI pin group data
pinctrl: renesas: r8a7779: Share SDHI pin group data
pinctrl: renesas: r8a7790: Share SDHI pin group data
pinctrl: renesas: r8a7791: Share SDHI pin group data
pinctrl: renesas: r8a7792: Share SDHI pin group data
pinctrl: renesas: r8a7794: Share SDHI pin group data
pinctrl: renesas: r8a77950: Share SDHI pin group data
pinctrl: renesas: r8a77951: Share SDHI pin group data
pinctrl: renesas: r8a77965: Share SDHI pin group data
pinctrl: renesas: r8a7796: Share SDHI pin group data
pinctrl: renesas: r8a77990: Share SDHI pin group data
pinctrl: renesas: sh73a0: Share SDHI pin group data
pinctrl: renesas: emev2: Share SDI pin group data
pinctrl: renesas: r8a7790: Share USB1 pin group data
pinctrl: renesas: r8a7790: Share more VIN pin group data
pinctrl: renesas: r8a77951: Share more VIN pin group data
pinctrl: renesas: r8a7796: Share more VIN pin group data
pinctrl: renesas: r8a77965: Share more VIN pin group data
pinctrl: renesas: r8a77990: Share more VIN pin group data
drivers/pinctrl/renesas/pfc-emev2.c | 71 +--- drivers/pinctrl/renesas/pfc-r8a73a4.c | 93 ++--- drivers/pinctrl/renesas/pfc-r8a7740.c | 276 +++----------- drivers/pinctrl/renesas/pfc-r8a77470.c | 237 +++++------- drivers/pinctrl/renesas/pfc-r8a7778.c | 69 ++-- drivers/pinctrl/renesas/pfc-r8a7779.c | 110 ++---- drivers/pinctrl/renesas/pfc-r8a7790.c | 483 ++++++++++--------------- drivers/pinctrl/renesas/pfc-r8a7791.c | 285 ++++++--------- drivers/pinctrl/renesas/pfc-r8a7792.c | 446 +++++++++++------------ drivers/pinctrl/renesas/pfc-r8a7794.c | 209 ++++------- drivers/pinctrl/renesas/pfc-r8a77950.c | 116 ++---- drivers/pinctrl/renesas/pfc-r8a77951.c | 310 ++++++---------- drivers/pinctrl/renesas/pfc-r8a7796.c | 312 ++++++---------- drivers/pinctrl/renesas/pfc-r8a77965.c | 330 ++++++----------- drivers/pinctrl/renesas/pfc-r8a77970.c | 162 +++------ drivers/pinctrl/renesas/pfc-r8a77980.c | 190 ++++------ drivers/pinctrl/renesas/pfc-r8a77990.c | 308 ++++++---------- drivers/pinctrl/renesas/pfc-r8a77995.c | 98 ++--- drivers/pinctrl/renesas/pfc-r8a779a0.c | 60 +-- drivers/pinctrl/renesas/pfc-sh73a0.c | 265 +++----------- drivers/pinctrl/renesas/sh_pfc.h | 161 ++++----- 21 files changed, 1536 insertions(+), 3055 deletions(-)
Signature · 12 lines
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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 TorvaldsGeert Uytterhoeven
maintainerPATCH 1/60 pinctrl: renesas: r8a77470: Reduce size for narrow VIN1 channel
The second video-in channel on RZ/G1C has only 12 data lanes, but the pin control driver uses the vin_data union, which is meant for 24 data lanes, thus wasting space.
Fix this by using the vin_data12 union instead.
This reduces kernel size by 96 bytes.
---
All other Renesas pin control drivers were fixed, but RZ/G1C was forgotten, as RZ/G1C video-in support went in just before these fixes.
--- drivers/pinctrl/renesas/pfc-r8a77470.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77470.c +2 -2
@@ -2140,7 +2140,7 @@ static const unsigned int vin0_clk_mux[] = { VI0_CLK_MARK, };/* - VIN1 ------------------------------------------------------------------- */ -static const union vin_data vin1_data_pins = { +static const union vin_data12 vin1_data_pins = { .data12 = {RCAR_GP_PIN (3 ,1 ),RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),
@@ -2150,7 +2150,7 @@ static const union vin_data vin1_data_pins = { RCAR_GP_PIN(3, 15), RCAR_GP_PIN(3, 16), }, }; -static const union vin_data vin1_data_mux = { +static const union vin_data12 vin1_data_mux = { .data12 = {VI1_DATA0_MARK ,VI1_DATA1_MARK ,VI1_DATA2_MARK ,VI1_DATA3_MARK ,
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 2/60 pinctrl: renesas: Rename sh_pfc_soc_operations instances
In reply to Geert UytterhoevenSome instances of struct sh_pfc_soc_operations are called "<soc>_pfc_ops", others are called "<soc>_pinmux_ops" or just "pinmux_ops". Settle on the first variant, to avoid confusion with "struct pinmux_ops" in the pinctrl core, and to increase consistency.
--- drivers/pinctrl/renesas/pfc-r8a77470.c | 4 ++-- drivers/pinctrl/renesas/pfc-r8a7790.c | 6 +++--- drivers/pinctrl/renesas/pfc-r8a7791.c | 10 +++++----- drivers/pinctrl/renesas/pfc-r8a7792.c | 4 ++-- drivers/pinctrl/renesas/pfc-r8a7794.c | 6 +++--- drivers/pinctrl/renesas/pfc-r8a77950.c | 4 ++-- drivers/pinctrl/renesas/pfc-r8a77951.c | 6 +++--- drivers/pinctrl/renesas/pfc-r8a7796.c | 8 ++++---- drivers/pinctrl/renesas/pfc-r8a77965.c | 6 +++--- drivers/pinctrl/renesas/pfc-r8a77970.c | 4 ++-- drivers/pinctrl/renesas/pfc-r8a77980.c | 4 ++-- drivers/pinctrl/renesas/pfc-r8a77990.c | 6 +++--- drivers/pinctrl/renesas/pfc-r8a77995.c | 4 ++-- drivers/pinctrl/renesas/pfc-r8a779a0.c | 4 ++-- 14 files changed, 38 insertions(+), 38 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77470.c +2 -2
@@ -3683,7 +3683,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { {/* sentinel */ } }; -static const struct sh_pfc_soc_operations r8a77470_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77470_pfc_ops = { .pin_to_pocctrl = r8a77470_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -3692,7 +3692,7 @@ static const struct sh_pfc_soc_operations r8a77470_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A77470 const struct sh_pfc_soc_info r8a77470_pinmux_info = { .name ="r8a77470_pfc" , - .ops = &r8a77470_pinmux_ops, + .ops = &r8a77470_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a7790.c +3 -3
@@ -6282,7 +6282,7 @@ static int r8a7790_pinmux_soc_init(struct sh_pfc *pfc)return 0 ; } -static const struct sh_pfc_soc_operations r8a7790_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a7790_pfc_ops = { .init = r8a7790_pinmux_soc_init, .pin_to_pocctrl = r8a7790_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias,
@@ -6292,7 +6292,7 @@ static const struct sh_pfc_soc_operations r8a7790_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A7742 const struct sh_pfc_soc_info r8a7742_pinmux_info = { .name ="r8a77420_pfc" , - .ops = &r8a7790_pinmux_ops, + .ops = &r8a7790_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -6315,7 +6315,7 @@ const struct sh_pfc_soc_info r8a7742_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A7790 const struct sh_pfc_soc_info r8a7790_pinmux_info = { .name ="r8a77900_pfc" , - .ops = &r8a7790_pinmux_ops, + .ops = &r8a7790_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a7791.c +5 -5
@@ -6989,7 +6989,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { /* sentinel */ }, }; -static const struct sh_pfc_soc_operations r8a7791_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a7791_pfc_ops = { .pin_to_pocctrl = r8a7791_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -6998,7 +6998,7 @@ static const struct sh_pfc_soc_operations r8a7791_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A7743 const struct sh_pfc_soc_info r8a7743_pinmux_info = { .name ="r8a77430_pfc" , - .ops = &r8a7791_pinmux_ops, + .ops = &r8a7791_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -7021,7 +7021,7 @@ const struct sh_pfc_soc_info r8a7743_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A7744 const struct sh_pfc_soc_info r8a7744_pinmux_info = { .name ="r8a77440_pfc" , - .ops = &r8a7791_pinmux_ops, + .ops = &r8a7791_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -7044,7 +7044,7 @@ const struct sh_pfc_soc_info r8a7744_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A7791 const struct sh_pfc_soc_info r8a7791_pinmux_info = { .name ="r8a77910_pfc" , - .ops = &r8a7791_pinmux_ops, + .ops = &r8a7791_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -7069,7 +7069,7 @@ const struct sh_pfc_soc_info r8a7791_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A7793 const struct sh_pfc_soc_info r8a7793_pinmux_info = { .name ="r8a77930_pfc" , - .ops = &r8a7791_pinmux_ops, + .ops = &r8a7791_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a7792.c +2 -2
@@ -3281,14 +3281,14 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { {/* sentinel */ } }; -static const struct sh_pfc_soc_operations r8a7792_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a7792_pfc_ops = { .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias, };const struct sh_pfc_soc_info r8a7792_pinmux_info = { .name ="r8a77920_pfc" , - .ops = &r8a7792_pinmux_ops, + .ops = &r8a7792_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = {PINMUX_FUNCTION_BEGIN ,PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a7794.c +3 -3
@@ -5935,7 +5935,7 @@ static int r8a7794_pinmux_soc_init(struct sh_pfc *pfc)return 0 ; } -static const struct sh_pfc_soc_operations r8a7794_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a7794_pfc_ops = { .init = r8a7794_pinmux_soc_init, .pin_to_pocctrl = r8a7794_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias,
@@ -5945,7 +5945,7 @@ static const struct sh_pfc_soc_operations r8a7794_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A7745 const struct sh_pfc_soc_info r8a7745_pinmux_info = { .name ="r8a77450_pfc" , - .ops = &r8a7794_pinmux_ops, + .ops = &r8a7794_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -5968,7 +5968,7 @@ const struct sh_pfc_soc_info r8a7745_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A7794 const struct sh_pfc_soc_info r8a7794_pinmux_info = { .name ="r8a77940_pfc" , - .ops = &r8a7794_pinmux_ops, + .ops = &r8a7794_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a77950.c +2 -2
@@ -5832,7 +5832,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { /* sentinel */ }, }; -static const struct sh_pfc_soc_operations r8a77950_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77950_pfc_ops = { .pin_to_pocctrl = r8a77950_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -5840,7 +5840,7 @@ static const struct sh_pfc_soc_operations r8a77950_pinmux_ops = {const struct sh_pfc_soc_info r8a77950_pinmux_info = { .name ="r8a77950_pfc" , - .ops = &r8a77950_pinmux_ops, + .ops = &r8a77950_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = {PINMUX_FUNCTION_BEGIN ,PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a77951.c +3 -3
@@ -6316,7 +6316,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { /* sentinel */ }, }; -static const struct sh_pfc_soc_operations r8a77951_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77951_pfc_ops = { .pin_to_pocctrl = r8a77951_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -6325,7 +6325,7 @@ static const struct sh_pfc_soc_operations r8a77951_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A774E1 const struct sh_pfc_soc_info r8a774e1_pinmux_info = { .name ="r8a774e1_pfc" , - .ops = &r8a77951_pinmux_ops, + .ops = &r8a77951_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -6350,7 +6350,7 @@ const struct sh_pfc_soc_info r8a774e1_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A77951 const struct sh_pfc_soc_info r8a77951_pinmux_info = { .name ="r8a77951_pfc" , - .ops = &r8a77951_pinmux_ops, + .ops = &r8a77951_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a7796.c +4 -4
@@ -6267,7 +6267,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { /* sentinel */ }, }; -static const struct sh_pfc_soc_operations r8a7796_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a7796_pfc_ops = { .pin_to_pocctrl = r8a7796_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -6276,7 +6276,7 @@ static const struct sh_pfc_soc_operations r8a7796_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A774A1 const struct sh_pfc_soc_info r8a774a1_pinmux_info = { .name ="r8a774a1_pfc" , - .ops = &r8a7796_pinmux_ops, + .ops = &r8a7796_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -6301,7 +6301,7 @@ const struct sh_pfc_soc_info r8a774a1_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A77960 const struct sh_pfc_soc_info r8a77960_pinmux_info = { .name ="r8a77960_pfc" , - .ops = &r8a7796_pinmux_ops, + .ops = &r8a7796_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -6328,7 +6328,7 @@ const struct sh_pfc_soc_info r8a77960_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A77961 const struct sh_pfc_soc_info r8a77961_pinmux_info = { .name ="r8a77961_pfc" , - .ops = &r8a7796_pinmux_ops, + .ops = &r8a7796_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a77965.c +3 -3
@@ -6524,7 +6524,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { /* sentinel */ }, }; -static const struct sh_pfc_soc_operations r8a77965_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77965_pfc_ops = { .pin_to_pocctrl = r8a77965_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -6533,7 +6533,7 @@ static const struct sh_pfc_soc_operations r8a77965_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A774B1 const struct sh_pfc_soc_info r8a774b1_pinmux_info = { .name ="r8a774b1_pfc" , - .ops = &r8a77965_pinmux_ops, + .ops = &r8a77965_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -6558,7 +6558,7 @@ const struct sh_pfc_soc_info r8a774b1_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A77965 const struct sh_pfc_soc_info r8a77965_pinmux_info = { .name ="r8a77965_pfc" , - .ops = &r8a77965_pinmux_ops, + .ops = &r8a77965_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a77970.c +2 -2
@@ -2656,7 +2656,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { {/* sentinel */ } }; -static const struct sh_pfc_soc_operations pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77970_pfc_ops = { .pin_to_pocctrl = r8a77970_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -2664,7 +2664,7 @@ static const struct sh_pfc_soc_operations pinmux_ops = {const struct sh_pfc_soc_info r8a77970_pinmux_info = { .name ="r8a77970_pfc" , - .ops = &pinmux_ops, + .ops = &r8a77970_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = {PINMUX_FUNCTION_BEGIN ,PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a77980.c +2 -2
@@ -3139,7 +3139,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { {/* sentinel */ } }; -static const struct sh_pfc_soc_operations pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77980_pfc_ops = { .pin_to_pocctrl = r8a77980_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -3147,7 +3147,7 @@ static const struct sh_pfc_soc_operations pinmux_ops = {const struct sh_pfc_soc_info r8a77980_pinmux_info = { .name ="r8a77980_pfc" , - .ops = &pinmux_ops, + .ops = &r8a77980_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = {PINMUX_FUNCTION_BEGIN ,PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a77990.c +3 -3
@@ -5339,7 +5339,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { /* sentinel */ }, }; -static const struct sh_pfc_soc_operations r8a77990_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77990_pfc_ops = { .pin_to_pocctrl = r8a77990_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -5348,7 +5348,7 @@ static const struct sh_pfc_soc_operations r8a77990_pinmux_ops = {#ifdef CONFIG_PINCTRL_PFC_R8A774C0 const struct sh_pfc_soc_info r8a774c0_pinmux_info = { .name ="r8a774c0_pfc" , - .ops = &r8a77990_pinmux_ops, + .ops = &r8a77990_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
@@ -5372,7 +5372,7 @@ const struct sh_pfc_soc_info r8a774c0_pinmux_info = {#ifdef CONFIG_PINCTRL_PFC_R8A77990 const struct sh_pfc_soc_info r8a77990_pinmux_info = { .name ="r8a77990_pfc" , - .ops = &r8a77990_pinmux_ops, + .ops = &r8a77990_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a77995.c +2 -2
@@ -3144,7 +3144,7 @@ static void r8a77995_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,sh_pfc_write (pfc, reg->puen, enable); } -static const struct sh_pfc_soc_operations r8a77995_pinmux_ops = { +static const struct sh_pfc_soc_operations r8a77995_pfc_ops = { .pin_to_pocctrl = r8a77995_pin_to_pocctrl, .get_bias = r8a77995_pinmux_get_bias, .set_bias = r8a77995_pinmux_set_bias,
@@ -3152,7 +3152,7 @@ static const struct sh_pfc_soc_operations r8a77995_pinmux_ops = {const struct sh_pfc_soc_info r8a77995_pinmux_info = { .name ="r8a77995_pfc" , - .ops = &r8a77995_pinmux_ops, + .ops = &r8a77995_pfc_ops, .unlock_reg =0xe6060000 ,/* PMMR */ .function = {PINMUX_FUNCTION_BEGIN ,PINMUX_FUNCTION_END },
drivers/pinctrl/renesas/pfc-r8a779a0.c +2 -2
@@ -4429,7 +4429,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { /* sentinel */ }, }; -static const struct sh_pfc_soc_operations pinmux_ops = { +static const struct sh_pfc_soc_operations r8a779a0_pfc_ops = { .pin_to_pocctrl = r8a779a0_pin_to_pocctrl, .get_bias = rcar_pinmux_get_bias, .set_bias = rcar_pinmux_set_bias,
@@ -4437,7 +4437,7 @@ static const struct sh_pfc_soc_operations pinmux_ops = {const struct sh_pfc_soc_info r8a779a0_pinmux_info = { .name ="r8a779a0_pfc" , - .ops = &pinmux_ops, + .ops = &r8a779a0_pfc_ops, .unlock_reg =0x1ff ,/* PMMRn mask */ .function = {PINMUX_FUNCTION_BEGIN ,PINMUX_FUNCTION_END },
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 3/60 pinctrl: renesas: Reformat macros defining struct initializers
In reply to Geert UytterhoevenReformat all macros that define structure initializers, to visually resemble structure definitions:
- Move the opening curly brace to the previous line,
- Move the closing curly brace to the first position,
- Reduce indentation of the block to a single TAB, decreasing the need for line breaks,
- Align backslashes for line continuation to the last TAB block where possible,
--- drivers/pinctrl/renesas/sh_pfc.h | 115 +++++++++++++++---------------- 1 file changed, 54 insertions(+), 61 deletions(-)
drivers/pinctrl/renesas/sh_pfc.h +54 -61
@@ -49,14 +49,13 @@ struct sh_pfc_pin {u16 enum_id; }; -#define SH_PFC_PIN_GROUP_ALIAS (alias, n) \ - { \ - .name = #alias, \ - .pins = n##_pins, \ - .mux = n##_mux, \ - .nr_pins = ARRAY_SIZE(n##_pins) + \ - BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \ - } +#define SH_PFC_PIN_GROUP_ALIAS (alias, n) { \ + .name = #alias, \ + .pins = n##_pins, \ + .mux = n##_mux, \ + .nr_pins = ARRAY_SIZE(n##_pins) + \ + BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \ +}#define SH_PFC_PIN_GROUP (n) SH_PFC_PIN_GROUP_ALIAS(n, n)struct sh_pfc_pin_group {
@@ -72,13 +71,12 @@ struct sh_pfc_pin_group {* in this case. It accepts an optional 'version' argument used when the * same group can appear on a different set of pins. */ -#define VIN_DATA_PIN_GROUP (n, s, ...) \ - { \ - .name = #n#s#__VA_ARGS__, \ - .pins = n##__VA_ARGS__##_pins.data##s, \ - .mux = n##__VA_ARGS__##_mux.data##s, \ - .nr_pins = ARRAY_SIZE(n##__VA_ARGS__##_pins.data##s), \ - } +#define VIN_DATA_PIN_GROUP (n, s, ...) { \ + .name = #n#s#__VA_ARGS__, \ + .pins = n##__VA_ARGS__##_pins.data##s, \ + .mux = n##__VA_ARGS__##_mux.data##s, \ + .nr_pins = ARRAY_SIZE(n##__VA_ARGS__##_pins.data##s), \ +}union vin_data12 {unsigned int data12[12 ];
@@ -103,12 +101,11 @@ union vin_data {unsigned int data4[4 ]; }; -#define SH_PFC_FUNCTION (n) \ - { \ - .name = #n, \ - .groups = n##_groups, \ - .nr_groups = ARRAY_SIZE(n##_groups), \ - } +#define SH_PFC_FUNCTION (n) { \ + .name = #n, \ + .groups = n##_groups, \ + .nr_groups = ARRAY_SIZE(n##_groups), \ +}struct sh_pfc_function {const char *name;
@@ -231,8 +228,9 @@ struct pinmux_irq {* Describe the mapping from GPIOs to a single IRQ * - ids...: List of GPIOs that are mapped to the same IRQ */ -#define PINMUX_IRQ(ids...) \ - { .gpios = (const short []) { ids, -1 } } +#define PINMUX_IRQ(ids...) { \ + .gpios = (const short []) { ids, -1 } \ +}struct pinmux_range {u16 begin;
@@ -624,13 +622,12 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;#define GP_ALL (str) CPU_ALL_GP(_GP_ALL, str)/* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */ -#define _GP_GPIO (bank, _pin, _name, sfx, cfg) \ - { \ - .pin = (bank * 32) + _pin, \ - .name = __stringify(_name), \ - .enum_id = _name##_DATA, \ - .configs = cfg, \ - } +#define _GP_GPIO (bank, _pin, _name, sfx, cfg) { \ + .pin = (bank * 32) + _pin, \ + .name = __stringify(_name), \ + .enum_id = _name##_DATA, \ + .configs = cfg, \ +}#define PINMUX_GPIO_GP_ALL () CPU_ALL_GP(_GP_GPIO, unused)/* PINMUX_DATA_GP_ALL - Expand to a list of name_DATA, name_FN marks */
@@ -688,13 +685,12 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; }/* SH_PFC_PIN_CFG - Expand to a sh_pfc_pin entry (named PORT#) with config */ -#define SH_PFC_PIN_CFG (_pin, cfgs) \ - { \ - .pin = _pin, \ - .name = __stringify(PORT##_pin), \ - .enum_id = PORT##_pin##_DATA, \ - .configs = cfgs, \ - } +#define SH_PFC_PIN_CFG (_pin, cfgs) { \ + .pin = _pin, \ + .name = __stringify(PORT##_pin), \ + .enum_id = PORT##_pin##_DATA, \ + .configs = cfgs, \ +}/* PINMUX_DATA_ALL - Expand to a list of PORT_name_DATA, PORT_name_FN0, * PORT_name_OUT, PORT_name_IN marks
@@ -743,35 +739,32 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;#define NOGP_ALL () CPU_ALL_NOGP(_NOGP_ALL)/* PINMUX_NOGP_ALL - Expand to a list of sh_pfc_pin entries */ -#define _NOGP_PINMUX (_pin, _name, cfg) \ - { \ - .pin = PIN_##_pin, \ - .name = "PIN_" _name, \ - .configs = SH_PFC_PIN_CFG_NO_GPIO | cfg, \ - } +#define _NOGP_PINMUX (_pin, _name, cfg) { \ + .pin = PIN_##_pin, \ + .name = "PIN_" _name, \ + .configs = SH_PFC_PIN_CFG_NO_GPIO | cfg, \ +}#define PINMUX_NOGP_ALL () CPU_ALL_NOGP(_NOGP_PINMUX)/* * PORTnCR helper macro for SH-Mobile/R-Mobile */ -#define PORTCR (nr, reg) \ - { \ - PINMUX_CFG_REG_VAR("PORT" nr "CR", reg, 8, \ - GROUP(2, 2, 1, 3), \ - GROUP( \ -/* PULMD[1:0], handled by .set_bias() */ \ - 0, 0, 0, 0, \ - /* IE and OE */ \ - 0, PORT##nr##_OUT, PORT##nr##_IN, 0, \ -/* SEC, not supported */ \ - 0, 0, \ - /* PTMD[2:0] */ \ - PORT##nr##_FN0, PORT##nr##_FN1, \ - PORT##nr##_FN2, PORT##nr##_FN3, \ - PORT##nr##_FN4, PORT##nr##_FN5, \ - PORT##nr##_FN6, PORT##nr##_FN7 \ - )) \ - } +#define PORTCR (nr, reg) { \ + PINMUX_CFG_REG_VAR("PORT" nr "CR", reg, 8, GROUP(2, 2, 1, 3), \ + GROUP( \ +/* PULMD[1:0], handled by .set_bias() */ \ + 0, 0, 0, 0, \ + /* IE and OE */ \ + 0, PORT##nr##_OUT, PORT##nr##_IN, 0, \ +/* SEC, not supported */ \ + 0, 0, \ + /* PTMD[2:0] */ \ + PORT##nr##_FN0, PORT##nr##_FN1, \ + PORT##nr##_FN2, PORT##nr##_FN3, \ + PORT##nr##_FN4, PORT##nr##_FN5, \ + PORT##nr##_FN6, PORT##nr##_FN7 \ + )) \ +}/* * GPIO number helper macro for R-Car
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 4/60 pinctrl: renesas: Rename SH_PFC_PIN_GROUP{,_ALIAS} args
In reply to Geert UytterhoevenRename the arguments of the SH_PFC_PIN_GROUP_ALIAS() and SH_PFC_PIN_GROUP() macros, to better reflect their purposes.
--- drivers/pinctrl/renesas/sh_pfc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/pinctrl/renesas/sh_pfc.h +6 -6
@@ -49,14 +49,14 @@ struct sh_pfc_pin {u16 enum_id; }; -#define SH_PFC_PIN_GROUP_ALIAS (alias, n) { \ +#define SH_PFC_PIN_GROUP_ALIAS (alias, _name) { \ .name = #alias, \ - .pins = n##_pins, \ - .mux = n##_mux, \ - .nr_pins = ARRAY_SIZE(n##_pins) + \ - BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \ + .pins = _name##_pins, \ + .mux = _name##_mux, \ + .nr_pins = ARRAY_SIZE(_name##_pins) + \ + BUILD_BUG_ON_ZERO(sizeof(_name##_pins) != sizeof(_name##_mux)), \ } -#define SH_PFC_PIN_GROUP (n) SH_PFC_PIN_GROUP_ALIAS(n, n) +#define SH_PFC_PIN_GROUP (name) SH_PFC_PIN_GROUP_ALIAS(name, name)struct sh_pfc_pin_group {const char *name;
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 5/60 pinctrl: renesas: Add generic support for pin group subsets
In reply to Geert UytterhoevenIt is fairly common for the pins in a pin group to be a subset of the pins in another pin group. Add a macro for defining a pin group that refers to a subset of an array of pins. This allows pin groups to share pin data, and thus save memory.
--- drivers/pinctrl/renesas/sh_pfc.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/pinctrl/renesas/sh_pfc.h +12 -0
@@ -58,6 +58,18 @@ struct sh_pfc_pin { }#define SH_PFC_PIN_GROUP (name) SH_PFC_PIN_GROUP_ALIAS(name, name) +/* +* Define a pin group referring to a subset of an array of pins. +*/ +#define SH_PFC_PIN_GROUP_SUBSET (_name, data, first, n) { \ + .name = #_name, \ + .pins = data##_pins + first, \ + .mux = data##_mux + first, \ + .nr_pins = n + \ + BUILD_BUG_ON_ZERO(first + n > ARRAY_SIZE(data##_pins)) + \ + BUILD_BUG_ON_ZERO(first + n > ARRAY_SIZE(data##_mux)), \ +} +struct sh_pfc_pin_group {const char *name;const unsigned int *pins;
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 6/60 pinctrl: renesas: Add generic support for resizable buses
In reply to Geert UytterhoevenThe VIN_DATA_PIN_GROUP() macro and vin_data{12,16,} unions are used to define multiple VIN data groups with different numbers of lanes, while referring to a single array of data pins, thus saving memory.
However, the same feature would be useful for other resizable buses, like MMC, SDHI, QSPI, LCD, BSC, ...
Rework the mechanism for generic use:
- Use the new SH_PFC_PIN_GROUP_SUBSET() helper to remove the need for bus-specific unions,
- Rename VIN_DATA_PIN_GROUP() to BUS_DATA_PIN_GROUP(),
- Rename the macro parameters to better reflect their purposes,
- Move the macro up, where it belongs.
Update all individual pin control drivers for the above changes.
--- drivers/pinctrl/renesas/pfc-r8a77470.c | 118 ++++--- drivers/pinctrl/renesas/pfc-r8a7790.c | 322 +++++++++---------- drivers/pinctrl/renesas/pfc-r8a7791.c | 160 +++++----- drivers/pinctrl/renesas/pfc-r8a7792.c | 412 ++++++++++++------------- drivers/pinctrl/renesas/pfc-r8a7794.c | 118 ++++--- drivers/pinctrl/renesas/pfc-r8a77951.c | 184 ++++++----- drivers/pinctrl/renesas/pfc-r8a7796.c | 184 ++++++----- drivers/pinctrl/renesas/pfc-r8a77965.c | 184 ++++++----- drivers/pinctrl/renesas/pfc-r8a77970.c | 78 +++-- drivers/pinctrl/renesas/pfc-r8a77980.c | 106 +++---- drivers/pinctrl/renesas/pfc-r8a77990.c | 184 ++++++----- drivers/pinctrl/renesas/pfc-r8a77995.c | 68 ++-- drivers/pinctrl/renesas/sh_pfc.h | 44 +-- 13 files changed, 999 insertions(+), 1163 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77470.c +55 -63
@@ -2047,43 +2047,39 @@ static const unsigned int usb1_mux[] = { USB1_OVC_MARK, };/* - VIN0 ------------------------------------------------------------------- */ -static const union vin_data vin0_data_pins = { - .data24 = { -/* B */ -RCAR_GP_PIN (5 ,20 ),RCAR_GP_PIN (5 ,21 ), -RCAR_GP_PIN (5 ,22 ),RCAR_GP_PIN (5 ,23 ), -RCAR_GP_PIN (5 ,24 ),RCAR_GP_PIN (5 ,25 ), -RCAR_GP_PIN (5 ,26 ),RCAR_GP_PIN (5 ,27 ), -/* G */ -RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ), -RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), -RCAR_GP_PIN (4 ,6 ),RCAR_GP_PIN (5 ,8 ), -RCAR_GP_PIN (5 ,9 ),RCAR_GP_PIN (5 ,10 ), -/* R */ -RCAR_GP_PIN (5 ,11 ),RCAR_GP_PIN (5 ,12 ), -RCAR_GP_PIN (5 ,13 ),RCAR_GP_PIN (5 ,14 ), -RCAR_GP_PIN (5 ,15 ),RCAR_GP_PIN (5 ,16 ), -RCAR_GP_PIN (5 ,17 ),RCAR_GP_PIN (5 ,19 ), - }, +static const unsigned int vin0_data_pins[] = { +/* B */ +RCAR_GP_PIN (5 ,20 ),RCAR_GP_PIN (5 ,21 ), +RCAR_GP_PIN (5 ,22 ),RCAR_GP_PIN (5 ,23 ), +RCAR_GP_PIN (5 ,24 ),RCAR_GP_PIN (5 ,25 ), +RCAR_GP_PIN (5 ,26 ),RCAR_GP_PIN (5 ,27 ), +/* G */ +RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ), +RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), +RCAR_GP_PIN (4 ,6 ),RCAR_GP_PIN (5 ,8 ), +RCAR_GP_PIN (5 ,9 ),RCAR_GP_PIN (5 ,10 ), +/* R */ +RCAR_GP_PIN (5 ,11 ),RCAR_GP_PIN (5 ,12 ), +RCAR_GP_PIN (5 ,13 ),RCAR_GP_PIN (5 ,14 ), +RCAR_GP_PIN (5 ,15 ),RCAR_GP_PIN (5 ,16 ), +RCAR_GP_PIN (5 ,17 ),RCAR_GP_PIN (5 ,19 ), }; -static const union vin_data vin0_data_mux = { - .data24 = { -/* B */ -VI0_DATA0_VI0_B0_MARK ,VI0_DATA1_VI0_B1_MARK , -VI0_DATA2_VI0_B2_MARK ,VI0_DATA3_VI0_B3_MARK , -VI0_DATA4_VI0_B4_MARK ,VI0_DATA5_VI0_B5_MARK , -VI0_DATA6_VI0_B6_MARK ,VI0_DATA7_VI0_B7_MARK , -/* G */ -VI0_G0_MARK ,VI0_G1_MARK , -VI0_G2_MARK ,VI0_G3_MARK , -VI0_G4_MARK ,VI0_G5_MARK , -VI0_G6_MARK ,VI0_G7_MARK , -/* R */ -VI0_R0_MARK ,VI0_R1_MARK , -VI0_R2_MARK ,VI0_R3_MARK , -VI0_R4_MARK ,VI0_R5_MARK , -VI0_R6_MARK ,VI0_R7_MARK , - }, +static const unsigned int vin0_data_mux[] = { +/* B */ +VI0_DATA0_VI0_B0_MARK ,VI0_DATA1_VI0_B1_MARK , +VI0_DATA2_VI0_B2_MARK ,VI0_DATA3_VI0_B3_MARK , +VI0_DATA4_VI0_B4_MARK ,VI0_DATA5_VI0_B5_MARK , +VI0_DATA6_VI0_B6_MARK ,VI0_DATA7_VI0_B7_MARK , +/* G */ +VI0_G0_MARK ,VI0_G1_MARK , +VI0_G2_MARK ,VI0_G3_MARK , +VI0_G4_MARK ,VI0_G5_MARK , +VI0_G6_MARK ,VI0_G7_MARK , +/* R */ +VI0_R0_MARK ,VI0_R1_MARK , +VI0_R2_MARK ,VI0_R3_MARK , +VI0_R4_MARK ,VI0_R5_MARK , +VI0_R6_MARK ,VI0_R7_MARK , };static const unsigned int vin0_data18_pins[] = {/* B */
@@ -2140,25 +2136,21 @@ static const unsigned int vin0_clk_mux[] = { VI0_CLK_MARK, };/* - VIN1 ------------------------------------------------------------------- */ -static const union vin_data12 vin1_data_pins = { - .data12 = { -RCAR_GP_PIN (3 ,1 ),RCAR_GP_PIN (3 ,2 ), -RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ), -RCAR_GP_PIN (3 ,5 ),RCAR_GP_PIN (3 ,6 ), -RCAR_GP_PIN (3 ,7 ),RCAR_GP_PIN (3 ,8 ), -RCAR_GP_PIN (3 ,13 ),RCAR_GP_PIN (3 ,14 ), -RCAR_GP_PIN (3 ,15 ),RCAR_GP_PIN (3 ,16 ), - }, +static const unsigned int vin1_data_pins[] = { +RCAR_GP_PIN (3 ,1 ),RCAR_GP_PIN (3 ,2 ), +RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ), +RCAR_GP_PIN (3 ,5 ),RCAR_GP_PIN (3 ,6 ), +RCAR_GP_PIN (3 ,7 ),RCAR_GP_PIN (3 ,8 ), +RCAR_GP_PIN (3 ,13 ),RCAR_GP_PIN (3 ,14 ), +RCAR_GP_PIN (3 ,15 ),RCAR_GP_PIN (3 ,16 ), }; -static const union vin_data12 vin1_data_mux = { - .data12 = { -VI1_DATA0_MARK ,VI1_DATA1_MARK , -VI1_DATA2_MARK ,VI1_DATA3_MARK , -VI1_DATA4_MARK ,VI1_DATA5_MARK , -VI1_DATA6_MARK ,VI1_DATA7_MARK , -VI1_DATA8_MARK ,VI1_DATA9_MARK , -VI1_DATA10_MARK ,VI1_DATA11_MARK , - }, +static const unsigned int vin1_data_mux[] = { +VI1_DATA0_MARK ,VI1_DATA1_MARK , +VI1_DATA2_MARK ,VI1_DATA3_MARK , +VI1_DATA4_MARK ,VI1_DATA5_MARK , +VI1_DATA6_MARK ,VI1_DATA7_MARK , +VI1_DATA8_MARK ,VI1_DATA9_MARK , +VI1_DATA10_MARK ,VI1_DATA11_MARK , };static const unsigned int vin1_sync_pins[] = {RCAR_GP_PIN (3 ,11 ),/* HSYNC */
@@ -2303,20 +2295,20 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (sdhi2_wp),SH_PFC_PIN_GROUP (usb0),SH_PFC_PIN_GROUP (usb1), -VIN_DATA_PIN_GROUP (vin0_data,24 ), -VIN_DATA_PIN_GROUP (vin0_data,20 ), +BUS_DATA_PIN_GROUP (vin0_data,24 ), +BUS_DATA_PIN_GROUP (vin0_data,20 ),SH_PFC_PIN_GROUP (vin0_data18), -VIN_DATA_PIN_GROUP (vin0_data,16 ), -VIN_DATA_PIN_GROUP (vin0_data,12 ), -VIN_DATA_PIN_GROUP (vin0_data,10 ), -VIN_DATA_PIN_GROUP (vin0_data,8 ), +BUS_DATA_PIN_GROUP (vin0_data,16 ), +BUS_DATA_PIN_GROUP (vin0_data,12 ), +BUS_DATA_PIN_GROUP (vin0_data,10 ), +BUS_DATA_PIN_GROUP (vin0_data,8 ),SH_PFC_PIN_GROUP (vin0_sync),SH_PFC_PIN_GROUP (vin0_field),SH_PFC_PIN_GROUP (vin0_clkenb),SH_PFC_PIN_GROUP (vin0_clk), -VIN_DATA_PIN_GROUP (vin1_data,12 ), -VIN_DATA_PIN_GROUP (vin1_data,10 ), -VIN_DATA_PIN_GROUP (vin1_data,8 ), +BUS_DATA_PIN_GROUP (vin1_data,12 ), +BUS_DATA_PIN_GROUP (vin1_data,10 ), +BUS_DATA_PIN_GROUP (vin1_data,8 ),SH_PFC_PIN_GROUP (vin1_sync),SH_PFC_PIN_GROUP (vin1_field), SH_PFC_PIN_GROUP(vin1_clkenb),
drivers/pinctrl/renesas/pfc-r8a7790.c +153 -169
370 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a7791.c +76 -84
188 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a7792.c +192 -220
487 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a7794.c +55 -63
143 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77951.c +86 -98
213 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a7796.c +86 -98
213 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77965.c +86 -98
221 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77970.c +35 -43
101 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77980.c +49 -57
131 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77990.c +86 -98
221 lines not on this page · raw message
drivers/pinctrl/renesas/pfc-r8a77995.c +32 -36
82 lines not on this page · raw message
drivers/pinctrl/renesas/sh_pfc.h +8 -36
56 lines not on this page · raw message
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 7/60 pinctrl: renesas: r8a7740: Share BSC pin group data
In reply to Geert UytterhoevenPin groups bsc_data{8,16} are subsets of bsc_data32. Pin groups bsc_rd_we{8,16} are subsets of bsc_rd_we32.
This reduces kernel size by 232 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7740.c | 53 +++++---------------------- 1 file changed, 10 insertions(+), 43 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7740.c +10 -43
@@ -1638,33 +1638,14 @@ static const struct sh_pfc_pin pinmux_pins[] = { };/* - BSC -------------------------------------------------------------------- */ -static const unsigned int bsc_data8_pins[] = { -/* D[0:7] */ -157 ,156 ,155 ,154 ,153 ,152 ,151 ,150 , -}; -static const unsigned int bsc_data8_mux[] = { -D0_NAF0_MARK ,D1_NAF1_MARK ,D2_NAF2_MARK ,D3_NAF3_MARK , -D4_NAF4_MARK ,D5_NAF5_MARK ,D6_NAF6_MARK ,D7_NAF7_MARK , -}; -static const unsigned int bsc_data16_pins[] = { -/* D[0:15] */ -157 ,156 ,155 ,154 ,153 ,152 ,151 ,150 , -149 ,148 ,147 ,146 ,145 ,144 ,143 ,142 , -}; -static const unsigned int bsc_data16_mux[] = { -D0_NAF0_MARK ,D1_NAF1_MARK ,D2_NAF2_MARK ,D3_NAF3_MARK , -D4_NAF4_MARK ,D5_NAF5_MARK ,D6_NAF6_MARK ,D7_NAF7_MARK , -D8_NAF8_MARK ,D9_NAF9_MARK ,D10_NAF10_MARK ,D11_NAF11_MARK , -D12_NAF12_MARK ,D13_NAF13_MARK ,D14_NAF14_MARK ,D15_NAF15_MARK , -}; -static const unsigned int bsc_data32_pins[] = { +static const unsigned int bsc_data_pins[] = {/* D[0:31] */ 157 ,156 ,155 ,154 ,153 ,152 ,151 ,150 ,149 ,148 ,147 ,146 ,145 ,144 ,143 ,142 ,171 ,170 ,169 ,168 ,167 ,166 ,173 ,172 ,165 ,164 ,163 ,162 ,161 ,160 ,159 ,158 , }; -static const unsigned int bsc_data32_mux[] = { +static const unsigned int bsc_data_mux[] = {D0_NAF0_MARK ,D1_NAF1_MARK ,D2_NAF2_MARK ,D3_NAF3_MARK ,D4_NAF4_MARK ,D5_NAF5_MARK ,D6_NAF6_MARK ,D7_NAF7_MARK ,D8_NAF8_MARK ,D9_NAF9_MARK ,D10_NAF10_MARK ,D11_NAF11_MARK ,
@@ -1723,25 +1704,11 @@ static const unsigned int bsc_cs6a_pins[] = {static const unsigned int bsc_cs6a_mux[] = {CS6A_MARK , }; -static const unsigned int bsc_rd_we8_pins[] = { -/* RD, WE[0] */ -115 ,113 , -}; -static const unsigned int bsc_rd_we8_mux[] = { -RD_FSC_MARK ,WE0_FWE_MARK , -}; -static const unsigned int bsc_rd_we16_pins[] = { -/* RD, WE[0:1] */ -115 ,113 ,112 , -}; -static const unsigned int bsc_rd_we16_mux[] = { -RD_FSC_MARK ,WE0_FWE_MARK ,WE1_MARK , -}; -static const unsigned int bsc_rd_we32_pins[] = { +static const unsigned int bsc_rd_we_pins[] = {/* RD, WE[0:3] */ 115 ,113 ,112 ,108 ,107 , }; -static const unsigned int bsc_rd_we32_mux[] = { +static const unsigned int bsc_rd_we_mux[] = {RD_FSC_MARK ,WE0_FWE_MARK ,WE1_MARK ,WE2_ICIORD_MARK ,WE3_ICIOWR_MARK , };static const unsigned int bsc_bs_pins[] = {
@@ -2750,9 +2717,9 @@ static const unsigned int tpu0_to3_mux[] = { };static const struct sh_pfc_pin_group pinmux_groups[] = { -SH_PFC_PIN_GROUP (bsc_data8), -SH_PFC_PIN_GROUP (bsc_data16), -SH_PFC_PIN_GROUP (bsc_data32), +BUS_DATA_PIN_GROUP (bsc_data,8 ), +BUS_DATA_PIN_GROUP (bsc_data,16 ), +BUS_DATA_PIN_GROUP (bsc_data,32 ),SH_PFC_PIN_GROUP (bsc_cs0),SH_PFC_PIN_GROUP (bsc_cs2),SH_PFC_PIN_GROUP (bsc_cs4),
@@ -2760,9 +2727,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (bsc_cs5a_1),SH_PFC_PIN_GROUP (bsc_cs5b),SH_PFC_PIN_GROUP (bsc_cs6a), -SH_PFC_PIN_GROUP (bsc_rd_we8), -SH_PFC_PIN_GROUP (bsc_rd_we16), -SH_PFC_PIN_GROUP (bsc_rd_we32), +SH_PFC_PIN_GROUP_SUBSET (bsc_rd_we8, bsc_rd_we,0 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (bsc_rd_we16, bsc_rd_we,0 ,3 ), +SH_PFC_PIN_GROUP_SUBSET (bsc_rd_we32, bsc_rd_we,0 ,5 ),SH_PFC_PIN_GROUP (bsc_bs),SH_PFC_PIN_GROUP (bsc_rdwr), SH_PFC_PIN_GROUP(ceu0_data_0_7),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 8/60 pinctrl: renesas: emev2: Share CF pin group data
In reply to Geert UytterhoevenPin group cf_data8 is a subset of cf_data16.
This reduces kernel size by 64 bytes.
--- drivers/pinctrl/renesas/pfc-emev2.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-)
drivers/pinctrl/renesas/pfc-emev2.c +4 -13
@@ -749,23 +749,14 @@ static const unsigned int cf_ctrl_mux[] = { CF_CDB2_MARK, }; -static const unsigned int cf_data8_pins[] = { -/* CF_D[0:7] */ -77 ,78 ,79 ,80 , -81 ,82 ,83 ,84 , -}; -static const unsigned int cf_data8_mux[] = { -CF_D00_MARK ,CF_D01_MARK ,CF_D02_MARK ,CF_D03_MARK , -CF_D04_MARK ,CF_D05_MARK ,CF_D06_MARK ,CF_D07_MARK , -}; -static const unsigned int cf_data16_pins[] = { +static const unsigned int cf_data_pins[] = {/* CF_D[0:15] */ 77 ,78 ,79 ,80 ,81 ,82 ,83 ,84 ,85 ,86 ,87 ,88 ,89 ,90 ,91 ,92 , }; -static const unsigned int cf_data16_mux[] = { +static const unsigned int cf_data_mux[] = {CF_D00_MARK ,CF_D01_MARK ,CF_D02_MARK ,CF_D03_MARK ,CF_D04_MARK ,CF_D05_MARK ,CF_D06_MARK ,CF_D07_MARK ,CF_D08_MARK ,CF_D09_MARK ,CF_D10_MARK ,CF_D11_MARK ,
@@ -1131,8 +1122,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (cam),SH_PFC_PIN_GROUP (cf_ctrl), -SH_PFC_PIN_GROUP (cf_data8), -SH_PFC_PIN_GROUP (cf_data16), +BUS_DATA_PIN_GROUP (cf_data,8 ), +BUS_DATA_PIN_GROUP (cf_data,16 ),SH_PFC_PIN_GROUP (dtv_a), SH_PFC_PIN_GROUP(dtv_b),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 9/60 pinctrl: renesas: r8a7791: Share HSCIF1 pin group data
In reply to Geert UytterhoevenPin group hscif1_data_e can be an alias for hscif1_data_c.
This reduces kernel size by 16 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7791.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7791.c +1 -8
@@ -2298,13 +2298,6 @@ static const unsigned int hscif1_data_d_pins[] = {static const unsigned int hscif1_data_d_mux[] = {HRX1_D_MARK ,HTX1_D_MARK , }; -static const unsigned int hscif1_data_e_pins[] = { -/* RX, TX */ -RCAR_GP_PIN (7 ,14 ),RCAR_GP_PIN (7 ,15 ), -}; -static const unsigned int hscif1_data_e_mux[] = { -HRX1_C_MARK ,HTX1_C_MARK , -};static const unsigned int hscif1_clk_e_pins[] = {/* SCK */ RCAR_GP_PIN (2 ,6 ),
@@ -4543,7 +4536,7 @@ static const struct {SH_PFC_PIN_GROUP (hscif1_clk_c),SH_PFC_PIN_GROUP (hscif1_ctrl_c),SH_PFC_PIN_GROUP (hscif1_data_d), -SH_PFC_PIN_GROUP (hscif1_data_e), +SH_PFC_PIN_GROUP_ALIAS (hscif1_data_e, hscif1_data_c),SH_PFC_PIN_GROUP (hscif1_clk_e),SH_PFC_PIN_GROUP (hscif1_ctrl_e), SH_PFC_PIN_GROUP(hscif2_data),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 10/60 pinctrl: renesas: sh73a0: Share KEYIN pin group data
In reply to Geert UytterhoevenPin groups keysc_in[567] are subsets of keysc_in8.
This reduces kernel size by 144 bytes.
--- drivers/pinctrl/renesas/pfc-sh73a0.c | 36 +++++----------------------- 1 file changed, 6 insertions(+), 30 deletions(-)
drivers/pinctrl/renesas/pfc-sh73a0.c +6 -30
@@ -1777,35 +1777,11 @@ static const unsigned int irda_1_mux[] = { PORT49_IRDA_OUT_MARK, PORT53_IRDA_IN_MARK, PORT54_IRDA_FIRSEL_MARK, };/* - KEYSC ------------------------------------------------------------------ */ -static const unsigned int keysc_in5_pins[] = { -/* KEYIN[0:4] */ -66 ,67 ,68 ,69 ,70 , -}; -static const unsigned int keysc_in5_mux[] = { -KEYIN0_MARK ,KEYIN1_MARK ,KEYIN2_MARK ,KEYIN3_MARK , -KEYIN4_MARK , -}; -static const unsigned int keysc_in6_pins[] = { -/* KEYIN[0:5] */ -66 ,67 ,68 ,69 ,70 ,71 , -}; -static const unsigned int keysc_in6_mux[] = { -KEYIN0_MARK ,KEYIN1_MARK ,KEYIN2_MARK ,KEYIN3_MARK , -KEYIN4_MARK ,KEYIN5_MARK , -}; -static const unsigned int keysc_in7_pins[] = { -/* KEYIN[0:6] */ -66 ,67 ,68 ,69 ,70 ,71 ,72 , -}; -static const unsigned int keysc_in7_mux[] = { -KEYIN0_MARK ,KEYIN1_MARK ,KEYIN2_MARK ,KEYIN3_MARK , -KEYIN4_MARK ,KEYIN5_MARK ,KEYIN6_MARK , -}; -static const unsigned int keysc_in8_pins[] = { +static const unsigned int keysc_in_pins[] = {/* KEYIN[0:7] */ 66 ,67 ,68 ,69 ,70 ,71 ,72 ,73 , }; -static const unsigned int keysc_in8_mux[] = { +static const unsigned int keysc_in_mux[] = {KEYIN0_MARK ,KEYIN1_MARK ,KEYIN2_MARK ,KEYIN3_MARK ,KEYIN4_MARK ,KEYIN5_MARK ,KEYIN6_MARK ,KEYIN7_MARK , };
@@ -3138,10 +3114,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (i2c3_2),SH_PFC_PIN_GROUP (irda_0),SH_PFC_PIN_GROUP (irda_1), -SH_PFC_PIN_GROUP (keysc_in5), -SH_PFC_PIN_GROUP (keysc_in6), -SH_PFC_PIN_GROUP (keysc_in7), -SH_PFC_PIN_GROUP (keysc_in8), +BUS_DATA_PIN_GROUP (keysc_in,5 ), +BUS_DATA_PIN_GROUP (keysc_in,6 ), +BUS_DATA_PIN_GROUP (keysc_in,7 ), +BUS_DATA_PIN_GROUP (keysc_in,8 ),SH_PFC_PIN_GROUP (keysc_out04),SH_PFC_PIN_GROUP (keysc_out5), SH_PFC_PIN_GROUP(keysc_out6_0),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 11/60 pinctrl: renesas: r8a7740: Share LCD pin group data
In reply to Geert UytterhoevenPin groups lcd0_data{8,9,12,16,18} are subsets of lcd0_data24_0. Pin groups lcd1_data{8,9,12,16,18} are subsets of lcd1_data24.
This reduces kernel size by 1008 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7740.c | 130 +++----------------------- 1 file changed, 13 insertions(+), 117 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7740.c +13 -117
@@ -2031,58 +2031,6 @@ IRQC_PINS_MUX(31, 0, 41);IRQC_PINS_MUX (31 ,1 ,167 );/* - LCD0 ------------------------------------------------------------------- */ -static const unsigned int lcd0_data8_pins[] = { -/* D[0:7] */ -58 ,57 ,56 ,55 ,54 ,53 ,52 ,51 , -}; -static const unsigned int lcd0_data8_mux[] = { -LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK , -LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK , -}; -static const unsigned int lcd0_data9_pins[] = { -/* D[0:8] */ -58 ,57 ,56 ,55 ,54 ,53 ,52 ,51 , -50 , -}; -static const unsigned int lcd0_data9_mux[] = { -LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK , -LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK , -LCD0_D8_MARK , -}; -static const unsigned int lcd0_data12_pins[] = { -/* D[0:11] */ -58 ,57 ,56 ,55 ,54 ,53 ,52 ,51 , -50 ,49 ,48 ,47 , -}; -static const unsigned int lcd0_data12_mux[] = { -LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK , -LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK , -LCD0_D8_MARK ,LCD0_D9_MARK ,LCD0_D10_MARK ,LCD0_D11_MARK , -}; -static const unsigned int lcd0_data16_pins[] = { -/* D[0:15] */ -58 ,57 ,56 ,55 ,54 ,53 ,52 ,51 , -50 ,49 ,48 ,47 ,46 ,45 ,44 ,43 , -}; -static const unsigned int lcd0_data16_mux[] = { -LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK , -LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK , -LCD0_D8_MARK ,LCD0_D9_MARK ,LCD0_D10_MARK ,LCD0_D11_MARK , -LCD0_D12_MARK ,LCD0_D13_MARK ,LCD0_D14_MARK ,LCD0_D15_MARK , -}; -static const unsigned int lcd0_data18_pins[] = { -/* D[0:17] */ -58 ,57 ,56 ,55 ,54 ,53 ,52 ,51 , -50 ,49 ,48 ,47 ,46 ,45 ,44 ,43 , -42 ,41 , -}; -static const unsigned int lcd0_data18_mux[] = { -LCD0_D0_MARK ,LCD0_D1_MARK ,LCD0_D2_MARK ,LCD0_D3_MARK , -LCD0_D4_MARK ,LCD0_D5_MARK ,LCD0_D6_MARK ,LCD0_D7_MARK , -LCD0_D8_MARK ,LCD0_D9_MARK ,LCD0_D10_MARK ,LCD0_D11_MARK , -LCD0_D12_MARK ,LCD0_D13_MARK ,LCD0_D14_MARK ,LCD0_D15_MARK , -LCD0_D16_MARK ,LCD0_D17_MARK , -};static const unsigned int lcd0_data24_0_pins[] = {/* D[0:23] */ 58 ,57 ,56 ,55 ,54 ,53 ,52 ,51 ,
@@ -2149,65 +2097,13 @@ static const unsigned int lcd0_sys_mux[] = { LCD0_CS_MARK, LCD0_WR_MARK, LCD0_RD_MARK, LCD0_RS_MARK, };/* - LCD1 ------------------------------------------------------------------- */ -static const unsigned int lcd1_data8_pins[] = { -/* D[0:7] */ -4 ,3 ,2 ,1 ,0 ,91 ,92 ,23 , -}; -static const unsigned int lcd1_data8_mux[] = { -LCD1_D0_MARK ,LCD1_D1_MARK ,LCD1_D2_MARK ,LCD1_D3_MARK , -LCD1_D4_MARK ,LCD1_D5_MARK ,LCD1_D6_MARK ,LCD1_D7_MARK , -}; -static const unsigned int lcd1_data9_pins[] = { -/* D[0:8] */ -4 ,3 ,2 ,1 ,0 ,91 ,92 ,23 , -93 , -}; -static const unsigned int lcd1_data9_mux[] = { -LCD1_D0_MARK ,LCD1_D1_MARK ,LCD1_D2_MARK ,LCD1_D3_MARK , -LCD1_D4_MARK ,LCD1_D5_MARK ,LCD1_D6_MARK ,LCD1_D7_MARK , -LCD1_D8_MARK , -}; -static const unsigned int lcd1_data12_pins[] = { -/* D[0:11] */ -4 ,3 ,2 ,1 ,0 ,91 ,92 ,23 , -93 ,94 ,21 ,201 , -}; -static const unsigned int lcd1_data12_mux[] = { -LCD1_D0_MARK ,LCD1_D1_MARK ,LCD1_D2_MARK ,LCD1_D3_MARK , -LCD1_D4_MARK ,LCD1_D5_MARK ,LCD1_D6_MARK ,LCD1_D7_MARK , -LCD1_D8_MARK ,LCD1_D9_MARK ,LCD1_D10_MARK ,LCD1_D11_MARK , -}; -static const unsigned int lcd1_data16_pins[] = { -/* D[0:15] */ -4 ,3 ,2 ,1 ,0 ,91 ,92 ,23 , -93 ,94 ,21 ,201 ,200 ,199 ,196 ,195 , -}; -static const unsigned int lcd1_data16_mux[] = { -LCD1_D0_MARK ,LCD1_D1_MARK ,LCD1_D2_MARK ,LCD1_D3_MARK , -LCD1_D4_MARK ,LCD1_D5_MARK ,LCD1_D6_MARK ,LCD1_D7_MARK , -LCD1_D8_MARK ,LCD1_D9_MARK ,LCD1_D10_MARK ,LCD1_D11_MARK , -LCD1_D12_MARK ,LCD1_D13_MARK ,LCD1_D14_MARK ,LCD1_D15_MARK , -}; -static const unsigned int lcd1_data18_pins[] = { -/* D[0:17] */ -4 ,3 ,2 ,1 ,0 ,91 ,92 ,23 , -93 ,94 ,21 ,201 ,200 ,199 ,196 ,195 , -194 ,193 , -}; -static const unsigned int lcd1_data18_mux[] = { -LCD1_D0_MARK ,LCD1_D1_MARK ,LCD1_D2_MARK ,LCD1_D3_MARK , -LCD1_D4_MARK ,LCD1_D5_MARK ,LCD1_D6_MARK ,LCD1_D7_MARK , -LCD1_D8_MARK ,LCD1_D9_MARK ,LCD1_D10_MARK ,LCD1_D11_MARK , -LCD1_D12_MARK ,LCD1_D13_MARK ,LCD1_D14_MARK ,LCD1_D15_MARK , -LCD1_D16_MARK ,LCD1_D17_MARK , -}; -static const unsigned int lcd1_data24_pins[] = { +static const unsigned int lcd1_data_pins[] = {/* D[0:23] */ 4 ,3 ,2 ,1 ,0 ,91 ,92 ,23 ,93 ,94 ,21 ,201 ,200 ,199 ,196 ,195 ,194 ,193 ,198 ,197 ,75 ,74 ,15 ,14 , }; -static const unsigned int lcd1_data24_mux[] = { +static const unsigned int lcd1_data_mux[] = {LCD1_D0_MARK ,LCD1_D1_MARK ,LCD1_D2_MARK ,LCD1_D3_MARK ,LCD1_D4_MARK ,LCD1_D5_MARK ,LCD1_D6_MARK ,LCD1_D7_MARK ,LCD1_D8_MARK ,LCD1_D9_MARK ,LCD1_D10_MARK ,LCD1_D11_MARK ,
@@ -2814,11 +2710,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (intc_irq30_1),SH_PFC_PIN_GROUP (intc_irq31_0),SH_PFC_PIN_GROUP (intc_irq31_1), -SH_PFC_PIN_GROUP (lcd0_data8), -SH_PFC_PIN_GROUP (lcd0_data9), -SH_PFC_PIN_GROUP (lcd0_data12), -SH_PFC_PIN_GROUP (lcd0_data16), -SH_PFC_PIN_GROUP (lcd0_data18), +SH_PFC_PIN_GROUP_SUBSET (lcd0_data8, lcd0_data24_0,0 ,8 ), +SH_PFC_PIN_GROUP_SUBSET (lcd0_data9, lcd0_data24_0,0 ,9 ), +SH_PFC_PIN_GROUP_SUBSET (lcd0_data12, lcd0_data24_0,0 ,12 ), +SH_PFC_PIN_GROUP_SUBSET (lcd0_data16, lcd0_data24_0,0 ,16 ), +SH_PFC_PIN_GROUP_SUBSET (lcd0_data18, lcd0_data24_0,0 ,18 ),SH_PFC_PIN_GROUP (lcd0_data24_0),SH_PFC_PIN_GROUP (lcd0_data24_1), SH_PFC_PIN_GROUP(lcd0_display),
@@ -2826,12 +2722,12 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (lcd0_lclk_1),SH_PFC_PIN_GROUP (lcd0_sync),SH_PFC_PIN_GROUP (lcd0_sys), -SH_PFC_PIN_GROUP (lcd1_data8), -SH_PFC_PIN_GROUP (lcd1_data9), -SH_PFC_PIN_GROUP (lcd1_data12), -SH_PFC_PIN_GROUP (lcd1_data16), -SH_PFC_PIN_GROUP (lcd1_data18), -SH_PFC_PIN_GROUP (lcd1_data24), +BUS_DATA_PIN_GROUP (lcd1_data,8 ), +BUS_DATA_PIN_GROUP (lcd1_data,9 ), +BUS_DATA_PIN_GROUP (lcd1_data,12 ), +BUS_DATA_PIN_GROUP (lcd1_data,16 ), +BUS_DATA_PIN_GROUP (lcd1_data,18 ), +BUS_DATA_PIN_GROUP (lcd1_data,24 ),SH_PFC_PIN_GROUP (lcd1_display),SH_PFC_PIN_GROUP (lcd1_lclk), SH_PFC_PIN_GROUP(lcd1_sync),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 12/60 pinctrl: renesas: sh73a0: Share LCD pin group data
In reply to Geert UytterhoevenPin groups lcd{,2}_data{8,9,12,16,18} are subsets of lcd{,2}_data24.
This reduces kernel size by 1008 bytes.
--- drivers/pinctrl/renesas/pfc-sh73a0.c | 136 ++++----------------------- 1 file changed, 16 insertions(+), 120 deletions(-)
drivers/pinctrl/renesas/pfc-sh73a0.c +16 -120
@@ -1912,65 +1912,13 @@ static const unsigned int keysc_out11_1_mux[] = { PORT143_KEYOUT11_MARK, };/* - LCD -------------------------------------------------------------------- */ -static const unsigned int lcd_data8_pins[] = { -/* D[0:7] */ -192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 , -}; -static const unsigned int lcd_data8_mux[] = { -LCDD0_MARK ,LCDD1_MARK ,LCDD2_MARK ,LCDD3_MARK , -LCDD4_MARK ,LCDD5_MARK ,LCDD6_MARK ,LCDD7_MARK , -}; -static const unsigned int lcd_data9_pins[] = { -/* D[0:8] */ -192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 , -200 , -}; -static const unsigned int lcd_data9_mux[] = { -LCDD0_MARK ,LCDD1_MARK ,LCDD2_MARK ,LCDD3_MARK , -LCDD4_MARK ,LCDD5_MARK ,LCDD6_MARK ,LCDD7_MARK , -LCDD8_MARK , -}; -static const unsigned int lcd_data12_pins[] = { -/* D[0:11] */ -192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 , -200 ,201 ,202 ,203 , -}; -static const unsigned int lcd_data12_mux[] = { -LCDD0_MARK ,LCDD1_MARK ,LCDD2_MARK ,LCDD3_MARK , -LCDD4_MARK ,LCDD5_MARK ,LCDD6_MARK ,LCDD7_MARK , -LCDD8_MARK ,LCDD9_MARK ,LCDD10_MARK ,LCDD11_MARK , -}; -static const unsigned int lcd_data16_pins[] = { -/* D[0:15] */ -192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 , -200 ,201 ,202 ,203 ,204 ,205 ,206 ,207 , -}; -static const unsigned int lcd_data16_mux[] = { -LCDD0_MARK ,LCDD1_MARK ,LCDD2_MARK ,LCDD3_MARK , -LCDD4_MARK ,LCDD5_MARK ,LCDD6_MARK ,LCDD7_MARK , -LCDD8_MARK ,LCDD9_MARK ,LCDD10_MARK ,LCDD11_MARK , -LCDD12_MARK ,LCDD13_MARK ,LCDD14_MARK ,LCDD15_MARK , -}; -static const unsigned int lcd_data18_pins[] = { -/* D[0:17] */ -192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 , -200 ,201 ,202 ,203 ,204 ,205 ,206 ,207 , -208 ,209 , -}; -static const unsigned int lcd_data18_mux[] = { -LCDD0_MARK ,LCDD1_MARK ,LCDD2_MARK ,LCDD3_MARK , -LCDD4_MARK ,LCDD5_MARK ,LCDD6_MARK ,LCDD7_MARK , -LCDD8_MARK ,LCDD9_MARK ,LCDD10_MARK ,LCDD11_MARK , -LCDD12_MARK ,LCDD13_MARK ,LCDD14_MARK ,LCDD15_MARK , -LCDD16_MARK ,LCDD17_MARK , -}; -static const unsigned int lcd_data24_pins[] = { +static const unsigned int lcd_data_pins[] = {/* D[0:23] */ 192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 ,200 ,201 ,202 ,203 ,204 ,205 ,206 ,207 ,208 ,209 ,210 ,211 ,212 ,213 ,214 ,215 }; -static const unsigned int lcd_data24_mux[] = { +static const unsigned int lcd_data_mux[] = {LCDD0_MARK ,LCDD1_MARK ,LCDD2_MARK ,LCDD3_MARK ,LCDD4_MARK ,LCDD5_MARK ,LCDD6_MARK ,LCDD7_MARK ,LCDD8_MARK ,LCDD9_MARK ,LCDD10_MARK ,LCDD11_MARK ,
@@ -2007,65 +1955,13 @@ static const unsigned int lcd_sys_mux[] = { LCDCS__MARK, LCDWR__MARK, LCDRD__MARK, LCDRS_MARK, };/* - LCD2 ------------------------------------------------------------------- */ -static const unsigned int lcd2_data8_pins[] = { -/* D[0:7] */ -128 ,129 ,142 ,143 ,144 ,145 ,138 ,139 , -}; -static const unsigned int lcd2_data8_mux[] = { -LCD2D0_MARK ,LCD2D1_MARK ,LCD2D2_MARK ,LCD2D3_MARK , -LCD2D4_MARK ,LCD2D5_MARK ,LCD2D6_MARK ,LCD2D7_MARK , -}; -static const unsigned int lcd2_data9_pins[] = { -/* D[0:8] */ -128 ,129 ,142 ,143 ,144 ,145 ,138 ,139 , -140 , -}; -static const unsigned int lcd2_data9_mux[] = { -LCD2D0_MARK ,LCD2D1_MARK ,LCD2D2_MARK ,LCD2D3_MARK , -LCD2D4_MARK ,LCD2D5_MARK ,LCD2D6_MARK ,LCD2D7_MARK , -LCD2D8_MARK , -}; -static const unsigned int lcd2_data12_pins[] = { -/* D[0:11] */ -128 ,129 ,142 ,143 ,144 ,145 ,138 ,139 , -140 ,141 ,130 ,131 , -}; -static const unsigned int lcd2_data12_mux[] = { -LCD2D0_MARK ,LCD2D1_MARK ,LCD2D2_MARK ,LCD2D3_MARK , -LCD2D4_MARK ,LCD2D5_MARK ,LCD2D6_MARK ,LCD2D7_MARK , -LCD2D8_MARK ,LCD2D9_MARK ,LCD2D10_MARK ,LCD2D11_MARK , -}; -static const unsigned int lcd2_data16_pins[] = { -/* D[0:15] */ -128 ,129 ,142 ,143 ,144 ,145 ,138 ,139 , -140 ,141 ,130 ,131 ,132 ,133 ,134 ,135 , -}; -static const unsigned int lcd2_data16_mux[] = { -LCD2D0_MARK ,LCD2D1_MARK ,LCD2D2_MARK ,LCD2D3_MARK , -LCD2D4_MARK ,LCD2D5_MARK ,LCD2D6_MARK ,LCD2D7_MARK , -LCD2D8_MARK ,LCD2D9_MARK ,LCD2D10_MARK ,LCD2D11_MARK , -LCD2D12_MARK ,LCD2D13_MARK ,LCD2D14_MARK ,LCD2D15_MARK , -}; -static const unsigned int lcd2_data18_pins[] = { -/* D[0:17] */ -128 ,129 ,142 ,143 ,144 ,145 ,138 ,139 , -140 ,141 ,130 ,131 ,132 ,133 ,134 ,135 , -136 ,137 , -}; -static const unsigned int lcd2_data18_mux[] = { -LCD2D0_MARK ,LCD2D1_MARK ,LCD2D2_MARK ,LCD2D3_MARK , -LCD2D4_MARK ,LCD2D5_MARK ,LCD2D6_MARK ,LCD2D7_MARK , -LCD2D8_MARK ,LCD2D9_MARK ,LCD2D10_MARK ,LCD2D11_MARK , -LCD2D12_MARK ,LCD2D13_MARK ,LCD2D14_MARK ,LCD2D15_MARK , -LCD2D16_MARK ,LCD2D17_MARK , -}; -static const unsigned int lcd2_data24_pins[] = { +static const unsigned int lcd2_data_pins[] = {/* D[0:23] */ 128 ,129 ,142 ,143 ,144 ,145 ,138 ,139 ,140 ,141 ,130 ,131 ,132 ,133 ,134 ,135 ,136 ,137 ,146 ,147 ,234 ,235 ,238 ,239 }; -static const unsigned int lcd2_data24_mux[] = { +static const unsigned int lcd2_data_mux[] = {LCD2D0_MARK ,LCD2D1_MARK ,LCD2D2_MARK ,LCD2D3_MARK ,LCD2D4_MARK ,LCD2D5_MARK ,LCD2D6_MARK ,LCD2D7_MARK ,LCD2D8_MARK ,LCD2D9_MARK ,LCD2D10_MARK ,LCD2D11_MARK ,
@@ -3136,22 +3032,22 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (keysc_out10_1),SH_PFC_PIN_GROUP (keysc_out11_0),SH_PFC_PIN_GROUP (keysc_out11_1), -SH_PFC_PIN_GROUP (lcd_data8), -SH_PFC_PIN_GROUP (lcd_data9), -SH_PFC_PIN_GROUP (lcd_data12), -SH_PFC_PIN_GROUP (lcd_data16), -SH_PFC_PIN_GROUP (lcd_data18), -SH_PFC_PIN_GROUP (lcd_data24), +BUS_DATA_PIN_GROUP (lcd_data,8 ), +BUS_DATA_PIN_GROUP (lcd_data,9 ), +BUS_DATA_PIN_GROUP (lcd_data,12 ), +BUS_DATA_PIN_GROUP (lcd_data,16 ), +BUS_DATA_PIN_GROUP (lcd_data,18 ), +BUS_DATA_PIN_GROUP (lcd_data,24 ),SH_PFC_PIN_GROUP (lcd_display),SH_PFC_PIN_GROUP (lcd_lclk),SH_PFC_PIN_GROUP (lcd_sync),SH_PFC_PIN_GROUP (lcd_sys), -SH_PFC_PIN_GROUP (lcd2_data8), -SH_PFC_PIN_GROUP (lcd2_data9), -SH_PFC_PIN_GROUP (lcd2_data12), -SH_PFC_PIN_GROUP (lcd2_data16), -SH_PFC_PIN_GROUP (lcd2_data18), -SH_PFC_PIN_GROUP (lcd2_data24), +BUS_DATA_PIN_GROUP (lcd2_data,8 ), +BUS_DATA_PIN_GROUP (lcd2_data,9 ), +BUS_DATA_PIN_GROUP (lcd2_data,12 ), +BUS_DATA_PIN_GROUP (lcd2_data,16 ), +BUS_DATA_PIN_GROUP (lcd2_data,18 ), +BUS_DATA_PIN_GROUP (lcd2_data,24 ),SH_PFC_PIN_GROUP (lcd2_sync_0),SH_PFC_PIN_GROUP (lcd2_sync_1), SH_PFC_PIN_GROUP(lcd2_sys_0),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 13/60 pinctrl: renesas: r8a73a4: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc[01]_data[14] are subsets of mmc[01]_data8.
This reduces kernel size by 80 bytes.
--- drivers/pinctrl/renesas/pfc-r8a73a4.c | 48 ++++++--------------------- 1 file changed, 10 insertions(+), 38 deletions(-)
drivers/pinctrl/renesas/pfc-r8a73a4.c +10 -38
@@ -1449,25 +1449,11 @@ IRQC_PINS_MUX(327, 55);IRQC_PINS_MUX (328 ,56 );IRQC_PINS_MUX (329 ,57 );/* - MMCIF0 ----------------------------------------------------------------- */ -static const unsigned int mmc0_data1_pins[] = { -/* D[0] */ -164 , -}; -static const unsigned int mmc0_data1_mux[] = { -MMCD0_0_MARK , -}; -static const unsigned int mmc0_data4_pins[] = { -/* D[0:3] */ -164 ,165 ,166 ,167 , -}; -static const unsigned int mmc0_data4_mux[] = { -MMCD0_0_MARK ,MMCD0_1_MARK ,MMCD0_2_MARK ,MMCD0_3_MARK , -}; -static const unsigned int mmc0_data8_pins[] = { +static const unsigned int mmc0_data_pins[] = {/* D[0:7] */ 164 ,165 ,166 ,167 ,168 ,169 ,170 ,171 , }; -static const unsigned int mmc0_data8_mux[] = { +static const unsigned int mmc0_data_mux[] = {MMCD0_0_MARK ,MMCD0_1_MARK ,MMCD0_2_MARK ,MMCD0_3_MARK ,MMCD0_4_MARK ,MMCD0_5_MARK ,MMCD0_6_MARK ,MMCD0_7_MARK , };
@@ -1479,25 +1465,11 @@ static const unsigned int mmc0_ctrl_mux[] = { MMCCMD0_MARK, MMCCLK0_MARK, };/* - MMCIF1 ----------------------------------------------------------------- */ -static const unsigned int mmc1_data1_pins[] = { -/* D[0] */ -199 , -}; -static const unsigned int mmc1_data1_mux[] = { -MMCD1_0_MARK , -}; -static const unsigned int mmc1_data4_pins[] = { -/* D[0:3] */ -199 ,198 ,197 ,196 , -}; -static const unsigned int mmc1_data4_mux[] = { -MMCD1_0_MARK ,MMCD1_1_MARK ,MMCD1_2_MARK ,MMCD1_3_MARK , -}; -static const unsigned int mmc1_data8_pins[] = { +static const unsigned int mmc1_data_pins[] = {/* D[0:7] */ 199 ,198 ,197 ,196 ,195 ,194 ,193 ,192 , }; -static const unsigned int mmc1_data8_mux[] = { +static const unsigned int mmc1_data_mux[] = {MMCD1_0_MARK ,MMCD1_1_MARK ,MMCD1_2_MARK ,MMCD1_3_MARK ,MMCD1_4_MARK ,MMCD1_5_MARK ,MMCD1_6_MARK ,MMCD1_7_MARK , };
@@ -1843,13 +1815,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (irqc_irq55),SH_PFC_PIN_GROUP (irqc_irq56),SH_PFC_PIN_GROUP (irqc_irq57), -SH_PFC_PIN_GROUP (mmc0_data1), -SH_PFC_PIN_GROUP (mmc0_data4), -SH_PFC_PIN_GROUP (mmc0_data8), +BUS_DATA_PIN_GROUP (mmc0_data,1 ), +BUS_DATA_PIN_GROUP (mmc0_data,4 ), +BUS_DATA_PIN_GROUP (mmc0_data,8 ),SH_PFC_PIN_GROUP (mmc0_ctrl), -SH_PFC_PIN_GROUP (mmc1_data1), -SH_PFC_PIN_GROUP (mmc1_data4), -SH_PFC_PIN_GROUP (mmc1_data8), +BUS_DATA_PIN_GROUP (mmc1_data,1 ), +BUS_DATA_PIN_GROUP (mmc1_data,4 ), +BUS_DATA_PIN_GROUP (mmc1_data,8 ),SH_PFC_PIN_GROUP (mmc1_ctrl),SH_PFC_PIN_GROUP (scifa0_data), SH_PFC_PIN_GROUP(scifa0_clk),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 14/60 pinctrl: renesas: r8a7740: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc0_data[14]_[01] are subsets of mmc0_data8_[01].
This reduces kernel size by 80 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7740.c | 48 ++++++--------------------- 1 file changed, 10 insertions(+), 38 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7740.c +10 -38
@@ -2140,25 +2140,11 @@ static const unsigned int lcd1_sys_mux[] = { LCD1_CS_MARK, LCD1_WR_MARK, LCD1_RD_MARK, LCD1_RS_MARK, };/* - MMCIF ------------------------------------------------------------------ */ -static const unsigned int mmc0_data1_0_pins[] = { -/* D[0] */ -68 , -}; -static const unsigned int mmc0_data1_0_mux[] = { -MMC0_D0_PORT68_MARK , -}; -static const unsigned int mmc0_data4_0_pins[] = { -/* D[0:3] */ -68 ,69 ,70 ,71 , -}; -static const unsigned int mmc0_data4_0_mux[] = { -MMC0_D0_PORT68_MARK ,MMC0_D1_PORT69_MARK ,MMC0_D2_PORT70_MARK ,MMC0_D3_PORT71_MARK , -}; -static const unsigned int mmc0_data8_0_pins[] = { +static const unsigned int mmc0_data_0_pins[] = {/* D[0:7] */ 68 ,69 ,70 ,71 ,72 ,73 ,74 ,75 , }; -static const unsigned int mmc0_data8_0_mux[] = { +static const unsigned int mmc0_data_0_mux[] = {MMC0_D0_PORT68_MARK ,MMC0_D1_PORT69_MARK ,MMC0_D2_PORT70_MARK ,MMC0_D3_PORT71_MARK ,MMC0_D4_PORT72_MARK ,MMC0_D5_PORT73_MARK ,MMC0_D6_PORT74_MARK ,MMC0_D7_PORT75_MARK , };
@@ -2170,25 +2156,11 @@ static const unsigned int mmc0_ctrl_0_mux[] = { MMC0_CMD_PORT67_MARK, MMC0_CLK_PORT66_MARK, }; -static const unsigned int mmc0_data1_1_pins[] = { -/* D[0] */ -149 , -}; -static const unsigned int mmc0_data1_1_mux[] = { -MMC1_D0_PORT149_MARK , -}; -static const unsigned int mmc0_data4_1_pins[] = { -/* D[0:3] */ -149 ,148 ,147 ,146 , -}; -static const unsigned int mmc0_data4_1_mux[] = { -MMC1_D0_PORT149_MARK ,MMC1_D1_PORT148_MARK ,MMC1_D2_PORT147_MARK ,MMC1_D3_PORT146_MARK , -}; -static const unsigned int mmc0_data8_1_pins[] = { +static const unsigned int mmc0_data_1_pins[] = {/* D[0:7] */ 149 ,148 ,147 ,146 ,145 ,144 ,143 ,142 , }; -static const unsigned int mmc0_data8_1_mux[] = { +static const unsigned int mmc0_data_1_mux[] = {MMC1_D0_PORT149_MARK ,MMC1_D1_PORT148_MARK ,MMC1_D2_PORT147_MARK ,MMC1_D3_PORT146_MARK ,MMC1_D4_PORT145_MARK ,MMC1_D5_PORT144_MARK ,MMC1_D6_PORT143_MARK ,MMC1_D7_PORT142_MARK , };
@@ -2732,13 +2704,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (lcd1_lclk),SH_PFC_PIN_GROUP (lcd1_sync),SH_PFC_PIN_GROUP (lcd1_sys), -SH_PFC_PIN_GROUP (mmc0_data1_0), -SH_PFC_PIN_GROUP (mmc0_data4_0), -SH_PFC_PIN_GROUP (mmc0_data8_0), +BUS_DATA_PIN_GROUP (mmc0_data,1 , _0), +BUS_DATA_PIN_GROUP (mmc0_data,4 , _0), +BUS_DATA_PIN_GROUP (mmc0_data,8 , _0),SH_PFC_PIN_GROUP (mmc0_ctrl_0), -SH_PFC_PIN_GROUP (mmc0_data1_1), -SH_PFC_PIN_GROUP (mmc0_data4_1), -SH_PFC_PIN_GROUP (mmc0_data8_1), +BUS_DATA_PIN_GROUP (mmc0_data,1 , _1), +BUS_DATA_PIN_GROUP (mmc0_data,4 , _1), +BUS_DATA_PIN_GROUP (mmc0_data,8 , _1),SH_PFC_PIN_GROUP (mmc0_ctrl_1),SH_PFC_PIN_GROUP (scifa0_data), SH_PFC_PIN_GROUP(scifa0_clk),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 15/60 pinctrl: renesas: r8a77470: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] and sdhi1_data[14] are subsets of mmc_data8. Pin group sdhi1_ctrl can be an alias for mmc_ctrl.
This reduces kernel size by 96 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77470.c | 55 ++++---------------------- 1 file changed, 8 insertions(+), 47 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77470.c +8 -47
@@ -1595,30 +1595,14 @@ static const unsigned int i2c4_e_mux[] = { SCL4_E_MARK, SDA4_E_MARK, };/* - MMC -------------------------------------------------------------------- */ -static const unsigned int mmc_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (0 ,15 ), -}; -static const unsigned int mmc_data1_mux[] = { -MMC0_D0_SDHI1_D0_MARK , -}; -static const unsigned int mmc_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (0 ,15 ),RCAR_GP_PIN (0 ,16 ), -RCAR_GP_PIN (0 ,17 ),RCAR_GP_PIN (0 ,18 ), -}; -static const unsigned int mmc_data4_mux[] = { -MMC0_D0_SDHI1_D0_MARK ,MMC0_D1_SDHI1_D1_MARK , -MMC0_D2_SDHI1_D2_MARK ,MMC0_D3_SDHI1_D3_MARK , -}; -static const unsigned int mmc_data8_pins[] = { +static const unsigned int mmc_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (0 ,15 ),RCAR_GP_PIN (0 ,16 ),RCAR_GP_PIN (0 ,17 ),RCAR_GP_PIN (0 ,18 ),RCAR_GP_PIN (0 ,19 ),RCAR_GP_PIN (0 ,20 ),RCAR_GP_PIN (0 ,21 ),RCAR_GP_PIN (0 ,22 ), }; -static const unsigned int mmc_data8_mux[] = { +static const unsigned int mmc_data_mux[] = {MMC0_D0_SDHI1_D0_MARK ,MMC0_D1_SDHI1_D1_MARK ,MMC0_D2_SDHI1_D2_MARK ,MMC0_D3_SDHI1_D3_MARK ,MMC0_D4_MARK ,MMC0_D5_MARK ,
@@ -1954,29 +1938,6 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (0 ,15 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -MMC0_D0_SDHI1_D0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (0 ,15 ),RCAR_GP_PIN (0 ,16 ), -RCAR_GP_PIN (0 ,17 ),RCAR_GP_PIN (0 ,18 ), -}; -static const unsigned int sdhi1_data4_mux[] = { -MMC0_D0_SDHI1_D0_MARK ,MMC0_D1_SDHI1_D1_MARK , -MMC0_D2_SDHI1_D2_MARK ,MMC0_D3_SDHI1_D3_MARK , -}; -static const unsigned int sdhi1_ctrl_pins[] = { -/* CLK, CMD */ -RCAR_GP_PIN (0 ,13 ),RCAR_GP_PIN (0 ,14 ), -}; -static const unsigned int sdhi1_ctrl_mux[] = { -MMC0_CLK_SDHI1_CLK_MARK ,MMC0_CMD_SDHI1_CMD_MARK , -};static const unsigned int sdhi1_cd_pins[] = {/* CD */ RCAR_GP_PIN (0 ,19 ),
@@ -2235,9 +2196,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (i2c4_c),SH_PFC_PIN_GROUP (i2c4_d),SH_PFC_PIN_GROUP (i2c4_e), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (qspi0_ctrl), SH_PFC_PIN_GROUP(qspi0_data2),
@@ -2283,9 +2244,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), -SH_PFC_PIN_GROUP (sdhi1_ctrl), +SH_PFC_PIN_GROUP_SUBSET (sdhi1_data1, mmc_data,0 ,1 ), +SH_PFC_PIN_GROUP_SUBSET (sdhi1_data4, mmc_data,0 ,4 ), +SH_PFC_PIN_GROUP_ALIAS (sdhi1_ctrl, mmc_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), SH_PFC_PIN_GROUP(sdhi2_data1),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 16/60 pinctrl: renesas: r8a7778: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] are subsets of mmc_data8.
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7778.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7778.c +5 -13
@@ -1427,25 +1427,17 @@ I2C_PFC_MUX(i2c3_c, SDA3_C, SCL3_C);/* - MMC macro -------------------------------------------------------------- */ #define MMC_PFC_PINS(name, args...) SH_PFC_PINS(name, args)#define MMC_PFC_CTRL (name, clk, cmd) SH_PFC_MUX2(name, clk, cmd) -#define MMC_PFC_DAT1 (name, d0) SH_PFC_MUX1(name, d0) -#define MMC_PFC_DAT4 (name, d0, d1, d2, d3) SH_PFC_MUX4(name, d0, d1, d2, d3)#define MMC_PFC_DAT8 (name, d0, d1, d2, d3, d4, d5, d6, d7) \ SH_PFC_MUX8(name, d0, d1, d2, d3, d4, d5, d6, d7)/* - MMC -------------------------------------------------------------------- */ MMC_PFC_PINS (mmc_ctrl,RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ));MMC_PFC_CTRL (mmc_ctrl,MMC_CLK ,MMC_CMD ); -MMC_PFC_PINS (mmc_data1,RCAR_GP_PIN (1 ,7 )); -MMC_PFC_DAT1 (mmc_data1,MMC_D0 ); -MMC_PFC_PINS (mmc_data4,RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ), -RCAR_GP_PIN (0 ,5 ),RCAR_GP_PIN (0 ,6 )); -MMC_PFC_DAT4 (mmc_data4,MMC_D0 ,MMC_D1 , -MMC_D2 ,MMC_D3 ); -MMC_PFC_PINS (mmc_data8,RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ), +MMC_PFC_PINS (mmc_data,RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ),RCAR_GP_PIN (0 ,5 ),RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,0 ),RCAR_GP_PIN (0 ,30 ),RCAR_GP_PIN (0 ,31 )); -MMC_PFC_DAT8 (mmc_data8,MMC_D0 ,MMC_D1 , +MMC_PFC_DAT8 (mmc_data,MMC_D0 ,MMC_D1 ,MMC_D2 ,MMC_D3 ,MMC_D4 ,MMC_D5 ,MMC_D6 ,MMC_D7 );
@@ -1744,9 +1736,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (i2c3_b),SH_PFC_PIN_GROUP (i2c3_c),SH_PFC_PIN_GROUP (mmc_ctrl), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (scif_clk),SH_PFC_PIN_GROUP (scif0_data_a), SH_PFC_PIN_GROUP(scif0_data_b),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 17/60 pinctrl: renesas: r8a7779: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc[01]_data[14] are subsets of mmc[01]_data8.
This reduces kernel size by 80 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7779.c | 50 ++++++--------------------- 1 file changed, 10 insertions(+), 40 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7779.c +10 -40
@@ -1928,28 +1928,13 @@ static const unsigned int lbsc_ex_cs5_mux[] = { EX_CS5_MARK, };/* - MMCIF ------------------------------------------------------------------ */ -static const unsigned int mmc0_data1_pins[] = { -/* D[0] */ -RCAR_GP_PIN (0 ,19 ), -}; -static const unsigned int mmc0_data1_mux[] = { -MMC0_D0_MARK , -}; -static const unsigned int mmc0_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (0 ,19 ),RCAR_GP_PIN (0 ,20 ),RCAR_GP_PIN (0 ,21 ), -RCAR_GP_PIN (0 ,2 ), -}; -static const unsigned int mmc0_data4_mux[] = { -MMC0_D0_MARK ,MMC0_D1_MARK ,MMC0_D2_MARK ,MMC0_D3_MARK , -}; -static const unsigned int mmc0_data8_pins[] = { +static const unsigned int mmc0_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (0 ,19 ),RCAR_GP_PIN (0 ,20 ),RCAR_GP_PIN (0 ,21 ),RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,10 ),RCAR_GP_PIN (0 ,11 ),RCAR_GP_PIN (0 ,15 ),RCAR_GP_PIN (0 ,16 ), }; -static const unsigned int mmc0_data8_mux[] = { +static const unsigned int mmc0_data_mux[] = {MMC0_D0_MARK ,MMC0_D1_MARK ,MMC0_D2_MARK ,MMC0_D3_MARK ,MMC0_D4_MARK ,MMC0_D5_MARK ,MMC0_D6_MARK ,MMC0_D7_MARK , };
@@ -1960,28 +1945,13 @@ static const unsigned int mmc0_ctrl_pins[] = {static const unsigned int mmc0_ctrl_mux[] = {MMC0_CMD_MARK ,MMC0_CLK_MARK , }; -static const unsigned int mmc1_data1_pins[] = { -/* D[0] */ -RCAR_GP_PIN (2 ,8 ), -}; -static const unsigned int mmc1_data1_mux[] = { -MMC1_D0_MARK , -}; -static const unsigned int mmc1_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (2 ,8 ),RCAR_GP_PIN (2 ,9 ),RCAR_GP_PIN (2 ,10 ), -RCAR_GP_PIN (2 ,11 ), -}; -static const unsigned int mmc1_data4_mux[] = { -MMC1_D0_MARK ,MMC1_D1_MARK ,MMC1_D2_MARK ,MMC1_D3_MARK , -}; -static const unsigned int mmc1_data8_pins[] = { +static const unsigned int mmc1_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (2 ,8 ),RCAR_GP_PIN (2 ,9 ),RCAR_GP_PIN (2 ,10 ),RCAR_GP_PIN (2 ,11 ),RCAR_GP_PIN (2 ,12 ),RCAR_GP_PIN (2 ,13 ),RCAR_GP_PIN (2 ,16 ),RCAR_GP_PIN (2 ,17 ), }; -static const unsigned int mmc1_data8_mux[] = { +static const unsigned int mmc1_data_mux[] = {MMC1_D0_MARK ,MMC1_D1_MARK ,MMC1_D2_MARK ,MMC1_D3_MARK ,MMC1_D4_MARK ,MMC1_D5_MARK ,MMC1_D6_MARK ,MMC1_D7_MARK , };
@@ -2749,13 +2719,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (lbsc_ex_cs3),SH_PFC_PIN_GROUP (lbsc_ex_cs4),SH_PFC_PIN_GROUP (lbsc_ex_cs5), -SH_PFC_PIN_GROUP (mmc0_data1), -SH_PFC_PIN_GROUP (mmc0_data4), -SH_PFC_PIN_GROUP (mmc0_data8), +BUS_DATA_PIN_GROUP (mmc0_data,1 ), +BUS_DATA_PIN_GROUP (mmc0_data,4 ), +BUS_DATA_PIN_GROUP (mmc0_data,8 ),SH_PFC_PIN_GROUP (mmc0_ctrl), -SH_PFC_PIN_GROUP (mmc1_data1), -SH_PFC_PIN_GROUP (mmc1_data4), -SH_PFC_PIN_GROUP (mmc1_data8), +BUS_DATA_PIN_GROUP (mmc1_data,1 ), +BUS_DATA_PIN_GROUP (mmc1_data,4 ), +BUS_DATA_PIN_GROUP (mmc1_data,8 ),SH_PFC_PIN_GROUP (mmc1_ctrl),SH_PFC_PIN_GROUP (scif0_data), SH_PFC_PIN_GROUP(scif0_clk),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 18/60 pinctrl: renesas: r8a7790: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc[01]_data[14] are subsets of mmc[01]_data8.
This reduces kernel size by 80 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7790.c | 50 ++++++--------------------- 1 file changed, 10 insertions(+), 40 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7790.c +10 -40
@@ -2405,29 +2405,14 @@ static const unsigned int mlb_3pin_mux[] = {#endif /* CONFIG_PINCTRL_PFC_R8A7790 */ /* - MMCIF0 ----------------------------------------------------------------- */ -static const unsigned int mmc0_data1_pins[] = { -/* D[0] */ -RCAR_GP_PIN (3 ,18 ), -}; -static const unsigned int mmc0_data1_mux[] = { -MMC0_D0_MARK , -}; -static const unsigned int mmc0_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (3 ,18 ),RCAR_GP_PIN (3 ,19 ), -RCAR_GP_PIN (3 ,20 ),RCAR_GP_PIN (3 ,21 ), -}; -static const unsigned int mmc0_data4_mux[] = { -MMC0_D0_MARK ,MMC0_D1_MARK ,MMC0_D2_MARK ,MMC0_D3_MARK , -}; -static const unsigned int mmc0_data8_pins[] = { +static const unsigned int mmc0_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (3 ,18 ),RCAR_GP_PIN (3 ,19 ),RCAR_GP_PIN (3 ,20 ),RCAR_GP_PIN (3 ,21 ),RCAR_GP_PIN (3 ,22 ),RCAR_GP_PIN (3 ,23 ),RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ), }; -static const unsigned int mmc0_data8_mux[] = { +static const unsigned int mmc0_data_mux[] = {MMC0_D0_MARK ,MMC0_D1_MARK ,MMC0_D2_MARK ,MMC0_D3_MARK ,MMC0_D4_MARK ,MMC0_D5_MARK ,MMC0_D6_MARK ,MMC0_D7_MARK , };
@@ -2439,29 +2424,14 @@ static const unsigned int mmc0_ctrl_mux[] = { MMC0_CLK_MARK, MMC0_CMD_MARK, };/* - MMCIF1 ----------------------------------------------------------------- */ -static const unsigned int mmc1_data1_pins[] = { -/* D[0] */ -RCAR_GP_PIN (3 ,26 ), -}; -static const unsigned int mmc1_data1_mux[] = { -MMC1_D0_MARK , -}; -static const unsigned int mmc1_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (3 ,26 ),RCAR_GP_PIN (3 ,27 ), -RCAR_GP_PIN (3 ,28 ),RCAR_GP_PIN (3 ,29 ), -}; -static const unsigned int mmc1_data4_mux[] = { -MMC1_D0_MARK ,MMC1_D1_MARK ,MMC1_D2_MARK ,MMC1_D3_MARK , -}; -static const unsigned int mmc1_data8_pins[] = { +static const unsigned int mmc1_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (3 ,26 ),RCAR_GP_PIN (3 ,27 ),RCAR_GP_PIN (3 ,28 ),RCAR_GP_PIN (3 ,29 ),RCAR_GP_PIN (3 ,30 ),RCAR_GP_PIN (3 ,31 ),RCAR_GP_PIN (3 ,14 ),RCAR_GP_PIN (3 ,15 ), }; -static const unsigned int mmc1_data8_mux[] = { +static const unsigned int mmc1_data_mux[] = {MMC1_D0_MARK ,MMC1_D1_MARK ,MMC1_D2_MARK ,MMC1_D3_MARK ,MMC1_D4_MARK ,MMC1_D5_MARK ,MMC1_D6_MARK ,MMC1_D7_MARK , };
@@ -4202,13 +4172,13 @@ static const struct {SH_PFC_PIN_GROUP (intc_irq1),SH_PFC_PIN_GROUP (intc_irq2),SH_PFC_PIN_GROUP (intc_irq3), -SH_PFC_PIN_GROUP (mmc0_data1), -SH_PFC_PIN_GROUP (mmc0_data4), -SH_PFC_PIN_GROUP (mmc0_data8), +BUS_DATA_PIN_GROUP (mmc0_data,1 ), +BUS_DATA_PIN_GROUP (mmc0_data,4 ), +BUS_DATA_PIN_GROUP (mmc0_data,8 ),SH_PFC_PIN_GROUP (mmc0_ctrl), -SH_PFC_PIN_GROUP (mmc1_data1), -SH_PFC_PIN_GROUP (mmc1_data4), -SH_PFC_PIN_GROUP (mmc1_data8), +BUS_DATA_PIN_GROUP (mmc1_data,1 ), +BUS_DATA_PIN_GROUP (mmc1_data,4 ), +BUS_DATA_PIN_GROUP (mmc1_data,8 ),SH_PFC_PIN_GROUP (mmc1_ctrl),SH_PFC_PIN_GROUP (msiof0_clk), SH_PFC_PIN_GROUP(msiof0_sync),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 19/60 pinctrl: renesas: r8a7791: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] are subsets of mmc_data8.
Treat mmc_data8_b the same for consistency. Note that there is no need to define 1-bit and 4-bit wide subsets for the b-variant, as they're identical to the normal variants.
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7791.c | 31 +++++++-------------------- 1 file changed, 8 insertions(+), 23 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7791.c +8 -23
@@ -2592,40 +2592,25 @@ static const unsigned int mlb_3pin_mux[] = {#endif /* CONFIG_PINCTRL_PFC_R8A7791 || CONFIG_PINCTRL_PFC_R8A7793 */ /* - MMCIF ------------------------------------------------------------------ */ -static const unsigned int mmc_data1_pins[] = { -/* D[0] */ -RCAR_GP_PIN (6 ,18 ), -}; -static const unsigned int mmc_data1_mux[] = { -MMC_D0_MARK , -}; -static const unsigned int mmc_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (6 ,18 ),RCAR_GP_PIN (6 ,19 ), -RCAR_GP_PIN (6 ,20 ),RCAR_GP_PIN (6 ,21 ), -}; -static const unsigned int mmc_data4_mux[] = { -MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK , -}; -static const unsigned int mmc_data8_pins[] = { +static const unsigned int mmc_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (6 ,18 ),RCAR_GP_PIN (6 ,19 ),RCAR_GP_PIN (6 ,20 ),RCAR_GP_PIN (6 ,21 ),RCAR_GP_PIN (6 ,22 ),RCAR_GP_PIN (6 ,23 ),RCAR_GP_PIN (6 ,28 ),RCAR_GP_PIN (6 ,29 ), }; -static const unsigned int mmc_data8_mux[] = { +static const unsigned int mmc_data_mux[] = {MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK ,MMC_D4_MARK ,MMC_D5_MARK ,MMC_D6_MARK ,MMC_D7_MARK , }; -static const unsigned int mmc_data8_b_pins[] = { +static const unsigned int mmc_data_b_pins[] = {/* D[0:7] */ RCAR_GP_PIN (6 ,18 ),RCAR_GP_PIN (6 ,19 ),RCAR_GP_PIN (6 ,20 ),RCAR_GP_PIN (6 ,21 ),RCAR_GP_PIN (6 ,22 ),RCAR_GP_PIN (6 ,23 ),RCAR_GP_PIN (6 ,6 ),RCAR_GP_PIN (6 ,7 ), }; -static const unsigned int mmc_data8_b_mux[] = { +static const unsigned int mmc_data_b_mux[] = {MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK ,MMC_D4_MARK ,MMC_D5_MARK ,MMC_D6_B_MARK ,MMC_D7_B_MARK , };
@@ -4576,10 +4561,10 @@ static const struct {SH_PFC_PIN_GROUP (intc_irq1),SH_PFC_PIN_GROUP (intc_irq2),SH_PFC_PIN_GROUP (intc_irq3), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), -SH_PFC_PIN_GROUP (mmc_data8_b), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ), +BUS_DATA_PIN_GROUP (mmc_data,8 , _b),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (msiof0_clk), SH_PFC_PIN_GROUP(msiof0_sync),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 20/60 pinctrl: renesas: r8a7794: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] are subsets of mmc_data8.
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7794.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7794.c +5 -20
@@ -2388,29 +2388,14 @@ static const unsigned int intc_irq9_mux[] = { IRQ9_MARK, };/* - MMCIF ------------------------------------------------------------------ */ -static const unsigned int mmc_data1_pins[] = { -/* D[0] */ -RCAR_GP_PIN (6 ,18 ), -}; -static const unsigned int mmc_data1_mux[] = { -MMC_D0_MARK , -}; -static const unsigned int mmc_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (6 ,18 ),RCAR_GP_PIN (6 ,19 ), -RCAR_GP_PIN (6 ,20 ),RCAR_GP_PIN (6 ,21 ), -}; -static const unsigned int mmc_data4_mux[] = { -MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK , -}; -static const unsigned int mmc_data8_pins[] = { +static const unsigned int mmc_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (6 ,18 ),RCAR_GP_PIN (6 ,19 ),RCAR_GP_PIN (6 ,20 ),RCAR_GP_PIN (6 ,21 ),RCAR_GP_PIN (6 ,22 ),RCAR_GP_PIN (6 ,23 ),RCAR_GP_PIN (6 ,24 ),RCAR_GP_PIN (6 ,25 ), }; -static const unsigned int mmc_data8_mux[] = { +static const unsigned int mmc_data_mux[] = {MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK ,MMC_D4_MARK ,MMC_D5_MARK ,MMC_D6_MARK ,MMC_D7_MARK , };
@@ -3915,9 +3900,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (intc_irq7),SH_PFC_PIN_GROUP (intc_irq8),SH_PFC_PIN_GROUP (intc_irq9), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (msiof0_clk), SH_PFC_PIN_GROUP(msiof0_sync),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 21/60 pinctrl: renesas: r8a77970: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] are subsets of mmc_data8.
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77970.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77970.c +5 -21
@@ -1102,30 +1102,14 @@ static const unsigned int intc_ex_irq5_mux[] = { };/* - MMC -------------------------------------------------------------------- */ -static const unsigned int mmc_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,6 ), -}; -static const unsigned int mmc_data1_mux[] = { -MMC_D0_MARK , -}; -static const unsigned int mmc_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ), -RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ), -}; -static const unsigned int mmc_data4_mux[] = { -MMC_D0_MARK ,MMC_D1_MARK , -MMC_D2_MARK ,MMC_D3_MARK , -}; -static const unsigned int mmc_data8_pins[] = { +static const unsigned int mmc_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ),RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,11 ),RCAR_GP_PIN (3 ,12 ),RCAR_GP_PIN (3 ,13 ),RCAR_GP_PIN (3 ,14 ), }; -static const unsigned int mmc_data8_mux[] = { +static const unsigned int mmc_data_mux[] = {MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK ,MMC_D4_MARK ,MMC_D5_MARK ,
@@ -1775,9 +1759,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (intc_ex_irq3),SH_PFC_PIN_GROUP (intc_ex_irq4),SH_PFC_PIN_GROUP (intc_ex_irq5), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (msiof0_clk), SH_PFC_PIN_GROUP(msiof0_sync),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 22/60 pinctrl: renesas: r8a77980: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] are subsets of mmc_data8.
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77980.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77980.c +5 -21
@@ -1365,30 +1365,14 @@ static const unsigned int intc_ex_irq5_mux[] = { };/* - MMC -------------------------------------------------------------------- */ -static const unsigned int mmc_data1_pins[] = { -/* MMC_D0 */ -RCAR_GP_PIN (3 ,8 ), -}; -static const unsigned int mmc_data1_mux[] = { -MMC_D0_MARK , -}; -static const unsigned int mmc_data4_pins[] = { -/* MMC_D[0:3] */ -RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ), -RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), -}; -static const unsigned int mmc_data4_mux[] = { -MMC_D0_MARK ,MMC_D1_MARK , -MMC_D2_MARK ,MMC_D3_MARK , -}; -static const unsigned int mmc_data8_pins[] = { +static const unsigned int mmc_data_pins[] = {/* MMC_D[0:7] */ RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ),RCAR_GP_PIN (3 ,13 ),RCAR_GP_PIN (3 ,14 ),RCAR_GP_PIN (3 ,15 ),RCAR_GP_PIN (3 ,16 ), }; -static const unsigned int mmc_data8_mux[] = { +static const unsigned int mmc_data_mux[] = {MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK ,MMC_D4_MARK ,MMC_D5_MARK ,
@@ -2148,9 +2132,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (intc_ex_irq3),SH_PFC_PIN_GROUP (intc_ex_irq4),SH_PFC_PIN_GROUP (intc_ex_irq5), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (mmc_cd), SH_PFC_PIN_GROUP(mmc_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 23/60 pinctrl: renesas: r8a77995: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] are subsets of mmc_data8.
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77995.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77995.c +5 -21
@@ -1258,30 +1258,14 @@ static const unsigned int i2c3_b_mux[] = { };/* - MMC ------------------------------------------------------------------- */ -static const unsigned int mmc_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,2 ), -}; -static const unsigned int mmc_data1_mux[] = { -MMC_D0_MARK , -}; -static const unsigned int mmc_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ), -RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), -}; -static const unsigned int mmc_data4_mux[] = { -MMC_D0_MARK ,MMC_D1_MARK , -MMC_D2_MARK ,MMC_D3_MARK , -}; -static const unsigned int mmc_data8_pins[] = { +static const unsigned int mmc_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ),RCAR_GP_PIN (3 ,6 ),RCAR_GP_PIN (3 ,7 ),RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ), }; -static const unsigned int mmc_data8_mux[] = { +static const unsigned int mmc_data_mux[] = {MMC_D0_MARK ,MMC_D1_MARK ,MMC_D2_MARK ,MMC_D3_MARK ,MMC_D4_MARK ,MMC_D5_MARK ,
@@ -2045,9 +2029,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (i2c2_b),SH_PFC_PIN_GROUP (i2c3_a),SH_PFC_PIN_GROUP (i2c3_b), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (msiof0_clk), SH_PFC_PIN_GROUP(msiof0_sync),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 24/60 pinctrl: renesas: r8a779a0: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc_data[14] are subsets of mmc_data8.
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a779a0.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-)
drivers/pinctrl/renesas/pfc-r8a779a0.c +5 -21
@@ -2009,30 +2009,14 @@ static const unsigned int intc_ex_irq5_mux[] = { };/* - MMC -------------------------------------------------------------------- */ -static const unsigned int mmc_data1_pins[] = { -/* MMC_SD_D0 */ -RCAR_GP_PIN (0 ,19 ), -}; -static const unsigned int mmc_data1_mux[] = { -MMC_SD_D0_MARK , -}; -static const unsigned int mmc_data4_pins[] = { -/* MMC_SD_D[0:3] */ -RCAR_GP_PIN (0 ,19 ),RCAR_GP_PIN (0 ,20 ), -RCAR_GP_PIN (0 ,21 ),RCAR_GP_PIN (0 ,22 ), -}; -static const unsigned int mmc_data4_mux[] = { -MMC_SD_D0_MARK ,MMC_SD_D1_MARK , -MMC_SD_D2_MARK ,MMC_SD_D3_MARK , -}; -static const unsigned int mmc_data8_pins[] = { +static const unsigned int mmc_data_pins[] = {/* MMC_SD_D[0:3], MMC_D[4:7] */ RCAR_GP_PIN (0 ,19 ),RCAR_GP_PIN (0 ,20 ),RCAR_GP_PIN (0 ,21 ),RCAR_GP_PIN (0 ,22 ),RCAR_GP_PIN (0 ,24 ),RCAR_GP_PIN (0 ,25 ),RCAR_GP_PIN (0 ,26 ),RCAR_GP_PIN (0 ,27 ), }; -static const unsigned int mmc_data8_mux[] = { +static const unsigned int mmc_data_mux[] = {MMC_SD_D0_MARK ,MMC_SD_D1_MARK ,MMC_SD_D2_MARK ,MMC_SD_D3_MARK ,MMC_D4_MARK ,MMC_D5_MARK ,
@@ -2715,9 +2699,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (intc_ex_irq4),SH_PFC_PIN_GROUP (intc_ex_irq5), -SH_PFC_PIN_GROUP (mmc_data1), -SH_PFC_PIN_GROUP (mmc_data4), -SH_PFC_PIN_GROUP (mmc_data8), +BUS_DATA_PIN_GROUP (mmc_data,1 ), +BUS_DATA_PIN_GROUP (mmc_data,4 ), +BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (mmc_cd), SH_PFC_PIN_GROUP(mmc_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 25/60 pinctrl: renesas: sh73a0: Share MMC pin group data
In reply to Geert UytterhoevenPin groups mmc0_data[14]_[01] are subsets of mmc0_data8_[01].
This reduces kernel size by 80 bytes.
--- drivers/pinctrl/renesas/pfc-sh73a0.c | 48 ++++++---------------------- 1 file changed, 10 insertions(+), 38 deletions(-)
drivers/pinctrl/renesas/pfc-sh73a0.c +10 -38
@@ -2002,25 +2002,11 @@ static const unsigned int lcd2_sys_1_mux[] = { LCD2RD__MARK, PORT217_LCD2RS_MARK, };/* - MMCIF ------------------------------------------------------------------ */ -static const unsigned int mmc0_data1_0_pins[] = { -/* D[0] */ -271 , -}; -static const unsigned int mmc0_data1_0_mux[] = { -MMCD0_0_MARK , -}; -static const unsigned int mmc0_data4_0_pins[] = { -/* D[0:3] */ -271 ,272 ,273 ,274 , -}; -static const unsigned int mmc0_data4_0_mux[] = { -MMCD0_0_MARK ,MMCD0_1_MARK ,MMCD0_2_MARK ,MMCD0_3_MARK , -}; -static const unsigned int mmc0_data8_0_pins[] = { +static const unsigned int mmc0_data_0_pins[] = {/* D[0:7] */ 271 ,272 ,273 ,274 ,275 ,276 ,277 ,278 , }; -static const unsigned int mmc0_data8_0_mux[] = { +static const unsigned int mmc0_data_0_mux[] = {MMCD0_0_MARK ,MMCD0_1_MARK ,MMCD0_2_MARK ,MMCD0_3_MARK ,MMCD0_4_MARK ,MMCD0_5_MARK ,MMCD0_6_MARK ,MMCD0_7_MARK , };
@@ -2032,25 +2018,11 @@ static const unsigned int mmc0_ctrl_0_mux[] = { MMCCMD0_MARK, MMCCLK0_MARK, }; -static const unsigned int mmc0_data1_1_pins[] = { -/* D[0] */ -305 , -}; -static const unsigned int mmc0_data1_1_mux[] = { -MMCD1_0_MARK , -}; -static const unsigned int mmc0_data4_1_pins[] = { -/* D[0:3] */ -305 ,304 ,303 ,302 , -}; -static const unsigned int mmc0_data4_1_mux[] = { -MMCD1_0_MARK ,MMCD1_1_MARK ,MMCD1_2_MARK ,MMCD1_3_MARK , -}; -static const unsigned int mmc0_data8_1_pins[] = { +static const unsigned int mmc0_data_1_pins[] = {/* D[0:7] */ 305 ,304 ,303 ,302 ,301 ,300 ,299 ,298 , }; -static const unsigned int mmc0_data8_1_mux[] = { +static const unsigned int mmc0_data_1_mux[] = {MMCD1_0_MARK ,MMCD1_1_MARK ,MMCD1_2_MARK ,MMCD1_3_MARK ,MMCD1_4_MARK ,MMCD1_5_MARK ,MMCD1_6_MARK ,MMCD1_7_MARK , };
@@ -3052,13 +3024,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (lcd2_sync_1),SH_PFC_PIN_GROUP (lcd2_sys_0),SH_PFC_PIN_GROUP (lcd2_sys_1), -SH_PFC_PIN_GROUP (mmc0_data1_0), -SH_PFC_PIN_GROUP (mmc0_data4_0), -SH_PFC_PIN_GROUP (mmc0_data8_0), +BUS_DATA_PIN_GROUP (mmc0_data,1 , _0), +BUS_DATA_PIN_GROUP (mmc0_data,4 , _0), +BUS_DATA_PIN_GROUP (mmc0_data,8 , _0),SH_PFC_PIN_GROUP (mmc0_ctrl_0), -SH_PFC_PIN_GROUP (mmc0_data1_1), -SH_PFC_PIN_GROUP (mmc0_data4_1), -SH_PFC_PIN_GROUP (mmc0_data8_1), +BUS_DATA_PIN_GROUP (mmc0_data,1 , _1), +BUS_DATA_PIN_GROUP (mmc0_data,4 , _1), +BUS_DATA_PIN_GROUP (mmc0_data,8 , _1),SH_PFC_PIN_GROUP (mmc0_ctrl_1),SH_PFC_PIN_GROUP (msiof0_rsck), SH_PFC_PIN_GROUP(msiof0_tsck),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 26/60 pinctrl: renesas: r8a77470: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data2 are subsets of qspi[01]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77470.c | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77470.c +8 -22
@@ -1623,19 +1623,12 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,18 ), -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_QSPI0_IO0_MARK ,QSPI0_MISO_QSPI0_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { +static const unsigned int qspi0_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,18 ),RCAR_GP_PIN (1 ,19 ),RCAR_GP_PIN (1 ,20 ), }; -static const unsigned int qspi0_data4_mux[] = { +static const unsigned int qspi0_data_mux[] = {QSPI0_MOSI_QSPI0_IO0_MARK ,QSPI0_MISO_QSPI0_IO1_MARK ,QSPI0_IO2_MARK ,QSPI0_IO3_MARK , };
@@ -1646,19 +1639,12 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_QSPI1_IO0_MARK ,QSPI1_MISO_QSPI1_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { +static const unsigned int qspi1_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ),RCAR_GP_PIN (4 ,7 ),RCAR_GP_PIN (4 ,8 ), }; -static const unsigned int qspi1_data4_mux[] = { +static const unsigned int qspi1_data_mux[] = {QSPI1_MOSI_QSPI1_IO0_MARK ,QSPI1_MISO_QSPI1_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK , };
@@ -2201,11 +2187,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {BUS_DATA_PIN_GROUP (mmc_data,8 ),SH_PFC_PIN_GROUP (mmc_ctrl),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +BUS_DATA_PIN_GROUP (qspi0_data,2 ), +BUS_DATA_PIN_GROUP (qspi0_data,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), +BUS_DATA_PIN_GROUP (qspi1_data,2 ), +BUS_DATA_PIN_GROUP (qspi1_data,4 ),SH_PFC_PIN_GROUP (scif0_data_a),SH_PFC_PIN_GROUP (scif0_data_b), SH_PFC_PIN_GROUP(scif0_data_c),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 27/60 pinctrl: renesas: r8a7790: Share QSPI pin group data
In reply to Geert UytterhoevenPin group qspi_data2 is a subset of qspi_data4.
This reduces kernel size by 16 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7790.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7790.c +4 -11
@@ -2778,19 +2778,12 @@ static const unsigned int qspi_ctrl_pins[] = {static const unsigned int qspi_ctrl_mux[] = {SPCLK_MARK ,SSL_MARK , }; -static const unsigned int qspi_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ), -}; -static const unsigned int qspi_data2_mux[] = { -MOSI_IO0_MARK ,MISO_IO1_MARK , -}; -static const unsigned int qspi_data4_pins[] = { +static const unsigned int qspi_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ), }; -static const unsigned int qspi_data4_mux[] = { +static const unsigned int qspi_data_mux[] = {MOSI_IO0_MARK ,MISO_IO1_MARK ,IO2_MARK ,IO3_MARK , };/* - SCIF0 ------------------------------------------------------------------ */
@@ -4228,8 +4221,8 @@ static const struct {SH_PFC_PIN_GROUP (pwm5),SH_PFC_PIN_GROUP (pwm6),SH_PFC_PIN_GROUP (qspi_ctrl), -SH_PFC_PIN_GROUP (qspi_data2), -SH_PFC_PIN_GROUP (qspi_data4), +BUS_DATA_PIN_GROUP (qspi_data,2 ), +BUS_DATA_PIN_GROUP (qspi_data,4 ),SH_PFC_PIN_GROUP (scif0_data),SH_PFC_PIN_GROUP (scif0_clk), SH_PFC_PIN_GROUP(scif0_ctrl),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 28/60 pinctrl: renesas: r8a7791: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi_data2{,_b} are subsets of qspi_data4{,_b}.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7791.c | 30 +++++++-------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7791.c +8 -22
@@ -3198,19 +3198,12 @@ static const unsigned int qspi_ctrl_pins[] = {static const unsigned int qspi_ctrl_mux[] = {SPCLK_MARK ,SSL_MARK , }; -static const unsigned int qspi_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ), -}; -static const unsigned int qspi_data2_mux[] = { -MOSI_IO0_MARK ,MISO_IO1_MARK , -}; -static const unsigned int qspi_data4_pins[] = { +static const unsigned int qspi_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ), }; -static const unsigned int qspi_data4_mux[] = { +static const unsigned int qspi_data_mux[] = {MOSI_IO0_MARK ,MISO_IO1_MARK ,IO2_MARK ,IO3_MARK , };
@@ -3221,19 +3214,12 @@ static const unsigned int qspi_ctrl_b_pins[] = {static const unsigned int qspi_ctrl_b_mux[] = {SPCLK_B_MARK ,SSL_B_MARK , }; -static const unsigned int qspi_data2_b_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (6 ,1 ),RCAR_GP_PIN (6 ,2 ), -}; -static const unsigned int qspi_data2_b_mux[] = { -MOSI_IO0_B_MARK ,MISO_IO1_B_MARK , -}; -static const unsigned int qspi_data4_b_pins[] = { +static const unsigned int qspi_data_b_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (6 ,1 ),RCAR_GP_PIN (6 ,2 ),RCAR_GP_PIN (6 ,3 ),RCAR_GP_PIN (6 ,4 ), }; -static const unsigned int qspi_data4_b_mux[] = { +static const unsigned int qspi_data_b_mux[] = {MOSI_IO0_B_MARK ,MISO_IO1_B_MARK ,IO2_B_MARK ,IO3_B_MARK , };/* - SCIF0 ------------------------------------------------------------------ */
@@ -4648,11 +4634,11 @@ static const struct {SH_PFC_PIN_GROUP (pwm5_b),SH_PFC_PIN_GROUP (pwm6),SH_PFC_PIN_GROUP (qspi_ctrl), -SH_PFC_PIN_GROUP (qspi_data2), -SH_PFC_PIN_GROUP (qspi_data4), +BUS_DATA_PIN_GROUP (qspi_data,2 ), +BUS_DATA_PIN_GROUP (qspi_data,4 ),SH_PFC_PIN_GROUP (qspi_ctrl_b), -SH_PFC_PIN_GROUP (qspi_data2_b), -SH_PFC_PIN_GROUP (qspi_data4_b), +BUS_DATA_PIN_GROUP (qspi_data,2 , _b), +BUS_DATA_PIN_GROUP (qspi_data,4 , _b),SH_PFC_PIN_GROUP (scif0_data),SH_PFC_PIN_GROUP (scif0_data_b), SH_PFC_PIN_GROUP(scif0_data_c),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 29/60 pinctrl: renesas: r8a7792: Share QSPI pin group data
In reply to Geert UytterhoevenPin group qspi_data2 is a subset of qspi_data4.
This reduces kernel size by 16 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7792.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7792.c +4 -11
@@ -1116,19 +1116,12 @@ static const unsigned int qspi_ctrl_pins[] = {static const unsigned int qspi_ctrl_mux[] = {SPCLK_MARK ,SSL_MARK , }; -static const unsigned int qspi_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), -}; -static const unsigned int qspi_data2_mux[] = { -MOSI_IO0_MARK ,MISO_IO1_MARK , -}; -static const unsigned int qspi_data4_pins[] = { +static const unsigned int qspi_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ),RCAR_GP_PIN (3 ,23 ),RCAR_GP_PIN (3 ,24 ), }; -static const unsigned int qspi_data4_mux[] = { +static const unsigned int qspi_data_mux[] = {MOSI_IO0_MARK ,MISO_IO1_MARK ,IO2_MARK ,IO3_MARK , };/* - SCIF0 ------------------------------------------------------------------ */
@@ -1700,8 +1693,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (msiof1_rx),SH_PFC_PIN_GROUP (msiof1_tx),SH_PFC_PIN_GROUP (qspi_ctrl), -SH_PFC_PIN_GROUP (qspi_data2), -SH_PFC_PIN_GROUP (qspi_data4), +BUS_DATA_PIN_GROUP (qspi_data,2 ), +BUS_DATA_PIN_GROUP (qspi_data,4 ),SH_PFC_PIN_GROUP (scif0_data),SH_PFC_PIN_GROUP (scif0_clk), SH_PFC_PIN_GROUP(scif0_ctrl),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 30/60 pinctrl: renesas: r8a7794: Share QSPI pin group data
In reply to Geert UytterhoevenPin group qspi_data2 is a subset of qspi_data4.
This reduces kernel size by 16 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7794.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7794.c +4 -11
@@ -2730,19 +2730,12 @@ static const unsigned int qspi_ctrl_pins[] = {static const unsigned int qspi_ctrl_mux[] = {SPCLK_MARK ,SSL_MARK , }; -static const unsigned int qspi_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ), -}; -static const unsigned int qspi_data2_mux[] = { -MOSI_IO0_MARK ,MISO_IO1_MARK , -}; -static const unsigned int qspi_data4_pins[] = { +static const unsigned int qspi_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (1 ,5 ),RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ), }; -static const unsigned int qspi_data4_mux[] = { +static const unsigned int qspi_data_mux[] = {MOSI_IO0_MARK ,MISO_IO1_MARK ,IO2_MARK ,IO3_MARK , };/* - SCIF0 ------------------------------------------------------------------ */
@@ -3952,8 +3945,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (pwm6),SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (qspi_ctrl), -SH_PFC_PIN_GROUP (qspi_data2), -SH_PFC_PIN_GROUP (qspi_data4), +BUS_DATA_PIN_GROUP (qspi_data,2 ), +BUS_DATA_PIN_GROUP (qspi_data,4 ),SH_PFC_PIN_GROUP (scif0_data),SH_PFC_PIN_GROUP (scif0_data_b), SH_PFC_PIN_GROUP(scif0_data_c),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 31/60 pinctrl: renesas: r8a77950: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data2 are subsets of qspi[01]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77950.c | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77950.c +8 -22
@@ -3140,18 +3140,11 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ -PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { +static const unsigned int qspi0_data_pins[] = {/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1, QSPI0_IO2, QSPI0_IO3 */ PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 ,PIN_QSPI0_IO2 ,PIN_QSPI0_IO3 , }; -static const unsigned int qspi0_data4_mux[] = { +static const unsigned int qspi0_data_mux[] = {QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK ,QSPI0_IO2_MARK ,QSPI0_IO3_MARK , };
@@ -3163,18 +3156,11 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ -PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { +static const unsigned int qspi1_data_pins[] = {/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1, QSPI1_IO2, QSPI1_IO3 */ PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 ,PIN_QSPI1_IO2 ,PIN_QSPI1_IO3 , }; -static const unsigned int qspi1_data4_mux[] = { +static const unsigned int qspi1_data_mux[] = {QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK , };
@@ -4103,11 +4089,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +BUS_DATA_PIN_GROUP (qspi0_data,2 ), +BUS_DATA_PIN_GROUP (qspi0_data,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), +BUS_DATA_PIN_GROUP (qspi1_data,2 ), +BUS_DATA_PIN_GROUP (qspi1_data,4 ),SH_PFC_PIN_GROUP (sata0_devslp_a),SH_PFC_PIN_GROUP (sata0_devslp_b), SH_PFC_PIN_GROUP(scif0_data),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 32/60 pinctrl: renesas: r8a77951: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data2 are subsets of qspi[01]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77951.c | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77951.c +8 -22
@@ -3268,20 +3268,13 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ -PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { +static const unsigned int qspi0_data_pins[] = {/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 ,/* QSPI0_IO2, QSPI0_IO3 */ PIN_QSPI0_IO2 ,PIN_QSPI0_IO3 , }; -static const unsigned int qspi0_data4_mux[] = { +static const unsigned int qspi0_data_mux[] = {QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK ,QSPI0_IO2_MARK ,QSPI0_IO3_MARK , };
@@ -3293,20 +3286,13 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ -PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { +static const unsigned int qspi1_data_pins[] = {/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 ,/* QSPI1_IO2, QSPI1_IO3 */ PIN_QSPI1_IO2 ,PIN_QSPI1_IO3 , }; -static const unsigned int qspi1_data4_mux[] = { +static const unsigned int qspi1_data_mux[] = {QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK , };
@@ -4437,11 +4423,11 @@ static const struct {SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +BUS_DATA_PIN_GROUP (qspi0_data,2 ), +BUS_DATA_PIN_GROUP (qspi0_data,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), +BUS_DATA_PIN_GROUP (qspi1_data,2 ), +BUS_DATA_PIN_GROUP (qspi1_data,4 ),SH_PFC_PIN_GROUP (sata0_devslp_a),SH_PFC_PIN_GROUP (sata0_devslp_b), SH_PFC_PIN_GROUP(scif0_data),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 33/60 pinctrl: renesas: r8a77965: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data2 are subsets of qspi[01]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77965.c | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77965.c +8 -22
@@ -3424,20 +3424,13 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ -PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { +static const unsigned int qspi0_data_pins[] = {/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 ,/* QSPI0_IO2, QSPI0_IO3 */ PIN_QSPI0_IO2 ,PIN_QSPI0_IO3 , }; -static const unsigned int qspi0_data4_mux[] = { +static const unsigned int qspi0_data_mux[] = {QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK ,QSPI0_IO2_MARK ,QSPI0_IO3_MARK , };
@@ -3449,20 +3442,13 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ -PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { +static const unsigned int qspi1_data_pins[] = {/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 ,/* QSPI1_IO2, QSPI1_IO3 */ PIN_QSPI1_IO2 ,PIN_QSPI1_IO3 , }; -static const unsigned int qspi1_data4_mux[] = { +static const unsigned int qspi1_data_mux[] = {QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK , };
@@ -4662,11 +4648,11 @@ static const struct {SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +BUS_DATA_PIN_GROUP (qspi0_data,2 ), +BUS_DATA_PIN_GROUP (qspi0_data,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), +BUS_DATA_PIN_GROUP (qspi1_data,2 ), +BUS_DATA_PIN_GROUP (qspi1_data,4 ),SH_PFC_PIN_GROUP (sata0_devslp_a),SH_PFC_PIN_GROUP (sata0_devslp_b), SH_PFC_PIN_GROUP(scif0_data),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 34/60 pinctrl: renesas: r8a7796: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data2 are subsets of qspi[01]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7796.c | 30 +++++++-------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7796.c +8 -22
@@ -3274,20 +3274,13 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ -PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 , -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { +static const unsigned int qspi0_data_pins[] = {/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ PIN_QSPI0_MOSI_IO0 ,PIN_QSPI0_MISO_IO1 ,/* QSPI0_IO2, QSPI0_IO3 */ PIN_QSPI0_IO2 ,PIN_QSPI0_IO3 , }; -static const unsigned int qspi0_data4_mux[] = { +static const unsigned int qspi0_data_mux[] = {QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK ,QSPI0_IO2_MARK ,QSPI0_IO3_MARK , };
@@ -3299,20 +3292,13 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ -PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 , -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { +static const unsigned int qspi1_data_pins[] = {/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ PIN_QSPI1_MOSI_IO0 ,PIN_QSPI1_MISO_IO1 ,/* QSPI1_IO2, QSPI1_IO3 */ PIN_QSPI1_IO2 ,PIN_QSPI1_IO3 , }; -static const unsigned int qspi1_data4_mux[] = { +static const unsigned int qspi1_data_mux[] = {QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK , };
@@ -4412,11 +4398,11 @@ static const struct {SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +BUS_DATA_PIN_GROUP (qspi0_data,2 ), +BUS_DATA_PIN_GROUP (qspi0_data,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), +BUS_DATA_PIN_GROUP (qspi1_data,2 ), +BUS_DATA_PIN_GROUP (qspi1_data,4 ),SH_PFC_PIN_GROUP (scif0_data),SH_PFC_PIN_GROUP (scif0_clk), SH_PFC_PIN_GROUP(scif0_ctrl),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 35/60 pinctrl: renesas: r8a77990: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data2 are subsets of qspi[01]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77990.c | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77990.c +8 -22
@@ -2817,20 +2817,13 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ -RCAR_GP_PIN (2 ,1 ),RCAR_GP_PIN (2 ,2 ), -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { +static const unsigned int qspi0_data_pins[] = {/* QSPI0_MOSI_IO0, QSPI0_MISO_IO1 */ RCAR_GP_PIN (2 ,1 ),RCAR_GP_PIN (2 ,2 ),/* QSPI0_IO2, QSPI0_IO3 */ RCAR_GP_PIN (2 ,3 ),RCAR_GP_PIN (2 ,4 ), }; -static const unsigned int qspi0_data4_mux[] = { +static const unsigned int qspi0_data_mux[] = {QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK ,QSPI0_IO2_MARK ,QSPI0_IO3_MARK , };
@@ -2842,20 +2835,13 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ -RCAR_GP_PIN (2 ,7 ),RCAR_GP_PIN (2 ,8 ), -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { +static const unsigned int qspi1_data_pins[] = {/* QSPI1_MOSI_IO0, QSPI1_MISO_IO1 */ RCAR_GP_PIN (2 ,7 ),RCAR_GP_PIN (2 ,8 ),/* QSPI1_IO2, QSPI1_IO3 */ RCAR_GP_PIN (2 ,9 ),RCAR_GP_PIN (2 ,10 ), }; -static const unsigned int qspi1_data4_mux[] = { +static const unsigned int qspi1_data_mux[] = {QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK , };
@@ -3977,11 +3963,11 @@ static const struct {SH_PFC_PIN_GROUP (pwm6_a),SH_PFC_PIN_GROUP (pwm6_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +BUS_DATA_PIN_GROUP (qspi0_data,2 ), +BUS_DATA_PIN_GROUP (qspi0_data,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), +BUS_DATA_PIN_GROUP (qspi1_data,2 ), +BUS_DATA_PIN_GROUP (qspi1_data,4 ),SH_PFC_PIN_GROUP (scif0_data_a),SH_PFC_PIN_GROUP (scif0_clk_a), SH_PFC_PIN_GROUP(scif0_ctrl_a),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 36/60 pinctrl: renesas: r8a779a0: Share QSPI pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data2 are subsets of qspi[01]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a779a0.c | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a779a0.c +8 -22
@@ -2368,19 +2368,12 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (0 ,1 ),RCAR_GP_PIN (0 ,2 ), -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { +static const unsigned int qspi0_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (0 ,1 ),RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ),RCAR_GP_PIN (0 ,4 ), }; -static const unsigned int qspi0_data4_mux[] = { +static const unsigned int qspi0_data_mux[] = {QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK ,QSPI0_IO2_MARK ,QSPI0_IO3_MARK };
@@ -2393,19 +2386,12 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (0 ,7 ),RCAR_GP_PIN (0 ,8 ), -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { +static const unsigned int qspi1_data_pins[] = {/* MOSI_IO0, MISO_IO1, IO2, IO3 */ RCAR_GP_PIN (0 ,7 ),RCAR_GP_PIN (0 ,8 ),RCAR_GP_PIN (0 ,9 ),RCAR_GP_PIN (0 ,10 ), }; -static const unsigned int qspi1_data4_mux[] = { +static const unsigned int qspi1_data_mux[] = {QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK ,QSPI1_IO2_MARK ,QSPI1_IO3_MARK };
@@ -2751,11 +2737,11 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (pwm4),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +BUS_DATA_PIN_GROUP (qspi0_data,2 ), +BUS_DATA_PIN_GROUP (qspi0_data,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), +BUS_DATA_PIN_GROUP (qspi1_data,2 ), +BUS_DATA_PIN_GROUP (qspi1_data,4 ),SH_PFC_PIN_GROUP (scif0_data), SH_PFC_PIN_GROUP(scif0_clk),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 37/60 pinctrl: renesas: r8a77970: Share RPC pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data[24] are subsets of rpc_data. Pin group rpc_clk1 is a subset of rpc_clk2.
This reduces kernel size by 104 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77970.c | 54 ++++---------------------- 1 file changed, 8 insertions(+), 46 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77970.c +8 -46
@@ -1377,22 +1377,6 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (5 ,1 ),RCAR_GP_PIN (5 ,2 ), -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { -/* MOSI_IO0, MISO_IO1, IO2, IO3 */ -RCAR_GP_PIN (5 ,1 ),RCAR_GP_PIN (5 ,2 ), -RCAR_GP_PIN (5 ,3 ),RCAR_GP_PIN (5 ,4 ), -}; -static const unsigned int qspi0_data4_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -QSPI0_IO2_MARK ,QSPI0_IO3_MARK -};/* - QSPI1 ------------------------------------------------------------------ */ static const unsigned int qspi1_ctrl_pins[] = {
@@ -1402,36 +1386,14 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (5 ,7 ),RCAR_GP_PIN (5 ,8 ), -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { -/* MOSI_IO0, MISO_IO1, IO2, IO3 */ -RCAR_GP_PIN (5 ,7 ),RCAR_GP_PIN (5 ,8 ), -RCAR_GP_PIN (5 ,9 ),RCAR_GP_PIN (5 ,10 ), -}; -static const unsigned int qspi1_data4_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -QSPI1_IO2_MARK ,QSPI1_IO3_MARK -};/* - RPC -------------------------------------------------------------------- */ -static const unsigned int rpc_clk1_pins[] = { +static const unsigned int rpc_clk_pins[] = {/* Octal-SPI flash: C/SCLK */ -RCAR_GP_PIN (5 ,0 ), -}; -static const unsigned int rpc_clk1_mux[] = { -QSPI0_SPCLK_MARK , -}; -static const unsigned int rpc_clk2_pins[] = {/* HyperFlash: CK, CK# */ RCAR_GP_PIN (5 ,0 ),RCAR_GP_PIN (5 ,6 ), }; -static const unsigned int rpc_clk2_mux[] = { +static const unsigned int rpc_clk_mux[] = {QSPI0_SPCLK_MARK ,QSPI1_SPCLK_MARK , };static const unsigned int rpc_ctrl_pins[] = {
@@ -1798,13 +1760,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (pwm4_a),SH_PFC_PIN_GROUP (pwm4_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data2, rpc_data,0 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data4, rpc_data,0 ,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), -SH_PFC_PIN_GROUP (rpc_clk1), -SH_PFC_PIN_GROUP (rpc_clk2), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data2, rpc_data,4 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data4, rpc_data,4 ,4 ), +BUS_DATA_PIN_GROUP (rpc_clk,1 ), +BUS_DATA_PIN_GROUP (rpc_clk,2 ),SH_PFC_PIN_GROUP (rpc_ctrl),SH_PFC_PIN_GROUP (rpc_data), SH_PFC_PIN_GROUP(rpc_reset),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 38/60 pinctrl: renesas: r8a77980: Share RPC pin group data
In reply to Geert UytterhoevenPin groups qspi[01]_data[24] are subsets of rpc_data. Pin group rpc_clk1 is a subset of rpc_clk2.
This reduces kernel size by 104 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77980.c | 54 ++++---------------------- 1 file changed, 8 insertions(+), 46 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77980.c +8 -46
@@ -1671,22 +1671,6 @@ static const unsigned int qspi0_ctrl_pins[] = {static const unsigned int qspi0_ctrl_mux[] = {QSPI0_SPCLK_MARK ,QSPI0_SSL_MARK , }; -static const unsigned int qspi0_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (5 ,1 ),RCAR_GP_PIN (5 ,2 ), -}; -static const unsigned int qspi0_data2_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -}; -static const unsigned int qspi0_data4_pins[] = { -/* MOSI_IO0, MISO_IO1, IO2, IO3 */ -RCAR_GP_PIN (5 ,1 ),RCAR_GP_PIN (5 ,2 ), -RCAR_GP_PIN (5 ,3 ),RCAR_GP_PIN (5 ,4 ), -}; -static const unsigned int qspi0_data4_mux[] = { -QSPI0_MOSI_IO0_MARK ,QSPI0_MISO_IO1_MARK , -QSPI0_IO2_MARK ,QSPI0_IO3_MARK -};/* - QSPI1 ------------------------------------------------------------------ */ static const unsigned int qspi1_ctrl_pins[] = {
@@ -1696,36 +1680,14 @@ static const unsigned int qspi1_ctrl_pins[] = {static const unsigned int qspi1_ctrl_mux[] = {QSPI1_SPCLK_MARK ,QSPI1_SSL_MARK , }; -static const unsigned int qspi1_data2_pins[] = { -/* MOSI_IO0, MISO_IO1 */ -RCAR_GP_PIN (5 ,7 ),RCAR_GP_PIN (5 ,8 ), -}; -static const unsigned int qspi1_data2_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -}; -static const unsigned int qspi1_data4_pins[] = { -/* MOSI_IO0, MISO_IO1, IO2, IO3 */ -RCAR_GP_PIN (5 ,7 ),RCAR_GP_PIN (5 ,8 ), -RCAR_GP_PIN (5 ,9 ),RCAR_GP_PIN (5 ,10 ), -}; -static const unsigned int qspi1_data4_mux[] = { -QSPI1_MOSI_IO0_MARK ,QSPI1_MISO_IO1_MARK , -QSPI1_IO2_MARK ,QSPI1_IO3_MARK -};/* - RPC -------------------------------------------------------------------- */ -static const unsigned int rpc_clk1_pins[] = { +static const unsigned int rpc_clk_pins[] = {/* Octal-SPI flash: C/SCLK */ -RCAR_GP_PIN (5 ,0 ), -}; -static const unsigned int rpc_clk1_mux[] = { -QSPI0_SPCLK_MARK , -}; -static const unsigned int rpc_clk2_pins[] = {/* HyperFlash: CK, CK# */ RCAR_GP_PIN (5 ,0 ),RCAR_GP_PIN (5 ,6 ), }; -static const unsigned int rpc_clk2_mux[] = { +static const unsigned int rpc_clk_mux[] = {QSPI0_SPCLK_MARK ,QSPI1_SPCLK_MARK , };static const unsigned int rpc_ctrl_pins[] = {
@@ -2174,13 +2136,13 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (pwm4_a),SH_PFC_PIN_GROUP (pwm4_b),SH_PFC_PIN_GROUP (qspi0_ctrl), -SH_PFC_PIN_GROUP (qspi0_data2), -SH_PFC_PIN_GROUP (qspi0_data4), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data2, rpc_data,0 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi0_data4, rpc_data,0 ,4 ),SH_PFC_PIN_GROUP (qspi1_ctrl), -SH_PFC_PIN_GROUP (qspi1_data2), -SH_PFC_PIN_GROUP (qspi1_data4), -SH_PFC_PIN_GROUP (rpc_clk1), -SH_PFC_PIN_GROUP (rpc_clk2), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data2, rpc_data,4 ,2 ), +SH_PFC_PIN_GROUP_SUBSET (qspi1_data4, rpc_data,4 ,4 ), +BUS_DATA_PIN_GROUP (rpc_clk,1 ), +BUS_DATA_PIN_GROUP (rpc_clk,2 ),SH_PFC_PIN_GROUP (rpc_ctrl),SH_PFC_PIN_GROUP (rpc_data), SH_PFC_PIN_GROUP(rpc_reset),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 39/60 pinctrl: renesas: r8a73a4: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[012]_data1 are subsets of sdhi[012]_data4.
This reduces kernel size by 24 bytes.
--- drivers/pinctrl/renesas/pfc-r8a73a4.c | 45 +++++++-------------------- 1 file changed, 12 insertions(+), 33 deletions(-)
drivers/pinctrl/renesas/pfc-r8a73a4.c +12 -33
@@ -1676,18 +1676,11 @@ static const unsigned int scifb3_ctrl_b_mux[] = { SCIFB3_RTS_38_MARK, SCIFB3_CTS_39_MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -302 , -}; -static const unsigned int sdhi0_data1_mux[] = { -SDHID0_0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ 302 ,303 ,304 ,305 , }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SDHID0_0_MARK ,SDHID0_1_MARK ,SDHID0_2_MARK ,SDHID0_3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -1712,18 +1705,11 @@ static const unsigned int sdhi0_wp_mux[] = { SDHIWP0_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -289 , -}; -static const unsigned int sdhi1_data1_mux[] = { -SDHID1_0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ 289 ,290 ,291 ,292 , }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SDHID1_0_MARK ,SDHID1_1_MARK ,SDHID1_2_MARK ,SDHID1_3_MARK , };static const unsigned int sdhi1_ctrl_pins[] = {
@@ -1734,18 +1720,11 @@ static const unsigned int sdhi1_ctrl_mux[] = { SDHICLK1_MARK, SDHICMD1_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -295 , -}; -static const unsigned int sdhi2_data1_mux[] = { -SDHID2_0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ 295 ,296 ,297 ,298 , }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SDHID2_0_MARK ,SDHID2_1_MARK ,SDHID2_2_MARK ,SDHID2_3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -1850,16 +1829,16 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scifb3_data_b),SH_PFC_PIN_GROUP (scifb3_clk_b),SH_PFC_PIN_GROUP (scifb3_ctrl_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ), SH_PFC_PIN_GROUP(sdhi2_ctrl), };
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 40/60 pinctrl: renesas: r8a7740: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[012]_data1 are subsets of sdhi[012]_data4.
This reduces kernel size by 24 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7740.c | 45 +++++++-------------------- 1 file changed, 12 insertions(+), 33 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7740.c +12 -33
@@ -2426,18 +2426,11 @@ static const unsigned int scifb_ctrl_1_mux[] = { SCIFB_RTS_PORT172_MARK, SCIFB_CTS_PORT173_MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -77 , -}; -static const unsigned int sdhi0_data1_mux[] = { -SDHI0_D0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ 77 ,78 ,79 ,80 , }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SDHI0_D0_MARK ,SDHI0_D1_MARK ,SDHI0_D2_MARK ,SDHI0_D3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -2462,18 +2455,11 @@ static const unsigned int sdhi0_wp_mux[] = { SDHI0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -68 , -}; -static const unsigned int sdhi1_data1_mux[] = { -SDHI1_D0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ 68 ,69 ,70 ,71 , }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SDHI1_D0_MARK ,SDHI1_D1_MARK ,SDHI1_D2_MARK ,SDHI1_D3_MARK , };static const unsigned int sdhi1_ctrl_pins[] = {
@@ -2498,18 +2484,11 @@ static const unsigned int sdhi1_wp_mux[] = { SDHI1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -205 , -}; -static const unsigned int sdhi2_data1_mux[] = { -SDHI2_D0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ 205 ,206 ,207 ,208 , }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SDHI2_D0_MARK ,SDHI2_D1_MARK ,SDHI2_D2_MARK ,SDHI2_D3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -2747,18 +2726,18 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scifb_data_1),SH_PFC_PIN_GROUP (scifb_clk_1),SH_PFC_PIN_GROUP (scifb_ctrl_1), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd_0), SH_PFC_PIN_GROUP(sdhi2_wp_0),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 41/60 pinctrl: renesas: r8a77470: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[02]_data1 are subsets of sdhi[02]_data4.
This reduces kernel size by 16 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77470.c | 30 +++++++------------------- 1 file changed, 8 insertions(+), 22 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77470.c +8 -22
@@ -1887,19 +1887,12 @@ static const unsigned int scif_clk_b_mux[] = { SCIF_CLK_B_MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (0 ,7 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (0 ,7 ),RCAR_GP_PIN (0 ,8 ),RCAR_GP_PIN (0 ,9 ),RCAR_GP_PIN (0 ,10 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -1939,19 +1932,12 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,16 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DAT0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (4 ,16 ),RCAR_GP_PIN (4 ,17 ),RCAR_GP_PIN (4 ,18 ),RCAR_GP_PIN (4 ,19 ), }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DAT0_MARK ,SD2_DAT1_MARK ,SD2_DAT2_MARK ,SD2_DAT3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -2225,8 +2211,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scif5_data_f),SH_PFC_PIN_GROUP (scif_clk_a),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd), SH_PFC_PIN_GROUP(sdhi0_wp),
@@ -2235,8 +2221,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP_ALIAS (sdhi1_ctrl, mmc_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd), SH_PFC_PIN_GROUP(sdhi2_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 42/60 pinctrl: renesas: r8a7778: Share SDHI pin group data
In reply to Geert UytterhoevenPin group sdhi0_data1 is a subset of sdhi0_data4.
Pin groups sdhi[12]_data1_[ab] are subsets of sdhi[12]_data4_[ab].
This reduces kernel size by 40 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7778.c | 51 +++++++++++---------------- 1 file changed, 20 insertions(+), 31 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7778.c +20 -31
@@ -1522,7 +1522,6 @@ SCIF_PFC_DAT(scif5_data_b, TX5_B, RX5_B);/* - SDHI macro ------------------------------------------------------------- */ #define SDHI_PFC_PINS(name, args...) SH_PFC_PINS(name, args) -#define SDHI_PFC_DAT1 (name, d0) SH_PFC_MUX1(name, d0)#define SDHI_PFC_DAT4 (name, d0, d1, d2, d3) SH_PFC_MUX4(name, d0, d1, d2, d3)#define SDHI_PFC_CTRL (name, clk, cmd) SH_PFC_MUX2(name, clk, cmd)#define SDHI_PFC_CDPN (name, cd) SH_PFC_MUX1(name, cd)
@@ -1533,11 +1532,9 @@ SDHI_PFC_PINS(sdhi0_cd, RCAR_GP_PIN(3, 17));SDHI_PFC_CDPN (sdhi0_cd,SD0_CD );SDHI_PFC_PINS (sdhi0_ctrl,RCAR_GP_PIN (3 ,11 ),RCAR_GP_PIN (3 ,12 ));SDHI_PFC_CTRL (sdhi0_ctrl,SD0_CLK ,SD0_CMD ); -SDHI_PFC_PINS (sdhi0_data1,RCAR_GP_PIN (3 ,13 )); -SDHI_PFC_DAT1 (sdhi0_data1,SD0_DAT0 ); -SDHI_PFC_PINS (sdhi0_data4,RCAR_GP_PIN (3 ,13 ),RCAR_GP_PIN (3 ,14 ), +SDHI_PFC_PINS (sdhi0_data,RCAR_GP_PIN (3 ,13 ),RCAR_GP_PIN (3 ,14 ),RCAR_GP_PIN (3 ,15 ),RCAR_GP_PIN (3 ,16 )); -SDHI_PFC_DAT4 (sdhi0_data4,SD0_DAT0 ,SD0_DAT1 , +SDHI_PFC_DAT4 (sdhi0_data,SD0_DAT0 ,SD0_DAT1 ,SD0_DAT2 ,SD0_DAT3 );SDHI_PFC_PINS (sdhi0_wp,RCAR_GP_PIN (3 ,18 ));SDHI_PFC_WPPN (sdhi0_wp,SD0_WP );
@@ -1551,17 +1548,13 @@ SDHI_PFC_PINS(sdhi1_ctrl_a, RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6));SDHI_PFC_CTRL (sdhi1_ctrl_a,SD1_CLK_A ,SD1_CMD_A );SDHI_PFC_PINS (sdhi1_ctrl_b,RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,16 ));SDHI_PFC_CTRL (sdhi1_ctrl_b,SD1_CLK_B ,SD1_CMD_B ); -SDHI_PFC_PINS (sdhi1_data1_a,RCAR_GP_PIN (1 ,7 )); -SDHI_PFC_DAT1 (sdhi1_data1_a,SD1_DAT0_A ); -SDHI_PFC_PINS (sdhi1_data1_b,RCAR_GP_PIN (1 ,18 )); -SDHI_PFC_DAT1 (sdhi1_data1_b,SD1_DAT0_B ); -SDHI_PFC_PINS (sdhi1_data4_a,RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ), +SDHI_PFC_PINS (sdhi1_data_a,RCAR_GP_PIN (1 ,7 ),RCAR_GP_PIN (1 ,8 ),RCAR_GP_PIN (0 ,5 ),RCAR_GP_PIN (0 ,6 )); -SDHI_PFC_DAT4 (sdhi1_data4_a,SD1_DAT0_A ,SD1_DAT1_A , +SDHI_PFC_DAT4 (sdhi1_data_a,SD1_DAT0_A ,SD1_DAT1_A ,SD1_DAT2_A ,SD1_DAT3_A ); -SDHI_PFC_PINS (sdhi1_data4_b,RCAR_GP_PIN (1 ,18 ),RCAR_GP_PIN (1 ,19 ), +SDHI_PFC_PINS (sdhi1_data_b,RCAR_GP_PIN (1 ,18 ),RCAR_GP_PIN (1 ,19 ),RCAR_GP_PIN (1 ,20 ),RCAR_GP_PIN (1 ,21 )); -SDHI_PFC_DAT4 (sdhi1_data4_b,SD1_DAT0_B ,SD1_DAT1_B , +SDHI_PFC_DAT4 (sdhi1_data_b,SD1_DAT0_B ,SD1_DAT1_B ,SD1_DAT2_B ,SD1_DAT3_B );SDHI_PFC_PINS (sdhi1_wp_a,RCAR_GP_PIN (0 ,31 ));SDHI_PFC_WPPN (sdhi1_wp_a,SD1_WP_A );
@@ -1577,17 +1570,13 @@ SDHI_PFC_PINS(sdhi2_ctrl_a, RCAR_GP_PIN(4, 17), RCAR_GP_PIN(4, 18));SDHI_PFC_CTRL (sdhi2_ctrl_a,SD2_CLK_A ,SD2_CMD_A );SDHI_PFC_PINS (sdhi2_ctrl_b,RCAR_GP_PIN (4 ,5 ),RCAR_GP_PIN (4 ,6 ));SDHI_PFC_CTRL (sdhi2_ctrl_b,SD2_CLK_B ,SD2_CMD_B ); -SDHI_PFC_PINS (sdhi2_data1_a,RCAR_GP_PIN (4 ,19 )); -SDHI_PFC_DAT1 (sdhi2_data1_a,SD2_DAT0_A ); -SDHI_PFC_PINS (sdhi2_data1_b,RCAR_GP_PIN (4 ,7 )); -SDHI_PFC_DAT1 (sdhi2_data1_b,SD2_DAT0_B ); -SDHI_PFC_PINS (sdhi2_data4_a,RCAR_GP_PIN (4 ,19 ),RCAR_GP_PIN (4 ,20 ), +SDHI_PFC_PINS (sdhi2_data_a,RCAR_GP_PIN (4 ,19 ),RCAR_GP_PIN (4 ,20 ),RCAR_GP_PIN (4 ,21 ),RCAR_GP_PIN (4 ,22 )); -SDHI_PFC_DAT4 (sdhi2_data4_a,SD2_DAT0_A ,SD2_DAT1_A , +SDHI_PFC_DAT4 (sdhi2_data_a,SD2_DAT0_A ,SD2_DAT1_A ,SD2_DAT2_A ,SD2_DAT3_A ); -SDHI_PFC_PINS (sdhi2_data4_b,RCAR_GP_PIN (4 ,7 ),RCAR_GP_PIN (4 ,8 ), +SDHI_PFC_PINS (sdhi2_data_b,RCAR_GP_PIN (4 ,7 ),RCAR_GP_PIN (4 ,8 ),RCAR_GP_PIN (3 ,25 ),RCAR_GP_PIN (3 ,26 )); -SDHI_PFC_DAT4 (sdhi2_data4_b,SD2_DAT0_B ,SD2_DAT1_B , +SDHI_PFC_DAT4 (sdhi2_data_b,SD2_DAT0_B ,SD2_DAT1_B ,SD2_DAT2_B ,SD2_DAT3_B );SDHI_PFC_PINS (sdhi2_wp_a,RCAR_GP_PIN (4 ,24 ));SDHI_PFC_WPPN (sdhi2_wp_a,SD2_WP_A );
@@ -1773,27 +1762,27 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scif5_data_b),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_ctrl), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_wp),SH_PFC_PIN_GROUP (sdhi1_cd_a),SH_PFC_PIN_GROUP (sdhi1_cd_b),SH_PFC_PIN_GROUP (sdhi1_ctrl_a),SH_PFC_PIN_GROUP (sdhi1_ctrl_b), -SH_PFC_PIN_GROUP (sdhi1_data1_a), -SH_PFC_PIN_GROUP (sdhi1_data1_b), -SH_PFC_PIN_GROUP (sdhi1_data4_a), -SH_PFC_PIN_GROUP (sdhi1_data4_b), +BUS_DATA_PIN_GROUP (sdhi1_data,1 , _a), +BUS_DATA_PIN_GROUP (sdhi1_data,1 , _b), +BUS_DATA_PIN_GROUP (sdhi1_data,4 , _a), +BUS_DATA_PIN_GROUP (sdhi1_data,4 , _b),SH_PFC_PIN_GROUP (sdhi1_wp_a),SH_PFC_PIN_GROUP (sdhi1_wp_b),SH_PFC_PIN_GROUP (sdhi2_cd_a),SH_PFC_PIN_GROUP (sdhi2_cd_b),SH_PFC_PIN_GROUP (sdhi2_ctrl_a),SH_PFC_PIN_GROUP (sdhi2_ctrl_b), -SH_PFC_PIN_GROUP (sdhi2_data1_a), -SH_PFC_PIN_GROUP (sdhi2_data1_b), -SH_PFC_PIN_GROUP (sdhi2_data4_a), -SH_PFC_PIN_GROUP (sdhi2_data4_b), +BUS_DATA_PIN_GROUP (sdhi2_data,1 , _a), +BUS_DATA_PIN_GROUP (sdhi2_data,1 , _b), +BUS_DATA_PIN_GROUP (sdhi2_data,4 , _a), +BUS_DATA_PIN_GROUP (sdhi2_data,4 , _b),SH_PFC_PIN_GROUP (sdhi2_wp_a),SH_PFC_PIN_GROUP (sdhi2_wp_b), SH_PFC_PIN_GROUP(ssi012_ctrl),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 43/60 pinctrl: renesas: r8a7779: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[0-3]_data1 are subsets of sdhi[0-3]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7779.c | 60 +++++++-------------------- 1 file changed, 16 insertions(+), 44 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7779.c +16 -44
@@ -2356,19 +2356,12 @@ static const unsigned int scif_clk_d_mux[] = { SCIF_CLK_D_MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,21 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,21 ),RCAR_GP_PIN (3 ,22 ),RCAR_GP_PIN (3 ,23 ),RCAR_GP_PIN (3 ,24 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -2393,19 +2386,12 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (0 ,19 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -SD1_DAT0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (0 ,19 ),RCAR_GP_PIN (0 ,20 ),RCAR_GP_PIN (0 ,21 ),RCAR_GP_PIN (0 ,2 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DAT0_MARK ,SD1_DAT1_MARK ,SD1_DAT2_MARK ,SD1_DAT3_MARK , };static const unsigned int sdhi1_ctrl_pins[] = {
@@ -2430,19 +2416,12 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,1 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DAT0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,1 ),RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ), }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DAT0_MARK ,SD2_DAT1_MARK ,SD2_DAT2_MARK ,SD2_DAT3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -2467,19 +2446,12 @@ static const unsigned int sdhi2_wp_mux[] = { SD2_WP_MARK, };/* - SDHI3 ------------------------------------------------------------------ */ -static const unsigned int sdhi3_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (1 ,18 ), -}; -static const unsigned int sdhi3_data1_mux[] = { -SD3_DAT0_MARK , -}; -static const unsigned int sdhi3_data4_pins[] = { +static const unsigned int sdhi3_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (1 ,18 ),RCAR_GP_PIN (1 ,19 ),RCAR_GP_PIN (1 ,20 ),RCAR_GP_PIN (1 ,21 ), }; -static const unsigned int sdhi3_data4_mux[] = { +static const unsigned int sdhi3_data_mux[] = {SD3_DAT0_MARK ,SD3_DAT1_MARK ,SD3_DAT2_MARK ,SD3_DAT3_MARK , };static const unsigned int sdhi3_ctrl_pins[] = {
@@ -2782,23 +2754,23 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scif_clk_b),SH_PFC_PIN_GROUP (scif_clk_c),SH_PFC_PIN_GROUP (scif_clk_d), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd),SH_PFC_PIN_GROUP (sdhi2_wp), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), +BUS_DATA_PIN_GROUP (sdhi3_data,1 ), +BUS_DATA_PIN_GROUP (sdhi3_data,4 ),SH_PFC_PIN_GROUP (sdhi3_ctrl),SH_PFC_PIN_GROUP (sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 44/60 pinctrl: renesas: r8a7790: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[0-3]_data1 are subsets of sdhi[0-3]_data4.
This reduces kernel size by 32 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7790.c | 60 +++++++-------------------- 1 file changed, 16 insertions(+), 44 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7790.c +16 -44
@@ -3280,18 +3280,11 @@ static const unsigned int scif_clk_b_mux[] = { SCIF_CLK_B_MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,2 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -3316,18 +3309,11 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,10 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -SD1_DAT0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ),RCAR_GP_PIN (3 ,12 ),RCAR_GP_PIN (3 ,13 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DAT0_MARK ,SD1_DAT1_MARK ,SD1_DAT2_MARK ,SD1_DAT3_MARK , };static const unsigned int sdhi1_ctrl_pins[] = {
@@ -3352,18 +3338,11 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,18 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DAT0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,18 ),RCAR_GP_PIN (3 ,19 ),RCAR_GP_PIN (3 ,20 ),RCAR_GP_PIN (3 ,21 ), }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DAT0_MARK ,SD2_DAT1_MARK ,SD2_DAT2_MARK ,SD2_DAT3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -3388,18 +3367,11 @@ static const unsigned int sdhi2_wp_mux[] = { SD2_WP_MARK, };/* - SDHI3 ------------------------------------------------------------------ */ -static const unsigned int sdhi3_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,26 ), -}; -static const unsigned int sdhi3_data1_mux[] = { -SD3_DAT0_MARK , -}; -static const unsigned int sdhi3_data4_pins[] = { +static const unsigned int sdhi3_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,26 ),RCAR_GP_PIN (3 ,27 ),RCAR_GP_PIN (3 ,28 ),RCAR_GP_PIN (3 ,29 ), }; -static const unsigned int sdhi3_data4_mux[] = { +static const unsigned int sdhi3_data_mux[] = {SD3_DAT0_MARK ,SD3_DAT1_MARK ,SD3_DAT2_MARK ,SD3_DAT3_MARK , };static const unsigned int sdhi3_ctrl_pins[] = {
@@ -4292,23 +4264,23 @@ static const struct {SH_PFC_PIN_GROUP (scifb2_data_c),SH_PFC_PIN_GROUP (scif_clk),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd),SH_PFC_PIN_GROUP (sdhi2_wp), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), +BUS_DATA_PIN_GROUP (sdhi3_data,1 ), +BUS_DATA_PIN_GROUP (sdhi3_data,4 ),SH_PFC_PIN_GROUP (sdhi3_ctrl),SH_PFC_PIN_GROUP (sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 45/60 pinctrl: renesas: r8a7791: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[012]_data1 are subsets of sdhi[012]_data4.
This reduces kernel size by 24 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7791.c | 45 +++++++-------------------- 1 file changed, 12 insertions(+), 33 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7791.c +12 -33
@@ -3780,19 +3780,12 @@ static const unsigned int scif_clk_b_mux[] = { };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (6 ,2 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DATA0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (6 ,2 ),RCAR_GP_PIN (6 ,3 ),RCAR_GP_PIN (6 ,4 ),RCAR_GP_PIN (6 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DATA0_MARK ,SD0_DATA1_MARK ,SD0_DATA2_MARK ,SD0_DATA3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -3817,19 +3810,12 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (6 ,10 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -SD1_DATA0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (6 ,10 ),RCAR_GP_PIN (6 ,11 ),RCAR_GP_PIN (6 ,12 ),RCAR_GP_PIN (6 ,13 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DATA0_MARK ,SD1_DATA1_MARK ,SD1_DATA2_MARK ,SD1_DATA3_MARK , };static const unsigned int sdhi1_ctrl_pins[] = {
@@ -3854,19 +3840,12 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (6 ,18 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DATA0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (6 ,18 ),RCAR_GP_PIN (6 ,19 ),RCAR_GP_PIN (6 ,20 ),RCAR_GP_PIN (6 ,21 ), }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DATA0_MARK ,SD2_DATA1_MARK ,SD2_DATA2_MARK ,SD2_DATA3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -4716,18 +4695,18 @@ static const struct {SH_PFC_PIN_GROUP (scifb2_data_d),SH_PFC_PIN_GROUP (scif_clk),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd), SH_PFC_PIN_GROUP(sdhi2_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 46/60 pinctrl: renesas: r8a7792: Share SDHI pin group data
In reply to Geert UytterhoevenPin group sdhi0_data1 is a subset of sdhi0_data4.
This reduces kernel size by 8 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7792.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7792.c +4 -11
@@ -1199,19 +1199,12 @@ static const unsigned int scif3_clk_mux[] = { SCK3_MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* DAT0 */ -RCAR_GP_PIN (11 ,7 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* DAT[0-3] */ RCAR_GP_PIN (11 ,7 ),RCAR_GP_PIN (11 ,8 ),RCAR_GP_PIN (11 ,9 ),RCAR_GP_PIN (11 ,10 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -1705,8 +1698,8 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scif2_clk),SH_PFC_PIN_GROUP (scif3_data),SH_PFC_PIN_GROUP (scif3_clk), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd), SH_PFC_PIN_GROUP(sdhi0_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 47/60 pinctrl: renesas: r8a7794: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[012]_data1 are subsets of sdhi[012]_data4.
This reduces kernel size by 24 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7794.c | 45 +++++++-------------------- 1 file changed, 12 insertions(+), 33 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7794.c +12 -33
@@ -3210,19 +3210,12 @@ static const unsigned int scif_clk_b_mux[] = { SCIF_CLK_B_MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (6 ,2 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DATA0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (6 ,2 ),RCAR_GP_PIN (6 ,3 ),RCAR_GP_PIN (6 ,4 ),RCAR_GP_PIN (6 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DATA0_MARK ,SD0_DATA1_MARK ,SD0_DATA2_MARK ,SD0_DATA3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -3247,19 +3240,12 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (6 ,10 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -SD1_DATA0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (6 ,10 ),RCAR_GP_PIN (6 ,11 ),RCAR_GP_PIN (6 ,12 ),RCAR_GP_PIN (6 ,13 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DATA0_MARK ,SD1_DATA1_MARK ,SD1_DATA2_MARK ,SD1_DATA3_MARK , };static const unsigned int sdhi1_ctrl_pins[] = {
@@ -3284,19 +3270,12 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (6 ,18 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DATA0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (6 ,18 ),RCAR_GP_PIN (6 ,19 ),RCAR_GP_PIN (6 ,20 ),RCAR_GP_PIN (6 ,21 ), }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DATA0_MARK ,SD2_DATA1_MARK ,SD2_DATA2_MARK ,SD2_DATA3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -4012,18 +3991,18 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scifb2_ctrl),SH_PFC_PIN_GROUP (scif_clk),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd), SH_PFC_PIN_GROUP(sdhi2_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 48/60 pinctrl: renesas: r8a77950: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[01]_data1 are subsets of sdhi[01]_data4. Pin groups sdhi[23]_data[14] are subsets of sdhi[23]_data8.
This reduces kernel size by 96 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77950.c | 82 ++++++-------------------- 1 file changed, 18 insertions(+), 64 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77950.c +18 -64
@@ -3381,19 +3381,12 @@ static const unsigned int scif_clk_b_mux[] = { };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,2 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };
@@ -3419,19 +3412,12 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,8 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -SD1_DAT0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DAT0_MARK ,SD1_DAT1_MARK ,SD1_DAT2_MARK ,SD1_DAT3_MARK , };
@@ -3457,30 +3443,14 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,2 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DAT0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ), -RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), -}; -static const unsigned int sdhi2_data4_mux[] = { -SD2_DAT0_MARK ,SD2_DAT1_MARK , -SD2_DAT2_MARK ,SD2_DAT3_MARK , -}; -static const unsigned int sdhi2_data8_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ),RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ),RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi2_data8_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DAT0_MARK ,SD2_DAT1_MARK ,SD2_DAT2_MARK ,SD2_DAT3_MARK ,SD2_DAT4_MARK ,SD2_DAT5_MARK ,
@@ -3529,30 +3499,14 @@ static const unsigned int sdhi2_ds_mux[] = { SD2_DS_MARK, };/* - SDHI3 ------------------------------------------------------------------ */ -static const unsigned int sdhi3_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,9 ), -}; -static const unsigned int sdhi3_data1_mux[] = { -SD3_DAT0_MARK , -}; -static const unsigned int sdhi3_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ), -RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ), -}; -static const unsigned int sdhi3_data4_mux[] = { -SD3_DAT0_MARK ,SD3_DAT1_MARK , -SD3_DAT2_MARK ,SD3_DAT3_MARK , -}; -static const unsigned int sdhi3_data8_pins[] = { +static const unsigned int sdhi3_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ),RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ),RCAR_GP_PIN (4 ,13 ),RCAR_GP_PIN (4 ,14 ),RCAR_GP_PIN (4 ,15 ),RCAR_GP_PIN (4 ,16 ), }; -static const unsigned int sdhi3_data8_mux[] = { +static const unsigned int sdhi3_data_mux[] = {SD3_DAT0_MARK ,SD3_DAT1_MARK ,SD3_DAT2_MARK ,SD3_DAT3_MARK ,SD3_DAT4_MARK ,SD3_DAT5_MARK ,
@@ -4123,28 +4077,28 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scif5_clk),SH_PFC_PIN_GROUP (scif_clk_a),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), -SH_PFC_PIN_GROUP (sdhi2_data8), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ), +BUS_DATA_PIN_GROUP (sdhi2_data,8 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd_a),SH_PFC_PIN_GROUP (sdhi2_wp_a),SH_PFC_PIN_GROUP (sdhi2_cd_b),SH_PFC_PIN_GROUP (sdhi2_wp_b),SH_PFC_PIN_GROUP (sdhi2_ds), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), -SH_PFC_PIN_GROUP (sdhi3_data8), +BUS_DATA_PIN_GROUP (sdhi3_data,1 ), +BUS_DATA_PIN_GROUP (sdhi3_data,4 ), +BUS_DATA_PIN_GROUP (sdhi3_data,8 ),SH_PFC_PIN_GROUP (sdhi3_ctrl),SH_PFC_PIN_GROUP (sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 49/60 pinctrl: renesas: r8a77951: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[01]_data1 are subsets of sdhi[01]_data4. Pin groups sdhi[23]_data[14] are subsets of sdhi[23]_data8.
This reduces kernel size by 96 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77951.c | 82 ++++++-------------------- 1 file changed, 18 insertions(+), 64 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77951.c +18 -64
@@ -3527,19 +3527,12 @@ static const unsigned int scif_clk_b_mux[] = { };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,2 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };
@@ -3565,19 +3558,12 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,8 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -SD1_DAT0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DAT0_MARK ,SD1_DAT1_MARK ,SD1_DAT2_MARK ,SD1_DAT3_MARK , };
@@ -3603,30 +3589,14 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,2 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DAT0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ), -RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), -}; -static const unsigned int sdhi2_data4_mux[] = { -SD2_DAT0_MARK ,SD2_DAT1_MARK , -SD2_DAT2_MARK ,SD2_DAT3_MARK , -}; -static const unsigned int sdhi2_data8_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ),RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ),RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi2_data8_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DAT0_MARK ,SD2_DAT1_MARK ,SD2_DAT2_MARK ,SD2_DAT3_MARK ,SD2_DAT4_MARK ,SD2_DAT5_MARK ,
@@ -3675,30 +3645,14 @@ static const unsigned int sdhi2_ds_mux[] = { SD2_DS_MARK, };/* - SDHI3 ------------------------------------------------------------------ */ -static const unsigned int sdhi3_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,9 ), -}; -static const unsigned int sdhi3_data1_mux[] = { -SD3_DAT0_MARK , -}; -static const unsigned int sdhi3_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ), -RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ), -}; -static const unsigned int sdhi3_data4_mux[] = { -SD3_DAT0_MARK ,SD3_DAT1_MARK , -SD3_DAT2_MARK ,SD3_DAT3_MARK , -}; -static const unsigned int sdhi3_data8_pins[] = { +static const unsigned int sdhi3_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ),RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ),RCAR_GP_PIN (4 ,13 ),RCAR_GP_PIN (4 ,14 ),RCAR_GP_PIN (4 ,15 ),RCAR_GP_PIN (4 ,16 ), }; -static const unsigned int sdhi3_data8_mux[] = { +static const unsigned int sdhi3_data_mux[] = {SD3_DAT0_MARK ,SD3_DAT1_MARK ,SD3_DAT2_MARK ,SD3_DAT3_MARK ,SD3_DAT4_MARK ,SD3_DAT5_MARK ,
@@ -4459,28 +4413,28 @@ static const struct {SH_PFC_PIN_GROUP (scif5_clk_b),SH_PFC_PIN_GROUP (scif_clk_a),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), -SH_PFC_PIN_GROUP (sdhi2_data8), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ), +BUS_DATA_PIN_GROUP (sdhi2_data,8 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd_a),SH_PFC_PIN_GROUP (sdhi2_wp_a),SH_PFC_PIN_GROUP (sdhi2_cd_b),SH_PFC_PIN_GROUP (sdhi2_wp_b),SH_PFC_PIN_GROUP (sdhi2_ds), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), -SH_PFC_PIN_GROUP (sdhi3_data8), +BUS_DATA_PIN_GROUP (sdhi3_data,1 ), +BUS_DATA_PIN_GROUP (sdhi3_data,4 ), +BUS_DATA_PIN_GROUP (sdhi3_data,8 ),SH_PFC_PIN_GROUP (sdhi3_ctrl),SH_PFC_PIN_GROUP (sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 50/60 pinctrl: renesas: r8a77965: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[01]_data1 are subsets of sdhi[01]_data4. Pin groups sdhi[23]_data[14] are subsets of sdhi[23]_data8.
This reduces kernel size by 96 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77965.c | 94 +++++--------------------- 1 file changed, 18 insertions(+), 76 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77965.c +18 -76
@@ -3684,22 +3684,13 @@ static const unsigned int scif_clk_b_mux[] = { };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,2 ), -}; - -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; - -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };
@@ -3732,22 +3723,13 @@ static const unsigned int sdhi0_wp_mux[] = { };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,8 ), -}; - -static const unsigned int sdhi1_data1_mux[] = { -SD1_DAT0_MARK , -}; - -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DAT0_MARK ,SD1_DAT1_MARK ,SD1_DAT2_MARK ,SD1_DAT3_MARK , };
@@ -3780,27 +3762,7 @@ static const unsigned int sdhi1_wp_mux[] = { };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,2 ), -}; - -static const unsigned int sdhi2_data1_mux[] = { -SD2_DAT0_MARK , -}; - -static const unsigned int sdhi2_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ), -RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), -}; - -static const unsigned int sdhi2_data4_mux[] = { -SD2_DAT0_MARK ,SD2_DAT1_MARK , -SD2_DAT2_MARK ,SD2_DAT3_MARK , -}; - -static const unsigned int sdhi2_data8_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ),RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ),
@@ -3808,7 +3770,7 @@ static const unsigned int sdhi2_data8_pins[] = { RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), }; -static const unsigned int sdhi2_data8_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DAT0_MARK ,SD2_DAT1_MARK ,SD2_DAT2_MARK ,SD2_DAT3_MARK ,SD2_DAT4_MARK ,SD2_DAT5_MARK ,
@@ -3870,27 +3832,7 @@ static const unsigned int sdhi2_ds_mux[] = { };/* - SDHI3 ------------------------------------------------------------------ */ -static const unsigned int sdhi3_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,9 ), -}; - -static const unsigned int sdhi3_data1_mux[] = { -SD3_DAT0_MARK , -}; - -static const unsigned int sdhi3_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ), -RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ), -}; - -static const unsigned int sdhi3_data4_mux[] = { -SD3_DAT0_MARK ,SD3_DAT1_MARK , -SD3_DAT2_MARK ,SD3_DAT3_MARK , -}; - -static const unsigned int sdhi3_data8_pins[] = { +static const unsigned int sdhi3_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ),RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ),
@@ -3898,7 +3840,7 @@ static const unsigned int sdhi3_data8_pins[] = { RCAR_GP_PIN(4, 15), RCAR_GP_PIN(4, 16), }; -static const unsigned int sdhi3_data8_mux[] = { +static const unsigned int sdhi3_data_mux[] = {SD3_DAT0_MARK ,SD3_DAT1_MARK ,SD3_DAT2_MARK ,SD3_DAT3_MARK ,SD3_DAT4_MARK ,SD3_DAT5_MARK ,
@@ -4684,28 +4626,28 @@ static const struct {SH_PFC_PIN_GROUP (scif5_clk_b),SH_PFC_PIN_GROUP (scif_clk_a),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), -SH_PFC_PIN_GROUP (sdhi2_data8), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ), +BUS_DATA_PIN_GROUP (sdhi2_data,8 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd_a),SH_PFC_PIN_GROUP (sdhi2_wp_a),SH_PFC_PIN_GROUP (sdhi2_cd_b),SH_PFC_PIN_GROUP (sdhi2_wp_b),SH_PFC_PIN_GROUP (sdhi2_ds), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), -SH_PFC_PIN_GROUP (sdhi3_data8), +BUS_DATA_PIN_GROUP (sdhi3_data,1 ), +BUS_DATA_PIN_GROUP (sdhi3_data,4 ), +BUS_DATA_PIN_GROUP (sdhi3_data,8 ),SH_PFC_PIN_GROUP (sdhi3_ctrl),SH_PFC_PIN_GROUP (sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 51/60 pinctrl: renesas: r8a7796: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[01]_data1 are subsets of sdhi[01]_data4. Pin groups sdhi[23]_data[14] are subsets of sdhi[23]_data8.
This reduces kernel size by 96 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7796.c | 82 ++++++--------------------- 1 file changed, 18 insertions(+), 64 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7796.c +18 -64
@@ -3518,19 +3518,12 @@ static const unsigned int scif_clk_b_mux[] = { };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,2 ), -}; -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };
@@ -3556,19 +3549,12 @@ static const unsigned int sdhi0_wp_mux[] = { SD0_WP_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,8 ), -}; -static const unsigned int sdhi1_data1_mux[] = { -SD1_DAT0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DAT0_MARK ,SD1_DAT1_MARK ,SD1_DAT2_MARK ,SD1_DAT3_MARK , };
@@ -3594,30 +3580,14 @@ static const unsigned int sdhi1_wp_mux[] = { SD1_WP_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,2 ), -}; -static const unsigned int sdhi2_data1_mux[] = { -SD2_DAT0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ), -RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), -}; -static const unsigned int sdhi2_data4_mux[] = { -SD2_DAT0_MARK ,SD2_DAT1_MARK , -SD2_DAT2_MARK ,SD2_DAT3_MARK , -}; -static const unsigned int sdhi2_data8_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ),RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ),RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi2_data8_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SD2_DAT0_MARK ,SD2_DAT1_MARK ,SD2_DAT2_MARK ,SD2_DAT3_MARK ,SD2_DAT4_MARK ,SD2_DAT5_MARK ,
@@ -3666,30 +3636,14 @@ static const unsigned int sdhi2_ds_mux[] = { SD2_DS_MARK, };/* - SDHI3 ------------------------------------------------------------------ */ -static const unsigned int sdhi3_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,9 ), -}; -static const unsigned int sdhi3_data1_mux[] = { -SD3_DAT0_MARK , -}; -static const unsigned int sdhi3_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ), -RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ), -}; -static const unsigned int sdhi3_data4_mux[] = { -SD3_DAT0_MARK ,SD3_DAT1_MARK , -SD3_DAT2_MARK ,SD3_DAT3_MARK , -}; -static const unsigned int sdhi3_data8_pins[] = { +static const unsigned int sdhi3_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,9 ),RCAR_GP_PIN (4 ,10 ),RCAR_GP_PIN (4 ,11 ),RCAR_GP_PIN (4 ,12 ),RCAR_GP_PIN (4 ,13 ),RCAR_GP_PIN (4 ,14 ),RCAR_GP_PIN (4 ,15 ),RCAR_GP_PIN (4 ,16 ), }; -static const unsigned int sdhi3_data8_mux[] = { +static const unsigned int sdhi3_data_mux[] = {SD3_DAT0_MARK ,SD3_DAT1_MARK ,SD3_DAT2_MARK ,SD3_DAT3_MARK ,SD3_DAT4_MARK ,SD3_DAT5_MARK ,
@@ -4432,28 +4386,28 @@ static const struct {SH_PFC_PIN_GROUP (scif5_clk_b),SH_PFC_PIN_GROUP (scif_clk_a),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), -SH_PFC_PIN_GROUP (sdhi2_data8), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ), +BUS_DATA_PIN_GROUP (sdhi2_data,8 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (sdhi2_cd_a),SH_PFC_PIN_GROUP (sdhi2_wp_a),SH_PFC_PIN_GROUP (sdhi2_cd_b),SH_PFC_PIN_GROUP (sdhi2_wp_b),SH_PFC_PIN_GROUP (sdhi2_ds), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), -SH_PFC_PIN_GROUP (sdhi3_data8), +BUS_DATA_PIN_GROUP (sdhi3_data,1 ), +BUS_DATA_PIN_GROUP (sdhi3_data,4 ), +BUS_DATA_PIN_GROUP (sdhi3_data,8 ),SH_PFC_PIN_GROUP (sdhi3_ctrl),SH_PFC_PIN_GROUP (sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 52/60 pinctrl: renesas: r8a77990: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[01]_data1 are subsets of sdhi[01]_data4. Pin groups sdhi3_data[14] are subsets of sdhi3_data8.
This reduces kernel size by 56 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77990.c | 64 ++++++-------------------- 1 file changed, 13 insertions(+), 51 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77990.c +13 -51
@@ -3124,22 +3124,13 @@ static const unsigned int scif_clk_b_mux[] = { };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,2 ), -}; - -static const unsigned int sdhi0_data1_mux[] = { -SD0_DAT0_MARK , -}; - -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,2 ),RCAR_GP_PIN (3 ,3 ),RCAR_GP_PIN (3 ,4 ),RCAR_GP_PIN (3 ,5 ), }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SD0_DAT0_MARK ,SD0_DAT1_MARK ,SD0_DAT2_MARK ,SD0_DAT3_MARK , };
@@ -3172,22 +3163,13 @@ static const unsigned int sdhi0_wp_mux[] = { };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (3 ,8 ), -}; - -static const unsigned int sdhi1_data1_mux[] = { -SD1_DAT0_MARK , -}; - -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ), }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SD1_DAT0_MARK ,SD1_DAT1_MARK ,SD1_DAT2_MARK ,SD1_DAT3_MARK , };
@@ -3220,27 +3202,7 @@ static const unsigned int sdhi1_wp_mux[] = { };/* - SDHI3 ------------------------------------------------------------------ */ -static const unsigned int sdhi3_data1_pins[] = { -/* D0 */ -RCAR_GP_PIN (4 ,2 ), -}; - -static const unsigned int sdhi3_data1_mux[] = { -SD3_DAT0_MARK , -}; - -static const unsigned int sdhi3_data4_pins[] = { -/* D[0:3] */ -RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ), -RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ), -}; - -static const unsigned int sdhi3_data4_mux[] = { -SD3_DAT0_MARK ,SD3_DAT1_MARK , -SD3_DAT2_MARK ,SD3_DAT3_MARK , -}; - -static const unsigned int sdhi3_data8_pins[] = { +static const unsigned int sdhi3_data_pins[] = {/* D[0:7] */ RCAR_GP_PIN (4 ,2 ),RCAR_GP_PIN (4 ,3 ),RCAR_GP_PIN (4 ,4 ),RCAR_GP_PIN (4 ,5 ),
@@ -3248,7 +3210,7 @@ static const unsigned int sdhi3_data8_pins[] = { RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9), }; -static const unsigned int sdhi3_data8_mux[] = { +static const unsigned int sdhi3_data_mux[] = {SD3_DAT0_MARK ,SD3_DAT1_MARK ,SD3_DAT2_MARK ,SD3_DAT3_MARK ,SD3_DAT4_MARK ,SD3_DAT5_MARK ,
@@ -3998,19 +3960,19 @@ static const struct {SH_PFC_PIN_GROUP (scif5_data_c),SH_PFC_PIN_GROUP (scif_clk_a),SH_PFC_PIN_GROUP (scif_clk_b), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl),SH_PFC_PIN_GROUP (sdhi1_cd),SH_PFC_PIN_GROUP (sdhi1_wp), -SH_PFC_PIN_GROUP (sdhi3_data1), -SH_PFC_PIN_GROUP (sdhi3_data4), -SH_PFC_PIN_GROUP (sdhi3_data8), +BUS_DATA_PIN_GROUP (sdhi3_data,1 ), +BUS_DATA_PIN_GROUP (sdhi3_data,4 ), +BUS_DATA_PIN_GROUP (sdhi3_data,8 ),SH_PFC_PIN_GROUP (sdhi3_ctrl),SH_PFC_PIN_GROUP (sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_wp),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 53/60 pinctrl: renesas: sh73a0: Share SDHI pin group data
In reply to Geert UytterhoevenPin groups sdhi[012]_data1 are subsets of sdhi[012]_data4.
This reduces kernel size by 24 bytes.
--- drivers/pinctrl/renesas/pfc-sh73a0.c | 45 ++++++++-------------------- 1 file changed, 12 insertions(+), 33 deletions(-)
drivers/pinctrl/renesas/pfc-sh73a0.c +12 -33
@@ -2695,18 +2695,11 @@ static const unsigned int scifb_ctrl_1_mux[] = { PORT245_SCIFB_RTS__MARK, PORT244_SCIFB_CTS__MARK, };/* - SDHI0 ------------------------------------------------------------------ */ -static const unsigned int sdhi0_data1_pins[] = { -/* D0 */ -252 , -}; -static const unsigned int sdhi0_data1_mux[] = { -SDHID0_0_MARK , -}; -static const unsigned int sdhi0_data4_pins[] = { +static const unsigned int sdhi0_data_pins[] = {/* D[0:3] */ 252 ,253 ,254 ,255 , }; -static const unsigned int sdhi0_data4_mux[] = { +static const unsigned int sdhi0_data_mux[] = {SDHID0_0_MARK ,SDHID0_1_MARK ,SDHID0_2_MARK ,SDHID0_3_MARK , };static const unsigned int sdhi0_ctrl_pins[] = {
@@ -2731,18 +2724,11 @@ static const unsigned int sdhi0_wp_mux[] = { SDHIWP0_MARK, };/* - SDHI1 ------------------------------------------------------------------ */ -static const unsigned int sdhi1_data1_pins[] = { -/* D0 */ -259 , -}; -static const unsigned int sdhi1_data1_mux[] = { -SDHID1_0_MARK , -}; -static const unsigned int sdhi1_data4_pins[] = { +static const unsigned int sdhi1_data_pins[] = {/* D[0:3] */ 259 ,260 ,261 ,262 , }; -static const unsigned int sdhi1_data4_mux[] = { +static const unsigned int sdhi1_data_mux[] = {SDHID1_0_MARK ,SDHID1_1_MARK ,SDHID1_2_MARK ,SDHID1_3_MARK , };static const unsigned int sdhi1_ctrl_pins[] = {
@@ -2753,18 +2739,11 @@ static const unsigned int sdhi1_ctrl_mux[] = { SDHICMD1_MARK, SDHICLK1_MARK, };/* - SDHI2 ------------------------------------------------------------------ */ -static const unsigned int sdhi2_data1_pins[] = { -/* D0 */ -265 , -}; -static const unsigned int sdhi2_data1_mux[] = { -SDHID2_0_MARK , -}; -static const unsigned int sdhi2_data4_pins[] = { +static const unsigned int sdhi2_data_pins[] = {/* D[0:3] */ 265 ,266 ,267 ,268 , }; -static const unsigned int sdhi2_data4_mux[] = { +static const unsigned int sdhi2_data_mux[] = {SDHID2_0_MARK ,SDHID2_1_MARK ,SDHID2_2_MARK ,SDHID2_3_MARK , };static const unsigned int sdhi2_ctrl_pins[] = {
@@ -3124,16 +3103,16 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (scifb_data_1),SH_PFC_PIN_GROUP (scifb_clk_1),SH_PFC_PIN_GROUP (scifb_ctrl_1), -SH_PFC_PIN_GROUP (sdhi0_data1), -SH_PFC_PIN_GROUP (sdhi0_data4), +BUS_DATA_PIN_GROUP (sdhi0_data,1 ), +BUS_DATA_PIN_GROUP (sdhi0_data,4 ),SH_PFC_PIN_GROUP (sdhi0_ctrl),SH_PFC_PIN_GROUP (sdhi0_cd),SH_PFC_PIN_GROUP (sdhi0_wp), -SH_PFC_PIN_GROUP (sdhi1_data1), -SH_PFC_PIN_GROUP (sdhi1_data4), +BUS_DATA_PIN_GROUP (sdhi1_data,1 ), +BUS_DATA_PIN_GROUP (sdhi1_data,4 ),SH_PFC_PIN_GROUP (sdhi1_ctrl), -SH_PFC_PIN_GROUP (sdhi2_data1), -SH_PFC_PIN_GROUP (sdhi2_data4), +BUS_DATA_PIN_GROUP (sdhi2_data,1 ), +BUS_DATA_PIN_GROUP (sdhi2_data,4 ),SH_PFC_PIN_GROUP (sdhi2_ctrl),SH_PFC_PIN_GROUP (tpu0_to0), SH_PFC_PIN_GROUP(tpu0_to1),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 54/60 pinctrl: renesas: emev2: Share SDI pin group data
In reply to Geert UytterhoevenPin groups sdi0_data[14] are subsets of sdi0_data8. Pin groups sdi[12]_data1 are subsets of sdi[12]_data4.
This reduces kernel size by 56 bytes.
--- drivers/pinctrl/renesas/pfc-emev2.c | 54 +++++++---------------------- 1 file changed, 13 insertions(+), 41 deletions(-)
drivers/pinctrl/renesas/pfc-emev2.c +13 -41
@@ -886,26 +886,12 @@ static const unsigned int sdi0_ctrl_mux[] = { SDI0_CKO_MARK, SDI0_CKI_MARK, SDI0_CMD_MARK, }; -static const unsigned int sdi0_data1_pins[] = { -/* SDI0_DATA[0] */ -53 , -}; -static const unsigned int sdi0_data1_mux[] = { -SDI0_DATA0_MARK , -}; -static const unsigned int sdi0_data4_pins[] = { -/* SDI0_DATA[0:3] */ -53 ,54 ,55 ,56 , -}; -static const unsigned int sdi0_data4_mux[] = { -SDI0_DATA0_MARK ,SDI0_DATA1_MARK ,SDI0_DATA2_MARK ,SDI0_DATA3_MARK , -}; -static const unsigned int sdi0_data8_pins[] = { +static const unsigned int sdi0_data_pins[] = {/* SDI0_DATA[0:7] */ 53 ,54 ,55 ,56 ,57 ,58 ,59 ,60 }; -static const unsigned int sdi0_data8_mux[] = { +static const unsigned int sdi0_data_mux[] = {SDI0_DATA0_MARK ,SDI0_DATA1_MARK ,SDI0_DATA2_MARK ,SDI0_DATA3_MARK ,SDI0_DATA4_MARK ,SDI0_DATA5_MARK ,SDI0_DATA6_MARK ,SDI0_DATA7_MARK , };
@@ -919,18 +905,11 @@ static const unsigned int sdi1_ctrl_mux[] = { SDI1_CKO_MARK, SDI1_CKI_MARK, SDI1_CMD_MARK, }; -static const unsigned int sdi1_data1_pins[] = { -/* SDI1_DATA[0] */ -64 , -}; -static const unsigned int sdi1_data1_mux[] = { -SDI1_DATA0_MARK , -}; -static const unsigned int sdi1_data4_pins[] = { +static const unsigned int sdi1_data_pins[] = {/* SDI1_DATA[0:3] */ 64 ,65 ,66 ,67 , }; -static const unsigned int sdi1_data4_mux[] = { +static const unsigned int sdi1_data_mux[] = {SDI1_DATA0_MARK ,SDI1_DATA1_MARK ,SDI1_DATA2_MARK ,SDI1_DATA3_MARK , };
@@ -943,18 +922,11 @@ static const unsigned int sdi2_ctrl_mux[] = { SDI2_CKO_MARK, SDI2_CKI_MARK, SDI2_CMD_MARK, }; -static const unsigned int sdi2_data1_pins[] = { -/* SDI2_DATA[0] */ -89 , -}; -static const unsigned int sdi2_data1_mux[] = { -SDI2_DATA0_MARK , -}; -static const unsigned int sdi2_data4_pins[] = { +static const unsigned int sdi2_data_pins[] = {/* SDI2_DATA[0:3] */ 89 ,90 ,91 ,92 , }; -static const unsigned int sdi2_data4_mux[] = { +static const unsigned int sdi2_data_mux[] = {SDI2_DATA0_MARK ,SDI2_DATA1_MARK ,SDI2_DATA2_MARK ,SDI2_DATA3_MARK , };
@@ -1152,17 +1124,17 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (sd_cki),SH_PFC_PIN_GROUP (sdi0_ctrl), -SH_PFC_PIN_GROUP (sdi0_data1), -SH_PFC_PIN_GROUP (sdi0_data4), -SH_PFC_PIN_GROUP (sdi0_data8), +BUS_DATA_PIN_GROUP (sdi0_data,1 ), +BUS_DATA_PIN_GROUP (sdi0_data,4 ), +BUS_DATA_PIN_GROUP (sdi0_data,8 ),SH_PFC_PIN_GROUP (sdi1_ctrl), -SH_PFC_PIN_GROUP (sdi1_data1), -SH_PFC_PIN_GROUP (sdi1_data4), +BUS_DATA_PIN_GROUP (sdi1_data,1 ), +BUS_DATA_PIN_GROUP (sdi1_data,4 ),SH_PFC_PIN_GROUP (sdi2_ctrl), -SH_PFC_PIN_GROUP (sdi2_data1), -SH_PFC_PIN_GROUP (sdi2_data4), +BUS_DATA_PIN_GROUP (sdi2_data,1 ), +BUS_DATA_PIN_GROUP (sdi2_data,4 ), SH_PFC_PIN_GROUP(tp33),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 55/60 pinctrl: renesas: r8a7790: Share USB1 pin group data
In reply to Geert UytterhoevenPin group usb0_ovc_vbus is a subset of usb0.
Pin group usb1_pwen is a subset of usb1.
This reduces kernel size by 16 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7790.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7790.c +5 -19
@@ -3609,18 +3609,11 @@ static const unsigned int tpu0_to3_mux[] = { };/* - USB0 ------------------------------------------------------------------- */ static const unsigned int usb0_pins[] = { -/* PWEN, OVC/VBUS */ -RCAR_GP_PIN (5 ,18 ),RCAR_GP_PIN (5 ,19 ), +/* OVC/VBUS, PWEN */ +RCAR_GP_PIN (5 ,19 ),RCAR_GP_PIN (5 ,18 ), };static const unsigned int usb0_mux[] = { -USB0_PWEN_MARK ,USB0_OVC_VBUS_MARK , -}; -static const unsigned int usb0_ovc_vbus_pins[] = { -/* OVC/VBUS */ -RCAR_GP_PIN (5 ,19 ), -}; -static const unsigned int usb0_ovc_vbus_mux[] = { -USB0_OVC_VBUS_MARK , +USB0_OVC_VBUS_MARK ,USB0_PWEN_MARK , };/* - USB1 ------------------------------------------------------------------- */ static const unsigned int usb1_pins[] = {
@@ -3630,13 +3623,6 @@ static const unsigned int usb1_pins[] = {static const unsigned int usb1_mux[] = {USB1_PWEN_MARK ,USB1_OVC_MARK , }; -static const unsigned int usb1_pwen_pins[] = { -/* PWEN */ -RCAR_GP_PIN (5 ,20 ), -}; -static const unsigned int usb1_pwen_mux[] = { -USB1_PWEN_MARK , -};/* - USB2 ------------------------------------------------------------------- */ static const unsigned int usb2_pins[] = {/* PWEN, OVC */
@@ -4315,9 +4301,9 @@ static const struct {SH_PFC_PIN_GROUP (tpu0_to2),SH_PFC_PIN_GROUP (tpu0_to3),SH_PFC_PIN_GROUP (usb0), -SH_PFC_PIN_GROUP (usb0_ovc_vbus), +SH_PFC_PIN_GROUP_SUBSET (usb0_ovc_vbus, usb0,0 ,1 ),SH_PFC_PIN_GROUP (usb1), -SH_PFC_PIN_GROUP (usb1_pwen), +SH_PFC_PIN_GROUP_SUBSET (usb1_pwen, usb1,0 ,1 ),SH_PFC_PIN_GROUP (usb2),BUS_DATA_PIN_GROUP (vin0_data,24 ), BUS_DATA_PIN_GROUP(vin0_data, 20),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 56/60 pinctrl: renesas: r8a7790: Share more VIN pin group data
In reply to Geert UytterhoevenPin group vin2_g8 is a subset of vin2_data24.
This reduces kernel size by 64 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7790.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7790.c +1 -13
@@ -3960,18 +3960,6 @@ static const unsigned int vin2_data18_mux[] = {VI2_R4_MARK ,VI2_R5_MARK , VI2_R6_MARK, VI2_R7_MARK, }; -static const unsigned int vin2_g8_pins[] = { -RCAR_GP_PIN (0 ,27 ),RCAR_GP_PIN (0 ,28 ), -RCAR_GP_PIN (0 ,29 ),RCAR_GP_PIN (1 ,10 ), -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -}; -static const unsigned int vin2_g8_mux[] = { -VI2_G0_MARK ,VI2_G1_MARK , -VI2_G2_MARK ,VI2_G3_MARK , -VI2_G4_MARK ,VI2_G5_MARK , -VI2_G6_MARK ,VI2_G7_MARK , -};static const unsigned int vin2_sync_pins[] = {RCAR_GP_PIN (1 ,16 ),/* HSYNC */ RCAR_GP_PIN(1, 21), /* VSYNC */
@@ -4346,7 +4334,7 @@ static const struct {BUS_DATA_PIN_GROUP (vin2_data,16 ),BUS_DATA_PIN_GROUP (vin2_data,8 ),BUS_DATA_PIN_GROUP (vin2_data,4 ), -SH_PFC_PIN_GROUP (vin2_g8), +SH_PFC_PIN_GROUP_SUBSET (vin2_g8, vin2_data,8 ,8 ),SH_PFC_PIN_GROUP (vin2_sync),SH_PFC_PIN_GROUP (vin2_field), SH_PFC_PIN_GROUP(vin2_clkenb),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 57/60 pinctrl: renesas: r8a77951: Share more VIN pin group data
In reply to Geert UytterhoevenPin group vin4_g8 is a subset of vin4_data24_a.
Pin group vin5_high8 is a subset of vin5_data16.
This reduces kernel size by 128 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77951.c | 28 ++------------------------ 1 file changed, 2 insertions(+), 26 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77951.c +2 -26
@@ -4067,18 +4067,6 @@ static const unsigned int vin4_data_b_mux[] = {VI4_DATA20_MARK ,VI4_DATA21_MARK , VI4_DATA22_MARK, VI4_DATA23_MARK, }; -static const unsigned int vin4_g8_pins[] = { -RCAR_GP_PIN (1 ,0 ),RCAR_GP_PIN (1 ,1 ), -RCAR_GP_PIN (1 ,2 ),RCAR_GP_PIN (1 ,3 ), -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -}; -static const unsigned int vin4_g8_mux[] = { -VI4_DATA8_MARK ,VI4_DATA9_MARK , -VI4_DATA10_MARK ,VI4_DATA11_MARK , -VI4_DATA12_MARK ,VI4_DATA13_MARK , -VI4_DATA14_MARK ,VI4_DATA15_MARK , -};static const unsigned int vin4_sync_pins[] = {/* HSYNC#, VSYNC# */ RCAR_GP_PIN(1, 18), RCAR_GP_PIN(1, 17),
@@ -4129,18 +4117,6 @@ static const unsigned int vin5_data_mux[] = {VI5_DATA12_MARK ,VI5_DATA13_MARK , VI5_DATA14_MARK, VI5_DATA15_MARK, }; -static const unsigned int vin5_high8_pins[] = { -RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,13 ), -RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,15 ), -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -}; -static const unsigned int vin5_high8_mux[] = { -VI5_DATA8_MARK ,VI5_DATA9_MARK , -VI5_DATA10_MARK ,VI5_DATA11_MARK , -VI5_DATA12_MARK ,VI5_DATA13_MARK , -VI5_DATA14_MARK ,VI5_DATA15_MARK , -};static const unsigned int vin5_sync_pins[] = {/* HSYNC#, VSYNC# */ RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 9),
@@ -4491,7 +4467,7 @@ static const struct {SH_PFC_PIN_GROUP (vin4_data18_b),BUS_DATA_PIN_GROUP (vin4_data,20 , _b),BUS_DATA_PIN_GROUP (vin4_data,24 , _b), -SH_PFC_PIN_GROUP (vin4_g8), +SH_PFC_PIN_GROUP_SUBSET (vin4_g8, vin4_data_a,8 ,8 ),SH_PFC_PIN_GROUP (vin4_sync),SH_PFC_PIN_GROUP (vin4_field), SH_PFC_PIN_GROUP(vin4_clkenb),
@@ -4500,7 +4476,7 @@ static const struct {BUS_DATA_PIN_GROUP (vin5_data,10 ),BUS_DATA_PIN_GROUP (vin5_data,12 ),BUS_DATA_PIN_GROUP (vin5_data,16 ), -SH_PFC_PIN_GROUP (vin5_high8), +SH_PFC_PIN_GROUP_SUBSET (vin5_high8, vin5_data,8 ,8 ),SH_PFC_PIN_GROUP (vin5_sync),SH_PFC_PIN_GROUP (vin5_field), SH_PFC_PIN_GROUP(vin5_clkenb),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 58/60 pinctrl: renesas: r8a7796: Share more VIN pin group data
In reply to Geert UytterhoevenPin group vin4_g8 is a subset of vin4_data24_a.
Pin group vin5_high8 is a subset of vin5_data16.
This reduces kernel size by 128 bytes.
--- drivers/pinctrl/renesas/pfc-r8a7796.c | 28 ++------------------------- 1 file changed, 2 insertions(+), 26 deletions(-)
drivers/pinctrl/renesas/pfc-r8a7796.c +2 -26
@@ -4042,18 +4042,6 @@ static const unsigned int vin4_data_b_mux[] = {VI4_DATA20_MARK ,VI4_DATA21_MARK , VI4_DATA22_MARK, VI4_DATA23_MARK, }; -static const unsigned int vin4_g8_pins[] = { -RCAR_GP_PIN (1 ,0 ),RCAR_GP_PIN (1 ,1 ), -RCAR_GP_PIN (1 ,2 ),RCAR_GP_PIN (1 ,3 ), -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -}; -static const unsigned int vin4_g8_mux[] = { -VI4_DATA8_MARK ,VI4_DATA9_MARK , -VI4_DATA10_MARK ,VI4_DATA11_MARK , -VI4_DATA12_MARK ,VI4_DATA13_MARK , -VI4_DATA14_MARK ,VI4_DATA15_MARK , -};static const unsigned int vin4_sync_pins[] = {/* HSYNC#, VSYNC# */ RCAR_GP_PIN(1, 18), RCAR_GP_PIN(1, 17),
@@ -4104,18 +4092,6 @@ static const unsigned int vin5_data_mux[] = {VI5_DATA12_MARK ,VI5_DATA13_MARK , VI5_DATA14_MARK, VI5_DATA15_MARK, }; -static const unsigned int vin5_high8_pins[] = { -RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,13 ), -RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,15 ), -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -}; -static const unsigned int vin5_high8_mux[] = { -VI5_DATA8_MARK ,VI5_DATA9_MARK , -VI5_DATA10_MARK ,VI5_DATA11_MARK , -VI5_DATA12_MARK ,VI5_DATA13_MARK , -VI5_DATA14_MARK ,VI5_DATA15_MARK , -};static const unsigned int vin5_sync_pins[] = {/* HSYNC#, VSYNC# */ RCAR_GP_PIN(1, 10), RCAR_GP_PIN(1, 9),
@@ -4462,7 +4438,7 @@ static const struct {SH_PFC_PIN_GROUP (vin4_data18_b),BUS_DATA_PIN_GROUP (vin4_data,20 , _b),BUS_DATA_PIN_GROUP (vin4_data,24 , _b), -SH_PFC_PIN_GROUP (vin4_g8), +SH_PFC_PIN_GROUP_SUBSET (vin4_g8, vin4_data_a,8 ,8 ),SH_PFC_PIN_GROUP (vin4_sync),SH_PFC_PIN_GROUP (vin4_field), SH_PFC_PIN_GROUP(vin4_clkenb),
@@ -4471,7 +4447,7 @@ static const struct {BUS_DATA_PIN_GROUP (vin5_data,10 ),BUS_DATA_PIN_GROUP (vin5_data,12 ),BUS_DATA_PIN_GROUP (vin5_data,16 ), -SH_PFC_PIN_GROUP (vin5_high8), +SH_PFC_PIN_GROUP_SUBSET (vin5_high8, vin5_data,8 ,8 ),SH_PFC_PIN_GROUP (vin5_sync),SH_PFC_PIN_GROUP (vin5_field), SH_PFC_PIN_GROUP(vin5_clkenb),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 59/60 pinctrl: renesas: r8a77965: Share more VIN pin group data
In reply to Geert UytterhoevenPin group vin4_g8 is a subset of vin4_data24_a.
Pin group vin5_high8 is a subset of vin5_data16.
This reduces kernel size by 128 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77965.c | 32 ++------------------------ 1 file changed, 2 insertions(+), 30 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77965.c +2 -30
@@ -4266,20 +4266,6 @@ static const unsigned int vin4_data_b_mux[] = { VI4_DATA22_MARK, VI4_DATA23_MARK, }; -static const unsigned int vin4_g8_pins[] = { -RCAR_GP_PIN (1 ,0 ),RCAR_GP_PIN (1 ,1 ), -RCAR_GP_PIN (1 ,2 ),RCAR_GP_PIN (1 ,3 ), -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -}; - -static const unsigned int vin4_g8_mux[] = { -VI4_DATA8_MARK ,VI4_DATA9_MARK , -VI4_DATA10_MARK ,VI4_DATA11_MARK , -VI4_DATA12_MARK ,VI4_DATA13_MARK , -VI4_DATA14_MARK ,VI4_DATA15_MARK , -}; -static const unsigned int vin4_sync_pins[] = {/* VSYNC_N, HSYNC_N */ RCAR_GP_PIN (1 ,17 ),RCAR_GP_PIN (1 ,18 ),
@@ -4336,20 +4322,6 @@ static const unsigned int vin5_data_mux[] = { VI5_DATA14_MARK, VI5_DATA15_MARK, }; -static const unsigned int vin5_high8_pins[] = { -RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,13 ), -RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,15 ), -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -}; - -static const unsigned int vin5_high8_mux[] = { -VI5_DATA8_MARK ,VI5_DATA9_MARK , -VI5_DATA10_MARK ,VI5_DATA11_MARK , -VI5_DATA12_MARK ,VI5_DATA13_MARK , -VI5_DATA14_MARK ,VI5_DATA15_MARK , -}; -static const unsigned int vin5_sync_pins[] = {/* VSYNC_N, HSYNC_N */ RCAR_GP_PIN (1 ,9 ),RCAR_GP_PIN (1 ,10 ),
@@ -4702,7 +4674,7 @@ static const struct {SH_PFC_PIN_GROUP (vin4_data18_b),BUS_DATA_PIN_GROUP (vin4_data,20 , _b),BUS_DATA_PIN_GROUP (vin4_data,24 , _b), -SH_PFC_PIN_GROUP (vin4_g8), +SH_PFC_PIN_GROUP_SUBSET (vin4_g8, vin4_data_a,8 ,8 ),SH_PFC_PIN_GROUP (vin4_sync),SH_PFC_PIN_GROUP (vin4_field), SH_PFC_PIN_GROUP(vin4_clkenb),
@@ -4711,7 +4683,7 @@ static const struct {BUS_DATA_PIN_GROUP (vin5_data,10 ),BUS_DATA_PIN_GROUP (vin5_data,12 ),BUS_DATA_PIN_GROUP (vin5_data,16 ), -SH_PFC_PIN_GROUP (vin5_high8), +SH_PFC_PIN_GROUP_SUBSET (vin5_high8, vin5_data,8 ,8 ),SH_PFC_PIN_GROUP (vin5_sync),SH_PFC_PIN_GROUP (vin5_field), SH_PFC_PIN_GROUP(vin5_clkenb),
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 60/60 pinctrl: renesas: r8a77990: Share more VIN pin group data
In reply to Geert UytterhoevenPin group vin4_g8 is a subset of vin4_data24_a. Pin group vin5_high8 is a subset of vin5_data16_a.
This reduces kernel size by 128 bytes.
--- drivers/pinctrl/renesas/pfc-r8a77990.c | 32 ++------------------------ 1 file changed, 2 insertions(+), 30 deletions(-)
drivers/pinctrl/renesas/pfc-r8a77990.c +2 -30
@@ -3636,20 +3636,6 @@ static const unsigned int vin4_data_b_mux[] = { VI4_DATA22_MARK, VI4_DATA23_MARK, }; -static const unsigned int vin4_g8_pins[] = { -RCAR_GP_PIN (1 ,4 ),RCAR_GP_PIN (1 ,5 ), -RCAR_GP_PIN (1 ,6 ),RCAR_GP_PIN (1 ,7 ), -RCAR_GP_PIN (1 ,3 ),RCAR_GP_PIN (1 ,10 ), -RCAR_GP_PIN (1 ,13 ),RCAR_GP_PIN (1 ,14 ), -}; - -static const unsigned int vin4_g8_mux[] = { -VI4_DATA8_MARK ,VI4_DATA9_MARK , -VI4_DATA10_MARK ,VI4_DATA11_MARK , -VI4_DATA12_MARK ,VI4_DATA13_MARK , -VI4_DATA14_MARK ,VI4_DATA15_MARK , -}; -static const unsigned int vin4_sync_pins[] = {/* HSYNC, VSYNC */ RCAR_GP_PIN (2 ,25 ),RCAR_GP_PIN (2 ,24 ),
@@ -3720,20 +3706,6 @@ static const unsigned int vin5_data8_b_mux[] = { VI5_DATA6_B_MARK, VI5_DATA7_B_MARK, }; -static const unsigned int vin5_high8_pins[] = { -RCAR_GP_PIN (0 ,12 ),RCAR_GP_PIN (0 ,13 ), -RCAR_GP_PIN (0 ,9 ),RCAR_GP_PIN (0 ,11 ), -RCAR_GP_PIN (0 ,8 ),RCAR_GP_PIN (0 ,10 ), -RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), -}; - -static const unsigned int vin5_high8_mux[] = { -VI5_DATA8_A_MARK ,VI5_DATA9_A_MARK , -VI5_DATA10_A_MARK ,VI5_DATA11_A_MARK , -VI5_DATA12_A_MARK ,VI5_DATA13_A_MARK , -VI5_DATA14_A_MARK ,VI5_DATA15_A_MARK , -}; -static const unsigned int vin5_sync_a_pins[] = {/* HSYNC_N, VSYNC_N */ RCAR_GP_PIN (1 ,8 ),RCAR_GP_PIN (1 ,9 ),
@@ -4021,7 +3993,7 @@ static const struct {SH_PFC_PIN_GROUP (vin4_data18_b),BUS_DATA_PIN_GROUP (vin4_data,20 , _b),BUS_DATA_PIN_GROUP (vin4_data,24 , _b), -SH_PFC_PIN_GROUP (vin4_g8), +SH_PFC_PIN_GROUP_SUBSET (vin4_g8, vin4_data_a,8 ,8 ),SH_PFC_PIN_GROUP (vin4_sync),SH_PFC_PIN_GROUP (vin4_field), SH_PFC_PIN_GROUP(vin4_clkenb),
@@ -4031,7 +4003,7 @@ static const struct {BUS_DATA_PIN_GROUP (vin5_data,12 , _a),BUS_DATA_PIN_GROUP (vin5_data,16 , _a),SH_PFC_PIN_GROUP (vin5_data8_b), -SH_PFC_PIN_GROUP (vin5_high8), +SH_PFC_PIN_GROUP_SUBSET (vin5_high8, vin5_data_a,8 ,8 ),SH_PFC_PIN_GROUP (vin5_sync_a),SH_PFC_PIN_GROUP (vin5_field_a), SH_PFC_PIN_GROUP(vin5_clkenb_a),
Signature · 1 line
2.25.1