@@ -1076,17 +1076,17 @@ static void __init sh_pfc_check_info(const struct sh_pfc_soc_info *info)
if (!drive_regs) {
sh_pfc_err_once(drive, "SH_PFC_PIN_CFG_DRIVE_STRENGTH flag set but drive_regs missing\n");
} else {
- for (j = 0; drive_regs[j / 8].reg; j++) {
- if (!drive_regs[j / 8].fields[j % 8].pin &&
- !drive_regs[j / 8].fields[j % 8].offset &&
- !drive_regs[j / 8].fields[j % 8].size)
+ for (j = 0; drive_regs[j / 10].reg; j++) {
+ if (!drive_regs[j / 10].fields[j % 10].pin &&
+ !drive_regs[j / 10].fields[j % 10].offset &&
+ !drive_regs[j / 10].fields[j % 10].size)
continue;
- if (drive_regs[j / 8].fields[j % 8].pin == pin->pin)
+ if (drive_regs[j / 10].fields[j % 10].pin == pin->pin)
break;
}
- if (!drive_regs[j / 8].reg)
+ if (!drive_regs[j / 10].reg)
sh_pfc_err("pin %s: SH_PFC_PIN_CFG_DRIVE_STRENGTH flag set but not in drive_regs\n",
pin->name);
}
@@ -1164,20 +1164,20 @@ static void __init sh_pfc_check_info(const struct sh_pfc_soc_info *info)
for (i = 0; drive_regs && drive_regs[i].reg; i++)
sh_pfc_check_drive_reg(info, &drive_regs[i]);
- for (i = 0; drive_regs && drive_regs[i / 8].reg; i++) {
- if (!drive_regs[i / 8].fields[i % 8].pin &&
- !drive_regs[i / 8].fields[i % 8].offset &&
- !drive_regs[i / 8].fields[i % 8].size)
+ for (i = 0; drive_regs && drive_regs[i / 10].reg; i++) {
+ if (!drive_regs[i / 10].fields[i % 10].pin &&
+ !drive_regs[i / 10].fields[i % 10].offset &&
+ !drive_regs[i / 10].fields[i % 10].size)
continue;
for (j = 0; j < i; j++) {
- if (drive_regs[i / 8].fields[i % 8].pin ==
- drive_regs[j / 8].fields[j % 8].pin &&
- drive_regs[j / 8].fields[j % 8].offset &&
- drive_regs[j / 8].fields[j % 8].size) {
+ if (drive_regs[i / 10].fields[i % 10].pin ==
+ drive_regs[j / 10].fields[j % 10].pin &&
+ drive_regs[j / 10].fields[j % 10].offset &&
+ drive_regs[j / 10].fields[j % 10].size) {
sh_pfc_err("drive_reg 0x%x:%u/0x%x:%u: pin conflict\n",
- drive_regs[i / 8].reg, i % 8,
- drive_regs[j / 8].reg, j % 8);
+ drive_regs[i / 10].reg, i % 10,
+ drive_regs[j / 10].reg, j % 10);
}
}
}
With CONFIG_DEBUG_PINCTRL=y: r8a774c0_pfc: pin GP_4_3: SH_PFC_PIN_CFG_DRIVE_STRENGTH flag set but not in drive_regs r8a774c0_pfc: pin GP_4_4: SH_PFC_PIN_CFG_DRIVE_STRENGTH flag set but not in drive_regs ... r8a77990_pfc: pin GP_4_3: SH_PFC_PIN_CFG_DRIVE_STRENGTH flag set but not in drive_regs r8a77990_pfc: pin GP_4_4: SH_PFC_PIN_CFG_DRIVE_STRENGTH flag set but not in drive_regs This happens because the checker still uses the old number of fields. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- To be folded into commit d5c9688095d29a6c ("pinctrl: renesas: Allow up to 10 fields for drive_regs") in renesas-pinctrl-for-v5.19. Ideally, some iterator or index helper should be introduced. --- drivers/pinctrl/renesas/core.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)