pinctrl: sh-pfc: Retain TDSELCTRL register across suspend/resume
PATCH 1/1 pinctrl: sh-pfc: Retain TDSELCTRL register across suspend/resume
From: Marek Vasut <[email protected]>
The TDSELCTRL register is responsible for configuring the SDHI clock return path delay and may be adjusted by the bootloader. Retain the value across suspend/resume to prevent hardware instability after resume.
--- drivers/pinctrl/sh-pfc/core.c | 4 ++++ drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 10 ++++++++++ drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 10 ++++++++++ drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 11 +++++++++++ drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 10 ++++++++++ drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 9 +++++++++ drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 9 +++++++++ drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 11 +++++++++++ drivers/pinctrl/sh-pfc/sh_pfc.h | 5 +++++ 9 files changed, 79 insertions(+)
drivers/pinctrl/sh-pfc/core.c +4 -0
@@ -657,6 +657,10 @@ static unsigned int sh_pfc_walk_regs(struct sh_pfc *pfc,for (i =0 ; pfc->info->ioctrl_regs[i].reg; i++)do_reg (pfc, pfc->info->ioctrl_regs[i].reg, n++); +if (pfc->info->tdsel_regs) +for (i =0 ; pfc->info->tdsel_regs[i].reg; i++) +do_reg (pfc, pfc->info->tdsel_regs[i].reg, n++); +return n; }
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +10 -0
@@ -5570,6 +5570,15 @@ static int r8a7795es1_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin,return bit; } +enum tdsel_regs { +TDSELCTRL0 , +}; + +static const struct pinmux_tdsel_reg pinmux_tdsel_regs[] = { + [TDSELCTRL0 ] = {0xe60603c0 , }, + {/* sentinel */ }, +}; + static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { [ 0] = PIN_NUMBER('W', 3), /* QSPI0_SPCLK */
@@ -5877,6 +5886,7 @@ const struct sh_pfc_soc_info r8a7795es1_pinmux_info = { .drive_regs = pinmux_drive_regs, .bias_regs = pinmux_bias_regs, .ioctrl_regs = pinmux_ioctrl_regs, + .tdsel_regs = pinmux_tdsel_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data),
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +10 -0
@@ -5919,6 +5919,15 @@ static int r8a7795_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocreturn bit; } +enum tdsel_regs { +TDSELCTRL0 , +}; + +static const struct pinmux_tdsel_reg pinmux_tdsel_regs[] = { + [TDSELCTRL0 ] = {0xe60603c0 , }, + {/* sentinel */ }, +}; + static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { [ 0] = PIN_NUMBER('W', 3), /* QSPI0_SPCLK */
@@ -6240,6 +6249,7 @@ const struct sh_pfc_soc_info r8a7795_pinmux_info = { .drive_regs = pinmux_drive_regs, .bias_regs = pinmux_bias_regs, .ioctrl_regs = pinmux_ioctrl_regs, + .tdsel_regs = pinmux_tdsel_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data),
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +11 -0
@@ -5877,6 +5877,15 @@ static int r8a7796_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *pocreturn bit; } +enum tdsel_regs { +TDSELCTRL0 , +}; + +static const struct pinmux_tdsel_reg pinmux_tdsel_regs[] = { + [TDSELCTRL0 ] = {0xe60603c0 , }, + {/* sentinel */ }, +}; + static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { [ 0] = PIN_NUMBER('W', 3), /* QSPI0_SPCLK */
@@ -6185,6 +6194,7 @@ const struct sh_pfc_soc_info r8a774a1_pinmux_info = { .drive_regs = pinmux_drive_regs, .bias_regs = pinmux_bias_regs, .ioctrl_regs = pinmux_ioctrl_regs, + .tdsel_regs = pinmux_tdsel_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data),
@@ -6212,6 +6222,7 @@ const struct sh_pfc_soc_info r8a7796_pinmux_info = { .drive_regs = pinmux_drive_regs, .bias_regs = pinmux_bias_regs, .ioctrl_regs = pinmux_ioctrl_regs, + .tdsel_regs = pinmux_tdsel_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data),
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +10 -0
@@ -6034,6 +6034,15 @@ static int r8a77965_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *poreturn bit; } +enum tdsel_regs { +TDSELCTRL0 , +}; + +static const struct pinmux_tdsel_reg pinmux_tdsel_regs[] = { + [TDSELCTRL0 ] = {0xe60603c0 , }, + {/* sentinel */ }, +}; + static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { [ 0] = PIN_NUMBER('W', 3), /* QSPI0_SPCLK */
@@ -6341,6 +6350,7 @@ const struct sh_pfc_soc_info r8a77965_pinmux_info = { .drive_regs = pinmux_drive_regs, .bias_regs = pinmux_bias_regs, .ioctrl_regs = pinmux_ioctrl_regs, + .tdsel_regs = pinmux_tdsel_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data),
drivers/pinctrl/sh-pfc/pfc-r8a77970.c +9 -0
@@ -2438,6 +2438,15 @@ static int r8a77970_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin,return -EINVAL ; } +enum tdsel_regs { +TDSELCTRL0 , +}; + +static const struct pinmux_tdsel_reg pinmux_tdsel_regs[] = { + [TDSELCTRL0 ] = {0xe60603c0 , }, + {/* sentinel */ }, +}; +static const struct sh_pfc_soc_operations pinmux_ops = { .pin_to_pocctrl = r8a77970_pin_to_pocctrl, };
drivers/pinctrl/sh-pfc/pfc-r8a77980.c +9 -0
@@ -2867,6 +2867,15 @@ static int r8a77980_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin,return -EINVAL ; } +enum tdsel_regs { +TDSELCTRL0 , +}; + +static const struct pinmux_tdsel_reg pinmux_tdsel_regs[] = { + [TDSELCTRL0 ] = {0xe60603c0 , }, + {/* sentinel */ }, +}; +static const struct sh_pfc_soc_operations pinmux_ops = { .pin_to_pocctrl = r8a77980_pin_to_pocctrl, };
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +11 -0
@@ -5019,6 +5019,15 @@ static int r8a77990_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin,return bit; } +enum tdsel_regs { +TDSELCTRL0 , +}; + +static const struct pinmux_tdsel_reg pinmux_tdsel_regs[] = { + [TDSELCTRL0 ] = {0xe60603c0 , }, + {/* sentinel */ }, +}; + static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { [0] = RCAR_GP_PIN(2, 23), /* RD# */
@@ -5292,6 +5301,7 @@ const struct sh_pfc_soc_info r8a774c0_pinmux_info = { .cfg_regs = pinmux_config_regs, .bias_regs = pinmux_bias_regs, .ioctrl_regs = pinmux_ioctrl_regs, + .tdsel_regs = pinmux_tdsel_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data),
@@ -5318,6 +5328,7 @@ const struct sh_pfc_soc_info r8a77990_pinmux_info = { .cfg_regs = pinmux_config_regs, .bias_regs = pinmux_bias_regs, .ioctrl_regs = pinmux_ioctrl_regs, + .tdsel_regs = pinmux_tdsel_regs, .pinmux_data = pinmux_data, .pinmux_data_size = ARRAY_SIZE(pinmux_data),
drivers/pinctrl/sh-pfc/sh_pfc.h +5 -0
@@ -176,6 +176,10 @@ struct pinmux_ioctrl_reg {u32 reg; }; +struct pinmux_tdsel_reg { +u32 reg; +}; +struct pinmux_data_reg {u32 reg;u8 reg_width;
@@ -270,6 +274,7 @@ struct sh_pfc_soc_info {const struct pinmux_drive_reg *drive_regs;const struct pinmux_bias_reg *bias_regs;const struct pinmux_ioctrl_reg *ioctrl_regs; +const struct pinmux_tdsel_reg *tdsel_regs;const struct pinmux_data_reg *data_regs;const u16 *pinmux_data;
Signature · 1 line
2.19.2
Hi Marek,
Quoted 6 lines · On Sat, Feb 16, 2019 at 2:49 PM <[email protected]> wrote:
The TDSELCTRL register is responsible for configuring the SDHI clock return path delay and may be adjusted by the bootloader. Retain the value across suspend/resume to prevent hardware instability after resume.
Signed-off-by Marek Vasut <[email protected]>
Thanks for your patch!
Looks good to me. Two comments though.
R-Car D3 (r8a77995) also has a TDSEL register, but it is not handled by your patch. Adding that would mean s/SDHI/SDHI and MMC/.
Quoted 27 lines
drivers/pinctrl/sh-pfc/core.c +4
-0@@ -657,6 +657,10 @@ static unsigned int sh_pfc_walk_regs(struct sh_pfc *pfc,for (i =0 ; pfc->info->ioctrl_regs[i].reg; i++)do_reg (pfc, pfc->info->ioctrl_regs[i].reg, n++); +if (pfc->info->tdsel_regs) +for (i =0 ; pfc->info->tdsel_regs[i].reg; i++) +do_reg (pfc, pfc->info->tdsel_regs[i].reg, n++); +return n; }drivers/pinctrl/sh-pfc/sh_pfc.h +4
-0@@ -176,6 +176,10 @@ struct pinmux_ioctrl_reg {u32 reg; }; +struct pinmux_tdsel_reg { +u32 reg; +}; +struct pinmux_data_reg {u32 reg;u8 reg_width;
drivers/pinctrl/sh-pfc/sh_pfc.h struct sh_pfc_soc_info { · line 280
Quoted 7 lines
drivers/pinctrl/sh-pfc/sh_pfc.h +1
-0@@ -270,6 +274,7 @@ struct sh_pfc_soc_info {const struct pinmux_drive_reg *drive_regs;const struct pinmux_bias_reg *bias_regs;const struct pinmux_ioctrl_reg *ioctrl_regs; +const struct pinmux_tdsel_reg *tdsel_regs;const struct pinmux_data_reg *data_regs;const u16 *pinmux_data;
Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
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 Torvalds
Quoted 1 line · Geert Uytterhoeven
Hi Marek,
Hi,
Quoted 6 lines · On Sat, Feb 16, 2019 at 2:49 PM <[email protected]> wrote:
Quoted 5 lines
The TDSELCTRL register is responsible for configuring the SDHI clock return path delay and may be adjusted by the bootloader. Retain the value across suspend/resume to prevent hardware instability after resume.
Quoted 8 lines
Quoted 1 line
Signed-off-by Marek Vasut <[email protected]>Thanks for your patch!
Looks good to me. Two comments though.
R-Car D3 (r8a77995) also has a TDSEL register, but it is not handled by your patch. Adding that would mean s/SDHI/SDHI and MMC/.
Added
Quoted 33 lines
Quoted 33 lines
drivers/pinctrl/sh-pfc/core.c +4
-0@@ -657,6 +657,10 @@ static unsigned int sh_pfc_walk_regs(struct sh_pfc *pfc,for (i =0 ; pfc->info->ioctrl_regs[i].reg; i++)do_reg (pfc, pfc->info->ioctrl_regs[i].reg, n++); +if (pfc->info->tdsel_regs) +for (i =0 ; pfc->info->tdsel_regs[i].reg; i++) +do_reg (pfc, pfc->info->tdsel_regs[i].reg, n++); +return n; }drivers/pinctrl/sh-pfc/sh_pfc.h +5
-0@@ -176,6 +176,10 @@ struct pinmux_ioctrl_reg {u32 reg; }; +struct pinmux_tdsel_reg { +u32 reg; +}; +struct pinmux_data_reg {u32 reg;u8 reg_width;@@ -270,6 +274,7 @@ struct sh_pfc_soc_info {const struct pinmux_drive_reg *drive_regs;const struct pinmux_bias_reg *bias_regs;const struct pinmux_ioctrl_reg *ioctrl_regs; +const struct pinmux_tdsel_reg *tdsel_regs;const struct pinmux_data_reg *data_regs;
Quoted 6 lines
drivers/pinctrl/sh-pfc/sh_pfc.h struct sh_pfc_soc_info { · line 280
Quoted 1 line
drivers/pinctrl/sh-pfc/sh_pfc.h +0
-0const u16 *pinmux_data;Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
For one, It's unrelated register to POCCTRL, so I don't want to mix them together. The other reason is this r8a779*_pin_to_pocctrl(), which uses the ioctrl_regs[] array ; if I added the TDSEL there, that'd just make things extra confusing.
Signature · 2 lines
Best regards, Marek Vasut
Hi Marek,
Quoted 9 lines · Marek Vasut
Quoted 8 lines · Geert Uytterhoeven
Quoted 6 lines · On Sat, Feb 16, 2019 at 2:49 PM <[email protected]> wrote:
The TDSELCTRL register is responsible for configuring the SDHI clock return path delay and may be adjusted by the bootloader. Retain the value across suspend/resume to prevent hardware instability after resume.
Signed-off-by Marek Vasut <[email protected]>
Quoted 8 lines
Quoted 6 lines
Thanks for your patch!
Looks good to me. Two comments though.
R-Car D3 (r8a77995) also has a TDSEL register, but it is not handled by your patch. Adding that would mean s/SDHI/SDHI and MMC/.
Added
Thanks!
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
drivers/pinctrl/sh-pfc/core.c +4
-0@@ -657,6 +657,10 @@ static unsigned int sh_pfc_walk_regs(struct sh_pfc *pfc,for (i =0 ; pfc->info->ioctrl_regs[i].reg; i++)do_reg (pfc, pfc->info->ioctrl_regs[i].reg, n++); +if (pfc->info->tdsel_regs) +for (i =0 ; pfc->info->tdsel_regs[i].reg; i++) +do_reg (pfc, pfc->info->tdsel_regs[i].reg, n++); +return n; }drivers/pinctrl/sh-pfc/sh_pfc.h +5
-0@@ -176,6 +176,10 @@ struct pinmux_ioctrl_reg {u32 reg; }; +struct pinmux_tdsel_reg { +u32 reg; +}; +struct pinmux_data_reg {u32 reg;u8 reg_width;@@ -270,6 +274,7 @@ struct sh_pfc_soc_info {const struct pinmux_drive_reg *drive_regs;const struct pinmux_bias_reg *bias_regs;const struct pinmux_ioctrl_reg *ioctrl_regs; +const struct pinmux_tdsel_reg *tdsel_regs;const struct pinmux_data_reg *data_regs;
Quoted 8 lines
Quoted 6 lines
drivers/pinctrl/sh-pfc/sh_pfc.h struct sh_pfc_soc_info { · line 280
Quoted 1 line
drivers/pinctrl/sh-pfc/sh_pfc.h +0
-0const u16 *pinmux_data;Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
For one, It's unrelated register to POCCTRL, so I don't want to mix them
That's why the array is called pinmux_ioctrl_reg[], not pinmux_pocctrl_reg[]:
it is meant to cover various I/O control registers, including POCCTRL and TDSEL, to be saved/restored for PSCI system suspend.
Quoted 3 lines
together. The other reason is this r8a779*_pin_to_pocctrl(), which uses the ioctrl_regs[] array ; if I added the TDSEL there, that'd just make things extra confusing.
How r8a779*_pin_to_pocctrl() gets the registers is an implementation detail, IMHO (The function used to contain hardcoded register addresses).
So I think you should just add the TDSEL registers to pinmux_ioctrl_reg[].
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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 Torvalds
Quoted 1 line · Geert Uytterhoeven
Hi Marek,
Hi,
[...]
Quoted 17 lines
Quoted 17 lines
Quoted 16 lines
drivers/pinctrl/sh-pfc/sh_pfc.h struct sh_pfc_soc_info { · line 280
Quoted 11 lines
struct pinmux_data_reg { u32 reg; u8 reg_width;drivers/pinctrl/sh-pfc/sh_pfc.h +1
-0@@ -270,6 +274,7 @@ struct sh_pfc_soc_info {const struct pinmux_drive_reg *drive_regs;const struct pinmux_bias_reg *bias_regs;const struct pinmux_ioctrl_reg *ioctrl_regs; +const struct pinmux_tdsel_reg *tdsel_regs;const struct pinmux_data_reg *data_regs;const u16 *pinmux_data;Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
Quoted 5 lines
Quoted 1 line
For one, It's unrelated register to POCCTRL, so I don't want to mix them
That's why the array is called pinmux_ioctrl_reg[], not pinmux_pocctrl_reg[]:
it is meant to cover various I/O control registers, including POCCTRL and TDSEL, to be saved/restored for PSCI system suspend.
I thought the array is called pinmux_ioctrl_reg[] because that's what the pocctrl was called in older datasheets ? At least that's how you explained it on IRC last time.
Quoted 8 lines
Quoted 3 lines
together. The other reason is this r8a779*_pin_to_pocctrl(), which uses the ioctrl_regs[] array ; if I added the TDSEL there, that'd just make things extra confusing.
How r8a779*_pin_to_pocctrl() gets the registers is an implementation detail, IMHO (The function used to contain hardcoded register addresses).
So I think you should just add the TDSEL registers to pinmux_ioctrl_reg[].
If that's what you think is better and makes the driver less confusing, sure ...
Signature · 2 lines
Best regards, Marek Vasut
Hi Marek,
Quoted 20 lines · Marek Vasut
Quoted 19 lines · Geert Uytterhoeven
Quoted 18 lines
Quoted 10 lines
Quoted 10 lines
struct pinmux_data_reg { u32 reg; u8 reg_width;drivers/pinctrl/sh-pfc/sh_pfc.h +1
-0@@ -270,6 +274,7 @@ struct sh_pfc_soc_info {const struct pinmux_drive_reg *drive_regs;const struct pinmux_bias_reg *bias_regs;const struct pinmux_ioctrl_reg *ioctrl_regs; +const struct pinmux_tdsel_reg *tdsel_regs;const struct pinmux_data_reg *data_regs;Quoted 6 lines
drivers/pinctrl/sh-pfc/sh_pfc.h struct sh_pfc_soc_info { · line 280
Quoted 1 line
drivers/pinctrl/sh-pfc/sh_pfc.h +0
-0const u16 *pinmux_data;Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
For one, It's unrelated register to POCCTRL, so I don't want to mix them
Quoted 7 lines
Quoted 3 lines
That's why the array is called pinmux_ioctrl_reg[], not pinmux_pocctrl_reg[]:
it is meant to cover various I/O control registers, including POCCTRL and TDSEL, to be saved/restored for PSCI system suspend.I thought the array is called pinmux_ioctrl_reg[] because that's what the pocctrl was called in older datasheets ? At least that's how you explained it on IRC last time.
Ah, that's where the misunderstanding comes from: both POCCTRLx and TDSELy registers are sometimes called IOCTRLz registers.
Quoted 11 lines
Quoted 8 lines
Quoted 3 lines
together. The other reason is this r8a779*_pin_to_pocctrl(), which uses the ioctrl_regs[] array ; if I added the TDSEL there, that'd just make things extra confusing.
How r8a779*_pin_to_pocctrl() gets the registers is an implementation detail, IMHO (The function used to contain hardcoded register addresses).
So I think you should just add the TDSEL registers to pinmux_ioctrl_reg[].
If that's what you think is better and makes the driver less confusing, sure ...
Thanks!
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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 Torvalds
Quoted 1 line · Geert Uytterhoeven
Hi Marek,
Hi,
Quoted 31 lines · Marek Vasut
Quoted 30 lines · Geert Uytterhoeven
Quoted 29 lines · Marek Vasut
Quoted 27 lines · Geert Uytterhoeven
Quoted 17 lines
Quoted 17 lines
Quoted 16 lines
Review struct sh_pfc_soc_info { · line 280
Quoted 11 lines
struct pinmux_data_reg { u32 reg; u8 reg_width;(quoted diff) +1
-0@@ -270,6 +274,7 @@ struct sh_pfc_soc_info { const struct pinmux_drive_reg *drive_regs; const struct pinmux_bias_reg *bias_regs; const struct pinmux_ioctrl_reg *ioctrl_regs; + const struct pinmux_tdsel_reg *tdsel_regs; const struct pinmux_data_reg *data_regs; const u16 *pinmux_data;Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
Quoted 5 lines
Quoted 1 line
For one, It's unrelated register to POCCTRL, so I don't want to mix them
That's why the array is called pinmux_ioctrl_reg[], not pinmux_pocctrl_reg[]:
it is meant to cover various I/O control registers, including POCCTRL and TDSEL, to be saved/restored for PSCI system suspend.I thought the array is called pinmux_ioctrl_reg[] because that's what the pocctrl was called in older datasheets ? At least that's how you explained it on IRC last time.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Ah, that's where the misunderstanding comes from: both POCCTRLx and TDSELy registers are sometimes called IOCTRLz registers.
Then shouldn't we rename IOCTRL30 to POCCTRL first, and then add TDSEL into the list ?
Sure. I've already done so, but haven't sent out the patches yet.
Then we'll have a conflict once I add the TDSEL. I can either cook similar patch and send two patches or you send yours and I'll send this one later. I'd prefer the former to make conflict resolution easier .
Signature · 2 lines
Best regards, Marek Vasut
Hi Marek,
Quoted 30 lines · Marek Vasut
Quoted 29 lines · Geert Uytterhoeven
Quoted 27 lines · Marek Vasut
Quoted 17 lines · Geert Uytterhoeven
Quoted 17 lines
Quoted 16 lines
Review struct sh_pfc_soc_info { · line 280
Quoted 11 lines
struct pinmux_data_reg { u32 reg; u8 reg_width;(quoted diff) +1
-0@@ -270,6 +274,7 @@ struct sh_pfc_soc_info { const struct pinmux_drive_reg *drive_regs; const struct pinmux_bias_reg *bias_regs; const struct pinmux_ioctrl_reg *ioctrl_regs; + const struct pinmux_tdsel_reg *tdsel_regs; const struct pinmux_data_reg *data_regs; const u16 *pinmux_data;Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
Quoted 5 lines
Quoted 1 line
For one, It's unrelated register to POCCTRL, so I don't want to mix them
That's why the array is called pinmux_ioctrl_reg[], not pinmux_pocctrl_reg[]:
it is meant to cover various I/O control registers, including POCCTRL and TDSEL, to be saved/restored for PSCI system suspend.I thought the array is called pinmux_ioctrl_reg[] because that's what the pocctrl was called in older datasheets ? At least that's how you explained it on IRC last time.
Quoted 6 lines
Quoted 3 lines
Ah, that's where the misunderstanding comes from: both POCCTRLx and TDSELy registers are sometimes called IOCTRLz registers.
Then shouldn't we rename IOCTRL30 to POCCTRL first, and then add TDSEL into the list ?
Sure. I've already done so, but haven't sent out the patches yet.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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 Torvalds
Quoted 1 line · Geert Uytterhoeven
Hi Marek,
Hi,
Quoted 25 lines · Marek Vasut
Quoted 24 lines · Geert Uytterhoeven
Quoted 22 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
struct pinmux_data_reg { u32 reg; u8 reg_width;drivers/pinctrl/sh-pfc/sh_pfc.h +1
-0@@ -270,6 +274,7 @@ struct sh_pfc_soc_info {const struct pinmux_drive_reg *drive_regs;const struct pinmux_bias_reg *bias_regs;const struct pinmux_ioctrl_reg *ioctrl_regs; +const struct pinmux_tdsel_reg *tdsel_regs;const struct pinmux_data_reg *data_regs;Quoted 8 lines
Quoted 6 lines
drivers/pinctrl/sh-pfc/sh_pfc.h struct sh_pfc_soc_info { · line 280
Quoted 1 line
drivers/pinctrl/sh-pfc/sh_pfc.h +0
-0const u16 *pinmux_data;Is there any special reason why you added a new block of registers with separate handling, instead of adding TDSEL to the existing pinmux_ioctrl_reg[] arrays, which list other IOCTRL registers like POCCTRL?
For one, It's unrelated register to POCCTRL, so I don't want to mix them
That's why the array is called pinmux_ioctrl_reg[], not pinmux_pocctrl_reg[]:
it is meant to cover various I/O control registers, including POCCTRL and TDSEL, to be saved/restored for PSCI system suspend.
Quoted 7 lines
Quoted 3 lines
I thought the array is called pinmux_ioctrl_reg[] because that's what the pocctrl was called in older datasheets ? At least that's how you explained it on IRC last time.
Ah, that's where the misunderstanding comes from: both POCCTRLx and TDSELy registers are sometimes called IOCTRLz registers.
Then shouldn't we rename IOCTRL30 to POCCTRL first, and then add TDSEL into the list ?
Signature · 2 lines
Best regards, Marek Vasut