Commit 40c845dd authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

pinctrl: renesas: r8a77990: Share SDHI pin group data

Pin 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.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/2f702b6c6114458a43a77ae04089e7f9e20482e5.1640269757.git.geert+renesas@glider.be
parent 33296238
...@@ -3134,22 +3134,13 @@ static const unsigned int scif_clk_b_mux[] = { ...@@ -3134,22 +3134,13 @@ static const unsigned int scif_clk_b_mux[] = {
}; };
/* - SDHI0 ------------------------------------------------------------------ */ /* - SDHI0 ------------------------------------------------------------------ */
static const unsigned int sdhi0_data1_pins[] = { static const unsigned int sdhi0_data_pins[] = {
/* D0 */
RCAR_GP_PIN(3, 2),
};
static const unsigned int sdhi0_data1_mux[] = {
SD0_DAT0_MARK,
};
static const unsigned int sdhi0_data4_pins[] = {
/* D[0:3] */ /* D[0:3] */
RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5), 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_DAT0_MARK, SD0_DAT1_MARK,
SD0_DAT2_MARK, SD0_DAT3_MARK, SD0_DAT2_MARK, SD0_DAT3_MARK,
}; };
...@@ -3182,22 +3173,13 @@ static const unsigned int sdhi0_wp_mux[] = { ...@@ -3182,22 +3173,13 @@ static const unsigned int sdhi0_wp_mux[] = {
}; };
/* - SDHI1 ------------------------------------------------------------------ */ /* - SDHI1 ------------------------------------------------------------------ */
static const unsigned int sdhi1_data1_pins[] = { static const unsigned int sdhi1_data_pins[] = {
/* D0 */
RCAR_GP_PIN(3, 8),
};
static const unsigned int sdhi1_data1_mux[] = {
SD1_DAT0_MARK,
};
static const unsigned int sdhi1_data4_pins[] = {
/* D[0:3] */ /* D[0:3] */
RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9), RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11), 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_DAT0_MARK, SD1_DAT1_MARK,
SD1_DAT2_MARK, SD1_DAT3_MARK, SD1_DAT2_MARK, SD1_DAT3_MARK,
}; };
...@@ -3230,27 +3212,7 @@ static const unsigned int sdhi1_wp_mux[] = { ...@@ -3230,27 +3212,7 @@ static const unsigned int sdhi1_wp_mux[] = {
}; };
/* - SDHI3 ------------------------------------------------------------------ */ /* - SDHI3 ------------------------------------------------------------------ */
static const unsigned int sdhi3_data1_pins[] = { static const unsigned int sdhi3_data_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[] = {
/* D[0:7] */ /* D[0:7] */
RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 3),
RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5),
...@@ -3258,7 +3220,7 @@ static const unsigned int sdhi3_data8_pins[] = { ...@@ -3258,7 +3220,7 @@ static const unsigned int sdhi3_data8_pins[] = {
RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9), 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_DAT0_MARK, SD3_DAT1_MARK,
SD3_DAT2_MARK, SD3_DAT3_MARK, SD3_DAT2_MARK, SD3_DAT3_MARK,
SD3_DAT4_MARK, SD3_DAT5_MARK, SD3_DAT4_MARK, SD3_DAT5_MARK,
...@@ -4008,19 +3970,19 @@ static const struct { ...@@ -4008,19 +3970,19 @@ static const struct {
SH_PFC_PIN_GROUP(scif5_data_c), SH_PFC_PIN_GROUP(scif5_data_c),
SH_PFC_PIN_GROUP(scif_clk_a), SH_PFC_PIN_GROUP(scif_clk_a),
SH_PFC_PIN_GROUP(scif_clk_b), SH_PFC_PIN_GROUP(scif_clk_b),
SH_PFC_PIN_GROUP(sdhi0_data1), BUS_DATA_PIN_GROUP(sdhi0_data, 1),
SH_PFC_PIN_GROUP(sdhi0_data4), BUS_DATA_PIN_GROUP(sdhi0_data, 4),
SH_PFC_PIN_GROUP(sdhi0_ctrl), SH_PFC_PIN_GROUP(sdhi0_ctrl),
SH_PFC_PIN_GROUP(sdhi0_cd), SH_PFC_PIN_GROUP(sdhi0_cd),
SH_PFC_PIN_GROUP(sdhi0_wp), SH_PFC_PIN_GROUP(sdhi0_wp),
SH_PFC_PIN_GROUP(sdhi1_data1), BUS_DATA_PIN_GROUP(sdhi1_data, 1),
SH_PFC_PIN_GROUP(sdhi1_data4), BUS_DATA_PIN_GROUP(sdhi1_data, 4),
SH_PFC_PIN_GROUP(sdhi1_ctrl), SH_PFC_PIN_GROUP(sdhi1_ctrl),
SH_PFC_PIN_GROUP(sdhi1_cd), SH_PFC_PIN_GROUP(sdhi1_cd),
SH_PFC_PIN_GROUP(sdhi1_wp), SH_PFC_PIN_GROUP(sdhi1_wp),
SH_PFC_PIN_GROUP(sdhi3_data1), BUS_DATA_PIN_GROUP(sdhi3_data, 1),
SH_PFC_PIN_GROUP(sdhi3_data4), BUS_DATA_PIN_GROUP(sdhi3_data, 4),
SH_PFC_PIN_GROUP(sdhi3_data8), BUS_DATA_PIN_GROUP(sdhi3_data, 8),
SH_PFC_PIN_GROUP(sdhi3_ctrl), SH_PFC_PIN_GROUP(sdhi3_ctrl),
SH_PFC_PIN_GROUP(sdhi3_cd), SH_PFC_PIN_GROUP(sdhi3_cd),
SH_PFC_PIN_GROUP(sdhi3_wp), SH_PFC_PIN_GROUP(sdhi3_wp),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment