Fast forward sh-pfc
v2 cover Fast forward sh-pfc
Dear All,
v1 had build time issues on ARM with shmobile_defconfig, this series includes the patches to fix those issues (and some cosmetic improvements while at it).
The troublesome SoC specific pinctrl drivers are not related to the SoCs looked after by CIP, therefore we would not be testing those fixes on real HW.
I am not sure this series is worth applying due to the amount of untested changes, and yet on the other hand it would facilitate future development. I would like to hear your thoughts about this, Pavel? Chris? Biju? Ben?
v1->v2:
* add "pinctrl: sh-pfc: sh73a0: Use new macros for non-GPIO pins"
* add "pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group"
* add "pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups"
* add "pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group"
* add "pinctrl: sh-pfc: r8a7791: Fix VIN1 versioned groups"
* add "pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group"
* add "pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group"
* add "pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group"
* add "pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group"
* add "pinctrl: sh-pfc: r8a77995: Remove unused PINMUX_IPSR_{MSEL2,PHYS}()"
Thanks,
Fab
Fabrizio Castro (2):
pinctrl: sh-pfc: r8a7796: Move CANFD pin groups and functions
pinctrl: sh-pfc: r8a77990: Move CANFD pin groups and functions
Geert Uytterhoeven (36):
pinctrl: sh-pfc: Print actual field width for variable-width fields
pinctrl: sh-pfc: Validate pinmux tables at runtime when debugging
pinctrl: sh-pfc: Validate pins/marks in pin groups at build time
pinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length
pinctrl: sh-pfc: Validate fixed-size field widths at build time
pinctrl: sh-pfc: Absorb enum IDs in PINMUX_CFG_REG() macro
pinctrl: sh-pfc: Absorb enum IDs in PINMUX_CFG_REG_VAR() macro
pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro
pinctrl: sh-pfc: Validate enum IDs for regs with fixed-width fields
pinctrl: sh-pfc: Validate enum IDs for regs with variable-width fields
pinctrl: sh-pfc: Improve PINMUX_IPSR_PHYS() documentation
pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant
pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand
pinctrl: sh-pfc: Add new non-GPIO helper macros
pinctrl: sh-pfc: Correct printk level of group reference warning
pinctrl: sh-pfc: Mark run-time debug code __init
pinctrl: sh-pfc: Add check for empty pinmux groups/functions
pinctrl: sh-pfc: Validate pin tables at runtime
pinctrl: sh-pfc: r8a7796: Deduplicate VIN5 pin definitions
pinctrl: sh-pfc: r8a77990: Rename IOCTRLx registers
pinctrl: sh-pfc: Add missing #include <linux/errno.h>
pinctrl: sh-pfc: Add PORT_GP_27 helper macro
pinctrl: sh-pfc: Move PIN_NONE to shared header file
pinctrl: sh-pfc: r8a77990: Use new macros for non-GPIO pins
pinctrl: sh-pfc: r8a7796: Add TPU pins, groups and functions
pinctrl: sh-pfc: r8a7796: Use new macros for non-GPIO pins
pinctrl: sh-pfc: r8a77995: Remove unused PINMUX_IPSR_{MSEL2,PHYS}()
pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii
group
pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1
group
pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b
group
pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
pinctrl: sh-pfc: r8a7791: Fix VIN1 versioned groups
pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group
pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups
pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
pinctrl: sh-pfc: sh73a0: Use new macros for non-GPIO pins
Jacopo Mondi (1):
pinctrl: sh-pfc: r8a7796: Fix VIN versioned groups
Marek Vasut (1):
pinctrl: sh-pfc: rcar-gen3: Retain TDSELCTRL register across
suspend/resume
Takeshi Kihara (9):
pinctrl: sh-pfc: r8a7796: Add I2C{0,3,5} pins, groups and functions
pinctrl: sh-pfc: rcar-gen3: Remove HDMI CEC pins, groups, and
functions
pinctrl: sh-pfc: rcar-gen3: Remove CC5_OSCOUT pin
pinctrl: sh-pfc: rcar-gen3: Rename SEL_ADG_{A,B,C} to SEL_ADG{A,B,C}
pinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 bit16 when using NFALE and
NFRB_N
pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit31 when using SIM0_D
pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit30 when using SSI_SCK2 and
SSI_WS2
pinctrl: sh-pfc: rcar-gen3: Rename RTS{0,1,3,4}# pin function
definitions
pinctrl: sh-pfc: rcar-gen3: Rename SEL_NDFC to SEL_NDF
Ulrich Hecht (2):
pinctrl: sh-pfc: Add physical pin multiplexing helper macros
pinctrl: sh-pfc: r8a7796: Remove placeholder I2C pin data
drivers/pinctrl/sh-pfc/core.c | 172 ++++++- drivers/pinctrl/sh-pfc/pfc-emev2.c | 67 +-- drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 66 +-- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 61 +-- drivers/pinctrl/sh-pfc/pfc-r8a77470.c | 138 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 179 ++++--- drivers/pinctrl/sh-pfc/pfc-r8a7779.c | 119 +++-- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 134 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 234 +++++---- drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 136 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 129 +++-- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 239 ++++----- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 266 +++++----- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 837 ++++++++++++++++--------------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 254 +++++----- drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 73 +-- drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 81 +-- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 395 +++++++-------- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 106 ++-- drivers/pinctrl/sh-pfc/pfc-sh7203.c | 152 +++--- drivers/pinctrl/sh-pfc/pfc-sh7264.c | 232 ++++----- drivers/pinctrl/sh-pfc/pfc-sh7269.c | 252 +++++----- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 75 +-- drivers/pinctrl/sh-pfc/pfc-sh7720.c | 144 +++--- drivers/pinctrl/sh-pfc/pfc-sh7722.c | 220 ++++---- drivers/pinctrl/sh-pfc/pfc-sh7723.c | 200 ++++---- drivers/pinctrl/sh-pfc/pfc-sh7724.c | 204 ++++---- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 142 +++--- drivers/pinctrl/sh-pfc/pfc-sh7757.c | 244 ++++----- drivers/pinctrl/sh-pfc/pfc-sh7785.c | 136 ++--- drivers/pinctrl/sh-pfc/pfc-sh7786.c | 80 +-- drivers/pinctrl/sh-pfc/pfc-shx3.c | 32 +- drivers/pinctrl/sh-pfc/pinctrl.c | 3 +- drivers/pinctrl/sh-pfc/sh_pfc.h | 163 ++++-- 34 files changed, 3187 insertions(+), 2778 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/51 pinctrl: sh-pfc: Print actual field width for variable-width fields
From: Geert Uytterhoeven <[email protected]>
commit ce16e8dd0db2701265e6dfdb4fbed632b6ff61c2 upstream.
The debug code in sh_pfc_write_config_reg() prints the width of the field being modified.
However, registers with a variable-width field layout are identified by pinmux_cfg_reg.field_width being zero, hence zeroes are printed instead of the actual field widths.
Fix this by printing the Hamming weight of the field mask instead, which is correct for both fixed-width and variable-width fields.
--- drivers/pinctrl/sh-pfc/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/core.c +1 -1
@@ -224,7 +224,7 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc,dev_dbg (pfc->dev,"write_reg addr = %x, value = 0x%x, field = %u, " "r_width = %u, f_width = %u\n" , - crp->reg, value, field, crp->reg_width, crp->field_width); + crp->reg, value, field, crp->reg_width,hweight32 (mask)); mask = ~(mask << pos); value = value << pos;
Signature · 1 line
2.7.4
PATCH v2 2/51 pinctrl: sh-pfc: Validate pinmux tables at runtime when debugging
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 6161b39a14380815f22851c753c00acf81cfa62a upstream.
Perform some basic sanity checks on all built-in pinmux tables when DEBUG is defined, to help catching bugs early.
For now the following checks are included:
- Check register and field widths in descriptors for config registers with variable-width fields,
- Check relations between pin groups and functions:
- All pin functions must refer to existing pin groups,
- All pin groups must be referred to by a pin function,
- Warn if a pin group is referred to by multiple pin functions (which is OK for backwards-compatibility aliases),
- Provide suggestions for reducing table sizes: reserved fields of more than 3 bits can better be split in smaller subfields, as the storage need is proportional to the square of the width of the (sub)field,
Note that a dummy non-matching entry is added to the DT match table for checking r8a7795es1_pinmux_info, as R-Car H3 ES1.0 is matched using soc_device_match() in r8a7795_pinmux_init(), instead of by the DT match table.
--- drivers/pinctrl/sh-pfc/core.c | 124 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+)
drivers/pinctrl/sh-pfc/core.c +124 -0
@@ -568,6 +568,13 @@ static const struct of_device_id sh_pfc_of_table[] = { .compatible = "renesas,pfc-r8a7795", .data = &r8a7795_pinmux_info, }, +#ifdef DEBUG + { + /* For sanity checks only (nothing matches against this) */ + .compatible = "renesas,pfc-r8a77950", /* R-Car H3 ES1.0 */ + .data = &r8a7795es1_pinmux_info, + }, +#endif /* DEBUG */ #endif #ifdef CONFIG_PINCTRL_PFC_R8A7796 {
@@ -706,6 +713,122 @@ static int sh_pfc_suspend_init(struct sh_pfc *pfc) { return 0; }#define DEV_PM_OPS NULL#endif /* CONFIG_PM_SLEEP && CONFIG_ARM_PSCI_FW */ +#ifdef DEBUG +static bool is0s (const u16 *enum_ids,unsigned int n) +{ +unsigned int i; + +for (i =0 ; i < n; i++) +if (enum_ids[i]) +return false; + +return true; +} + +static unsigned int sh_pfc_errors; +static unsigned int sh_pfc_warnings; + +static void sh_pfc_check_cfg_reg (const char *drvname, +const struct pinmux_cfg_reg *cfg_reg) +{ +unsigned int i, n, rw, fw; + +if (cfg_reg->field_width) { +/* Checked at build time */ +return ; + } + +for (i =0 , n =0 , rw =0 ; (fw = cfg_reg->var_field_width[i]); i++) { +if (fw >3 &&is0s (&cfg_reg->enum_ids[n],1 << fw)) { +pr_warn ("%s: reg 0x%x: reserved field [%u:%u] can be split to reduce table size\n" , + drvname, cfg_reg->reg, rw, rw + fw -1 ); + sh_pfc_warnings++; + } + n +=1 << fw; + rw += fw; + } + +if (rw != cfg_reg->reg_width) { +pr_err ("%s: reg 0x%x: var_field_width declares %u instead of %u bits\n" , + drvname, cfg_reg->reg, rw, cfg_reg->reg_width); + sh_pfc_errors++; + } +} + +static void sh_pfc_check_info (const struct sh_pfc_soc_info *info) +{ +const struct sh_pfc_function *func; +const char *drvname = info->name; +unsigned int *refcnts; +unsigned int i, j, k; + +pr_info ("Checking %s\n" , drvname); + +/* Check groups and functions */ + refcnts =kcalloc (info->nr_groups,sizeof (*refcnts),GFP_KERNEL ); +if (!refcnts) +return ; + +for (i =0 ; i < info->nr_functions; i++) { + func = &info->functions[i]; +for (j =0 ; j < func->nr_groups; j++) { +for (k =0 ; k < info->nr_groups; k++) { +if (!strcmp (func->groups[j], + info->groups[k].name)) { + refcnts[k]++; +break ; + } + } + +if (k == info->nr_groups) { +pr_err ("%s: function %s: group %s not found\n" , + drvname, func->name, func->groups[j]); + sh_pfc_errors++; + } + } + } + +for (i =0 ; i < info->nr_groups; i++) { +if (!refcnts[i]) { +pr_err ("%s: orphan group %s\n" , drvname, + info->groups[i].name); + sh_pfc_errors++; + }else if (refcnts[i] >1 ) { +pr_err ("%s: group %s referred by %u functions\n" , + drvname, info->groups[i].name, refcnts[i]); + sh_pfc_warnings++; + } + } + +kfree (refcnts); + +/* Check config register descriptions */ +for (i =0 ; info->cfg_regs && info->cfg_regs[i].reg; i++) +sh_pfc_check_cfg_reg (drvname, &info->cfg_regs[i]); +} + +static void sh_pfc_check_driver (const struct platform_driver *pdrv) +{ +unsigned int i; + +pr_warn ("Checking builtin pinmux tables\n" ); + +for (i =0 ; pdrv->id_table[i].name[0 ]; i++) +sh_pfc_check_info ((void *)pdrv->id_table[i].driver_data); + +#ifdef CONFIG_OF +for (i =0 ; pdrv->driver.of_match_table[i].compatible[0 ]; i++) +sh_pfc_check_info (pdrv->driver.of_match_table[i].data); +#endif + +pr_warn ("Detected %u errors and %u warnings\n" , sh_pfc_errors, + sh_pfc_warnings); +} + +#else /* !DEBUG */ +static inline void sh_pfc_check_driver (struct platform_driver *pdrv) {} +#endif /* !DEBUG */ +static int sh_pfc_probe (struct platform_device *pdev) {#ifdef CONFIG_OF
@@ -837,6 +960,7 @@ static struct platform_driver sh_pfc_driver = {static int __init sh_pfc_init (void ) { +sh_pfc_check_driver (&sh_pfc_driver);return platform_driver_register (&sh_pfc_driver); }postcore_initcall (sh_pfc_init);
Signature · 1 line
2.7.4
PATCH v2 3/51 pinctrl: sh-pfc: Add physical pin multiplexing helper macros
In reply to Fabrizio CastroFrom: Ulrich Hecht <[email protected]>
commit 50d1ba1764b3e00ae8c331202d50c5535d6b3361 upstream.
Used by I2C controllers 0, 3 and 5 in R8A7795 and R8A7796 SoCs.
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/pinctrl/sh-pfc/sh_pfc.h +22 -0
@@ -389,6 +389,28 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; PINMUX_DATA(fn##_MARK, FN_##msel, FN_##fn, FN_##ipsr)/* +* Describe a pinmux configuration similar to PINMUX_IPSR_MSEL, but with +* an additional select register that controls physical multiplexing +* with another pin. +* - ipsr: IPSR field +* - fn: Function name, also referring to the IPSR field +* - psel: Physical multiplexing selector +* - msel: Module selector +*/ +#define PINMUX_IPSR_PHYS_MSEL (ipsr, fn, psel, msel) \ + PINMUX_DATA(fn##_MARK, FN_##psel, FN_##msel, FN_##fn, FN_##ipsr) + +/* +* Describe a pinmux configuration in which a pin is physically multiplexed +* with other pins. +* - ipsr: IPSR field +* - fn: Function name, also referring to the IPSR field +* - psel: Physical multiplexing selector +*/ +#define PINMUX_IPSR_PHYS (ipsr, fn, psel) \ + PINMUX_DATA(fn##_MARK, FN_##psel) + +/* * Describe a pinmux configuration for a single-function pin with GPIO * capability. * - fn: Function name
Signature · 1 line
2.7.4
PATCH v2 4/51 pinctrl: sh-pfc: Validate pins/marks in pin groups at build time
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 9925e879572680125c5d00ad8b807aec720b1cb6 upstream.
Add a build-time check, to ensure the number of pins and pin marks in a pin group matches. This helps catching bugs early.
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/sh_pfc.h +2 -1
@@ -44,7 +44,8 @@ struct sh_pfc_pin { .name = #alias, \ .pins = n##_pins, \ .mux = n##_mux, \ - .nr_pins = ARRAY_SIZE(n##_pins), \ + .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)
Signature · 1 line
2.7.4
PATCH v2 5/51 pinctrl: sh-pfc: Make pinmux_cfg_reg.var_field_width[] variable-length
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit f83f97684a737f66c9a10437544c92e3436ca4e0 upstream.
pinmux_cfg_reg.var_field_width[] is actually a variable-length array, terminated by a zero, and counting at most r_width entries. Usually the number of entries is much smaller than r_width, so the ability to catch bugs at compile time through an "excess elements in array initializer" warning is fairly limited.
Hence make the array variable-length, decreasing kernel size slightly.
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/sh_pfc.h +1 -2
@@ -145,8 +145,7 @@ struct pinmux_cfg_reg {*/ #define PINMUX_CFG_REG_VAR(name, r, r_width, var_fw0, var_fwn...) \ .reg = r, .reg_width = r_width, \ - .var_field_width = (const u8 [r_width]) \ - { var_fw0, var_fwn, 0 }, \ + .var_field_width = (const u8 []) { var_fw0, var_fwn, 0 }, \ .enum_ids = (const u16 [])struct pinmux_drive_reg_field {
Signature · 1 line
2.7.4
PATCH v2 6/51 pinctrl: sh-pfc: Validate fixed-size field widths at build time
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 5e8588c86d71e78de9e97103324d9127063f18d0 upstream.
Add a build-time check, to ensure the register and field widths in descriptors for config registers with fixed-width fields are sane. This helps catching bugs early.
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/sh_pfc.h +2 -1
@@ -129,7 +129,8 @@ struct pinmux_cfg_reg {* one for each possible combination of the register field bit values. */ #define PINMUX_CFG_REG (name, r, r_width, f_width) \ - .reg = r, .reg_width = r_width, .field_width = f_width, \ + .reg = r, .reg_width = r_width, \ + .field_width = f_width + BUILD_BUG_ON_ZERO(r_width % f_width), \ .enum_ids = (const u16 [(r_width / f_width) * (1 << f_width)])/*
Signature · 1 line
2.7.4
PATCH v2 7/51 pinctrl: sh-pfc: Absorb enum IDs in PINMUX_CFG_REG() macro
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit efca8da0c5fcc7f5617bab769faa595f7efdc593 upstream.
Currently the PINMUX_CFG_REG() macro must be followed by initialization data, specifying all enum IDs. Hence the macro itself does not know anything about the enum IDs, preventing the macro from performing any validation on it.
Make the macro accept the enum IDs as a parameter, and update all users. Note that array data enclosed by curly braces cannot be passed to a macro as a parameter, hence the enum IDs are wrapped using a new macro GROUPS().
No functional changes.
--- drivers/pinctrl/sh-pfc/pfc-emev2.c | 20 +-- drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 20 +-- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 16 +-- drivers/pinctrl/sh-pfc/pfc-r8a77470.c | 24 ++-- drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 20 +-- drivers/pinctrl/sh-pfc/pfc-r8a7779.c | 28 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 24 ++-- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 32 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 48 ++++---- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 28 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 104 ++++++++-------- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 108 ++++++++-------- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 108 ++++++++-------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 108 ++++++++-------- drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 60 ++++----- drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 68 +++++------ drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 92 +++++++------- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 84 ++++++------- drivers/pinctrl/sh-pfc/pfc-sh7203.c | 124 +++++++++---------- drivers/pinctrl/sh-pfc/pfc-sh7264.c | 184 ++++++++++++++-------------- drivers/pinctrl/sh-pfc/pfc-sh7269.c | 204 +++++++++++++++---------------- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 12 +- drivers/pinctrl/sh-pfc/pfc-sh7720.c | 72 +++++------ drivers/pinctrl/sh-pfc/pfc-sh7722.c | 128 +++++++++---------- drivers/pinctrl/sh-pfc/pfc-sh7723.c | 108 ++++++++-------- drivers/pinctrl/sh-pfc/pfc-sh7724.c | 112 ++++++++--------- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 43 ++++--- drivers/pinctrl/sh-pfc/pfc-sh7757.c | 140 ++++++++++----------- drivers/pinctrl/sh-pfc/pfc-sh7785.c | 72 +++++------ drivers/pinctrl/sh-pfc/pfc-sh7786.c | 44 +++---- drivers/pinctrl/sh-pfc/pfc-shx3.c | 16 +-- drivers/pinctrl/sh-pfc/sh_pfc.h | 14 ++- 32 files changed, 1137 insertions(+), 1128 deletions(-)
drivers/pinctrl/sh-pfc/pfc-emev2.c +10 -10
@@ -1416,7 +1416,7 @@ static const struct sh_pfc_function pinmux_functions[] = { };static const struct pinmux_cfg_reg pinmux_config_regs[] = { - { PINMUX_CFG_REG("GPSR0", 0xe0140200, 32, 1) { + { PINMUX_CFG_REG("GPSR0", 0xe0140200, 32, 1, GROUP( 0, PORT31_FN, /* PIN: J18 */ 0, PORT30_FN, /* PIN: H18 */ 0, PORT29_FN, /* PIN: G18 */
@@ -1449,9 +1449,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_JT_SEL ,PORT2_FN ,/* PIN: V9 */ 0 ,PORT1_FN ,/* PIN: U10 */ 0 ,PORT0_FN ,/* PIN: V10 */ - } + )) }, - { PINMUX_CFG_REG("GPSR1", 0xe0140204, 32, 1) { + { PINMUX_CFG_REG("GPSR1", 0xe0140204, 32, 1, GROUP( FN_SDI1_CMD, PORT63_FN, /* PIN: AC21 */ FN_SDI1_CKI, PORT62_FN, /* PIN: AA23 */ FN_SDI1_CKO, PORT61_FN, /* PIN: AB22 */
@@ -1484,9 +1484,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_LCD3_R2 ,PORT34_FN ,/* PIN: A19 */ FN_LCD3_R1 ,PORT33_FN ,/* PIN: B20 */ FN_LCD3_R0 ,PORT32_FN ,/* PIN: A20 */ - } + )) }, - { PINMUX_CFG_REG("GPSR2", 0xe0140208, 32, 1) { + { PINMUX_CFG_REG("GPSR2", 0xe0140208, 32, 1, GROUP( FN_AB_1_0_PORT95, PORT95_FN, /* PIN: L21 */ FN_AB_1_0_PORT94, PORT94_FN, /* PIN: K21 */ FN_AB_1_0_PORT93, PORT93_FN, /* PIN: J21 */
@@ -1519,9 +1519,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_SDI1_DATA2 ,PORT66_FN ,/* PIN: AB19 */ FN_SDI1_DATA1 ,PORT65_FN ,/* PIN: AB20 */ FN_SDI1_DATA0 ,PORT64_FN ,/* PIN: AB21 */ - } + )) }, - { PINMUX_CFG_REG("GPSR3", 0xe014020c, 32, 1) { + { PINMUX_CFG_REG("GPSR3", 0xe014020c, 32, 1, GROUP( FN_NTSC_DATA4, PORT127_FN, /* PIN: T20 */ FN_NTSC_DATA3, PORT126_FN, /* PIN: R18 */ FN_NTSC_DATA2, PORT125_FN, /* PIN: R20 */
@@ -1554,9 +1554,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_AB_9_8_PORT98 ,PORT98_FN ,/* PIN: M20 */ FN_AB_9_8_PORT97 ,PORT97_FN ,/* PIN: N21 */ FN_AB_A20 ,PORT96_FN ,/* PIN: M21 */ - } + )) }, - { PINMUX_CFG_REG("GPSR4", 0xe0140210, 32, 1) { + { PINMUX_CFG_REG("GPSR4", 0xe0140210, 32, 1, GROUP( 0, 0, FN_UART_1_0_PORT158, PORT158_FN, /* PIN: AB10 */ FN_UART_1_0_PORT157, PORT157_FN, /* PIN: AA10 */
@@ -1589,7 +1589,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_NTSC_DATA7 ,PORT130_FN ,/* PIN: U18 */ FN_NTSC_DATA6 ,PORT129_FN ,/* PIN: U20 */ FN_NTSC_DATA5 ,PORT128_FN ,/* PIN: T18 */ - } + )) }, { PINMUX_CFG_REG_VAR("CHG_PINSEL_LCD3", 0xe0140284, 32, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
drivers/pinctrl/sh-pfc/pfc-r8a73a4.c +10 -10
@@ -2297,7 +2297,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { PORTCR(328, 0xe6053148), PORTCR(329, 0xe6053149), - { PINMUX_CFG_REG("MSEL1CR", 0xe605800c, 32, 1) { + { PINMUX_CFG_REG("MSEL1CR", 0xe605800c, 32, 1, GROUP( MSEL1CR_31_0, MSEL1CR_31_1, 0, 0, 0, 0,
@@ -2330,9 +2330,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {MSEL1CR_02_0 ,MSEL1CR_02_1 ,MSEL1CR_01_0 ,MSEL1CR_01_1 ,MSEL1CR_00_0 ,MSEL1CR_00_1 , - } + )) }, - { PINMUX_CFG_REG("MSEL3CR", 0xe6058020, 32, 1) { + { PINMUX_CFG_REG("MSEL3CR", 0xe6058020, 32, 1, GROUP( MSEL3CR_31_0, MSEL3CR_31_1, 0, 0, 0, 0,
@@ -2365,9 +2365,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,MSEL3CR_01_0 ,MSEL3CR_01_1 ,MSEL3CR_00_0 ,MSEL3CR_00_1 , - } + )) }, - { PINMUX_CFG_REG("MSEL4CR", 0xe6058024, 32, 1) { + { PINMUX_CFG_REG("MSEL4CR", 0xe6058024, 32, 1, GROUP( 0, 0, MSEL4CR_30_0, MSEL4CR_30_1, MSEL4CR_29_0, MSEL4CR_29_1,
@@ -2400,9 +2400,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,MSEL4CR_01_0 ,MSEL4CR_01_1 ,0 ,0 , - } + )) }, - { PINMUX_CFG_REG("MSEL5CR", 0xe6058028, 32, 1) { + { PINMUX_CFG_REG("MSEL5CR", 0xe6058028, 32, 1, GROUP( MSEL5CR_31_0, MSEL5CR_31_1, MSEL5CR_30_0, MSEL5CR_30_1, MSEL5CR_29_0, MSEL5CR_29_1,
@@ -2435,9 +2435,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,0 ,0 ,0 ,0 , - } + )) }, - { PINMUX_CFG_REG("MSEL8CR", 0xe6058034, 32, 1) { + { PINMUX_CFG_REG("MSEL8CR", 0xe6058034, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -2470,7 +2470,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { 0, 0, MSEL8CR_01_0, MSEL8CR_01_1, MSEL8CR_00_0, MSEL8CR_00_1, - } + )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +8 -8
@@ -3448,7 +3448,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { PORTCR(210, 0xe60530d2), /* PORT210CR */ PORTCR(211, 0xe60530d3), /* PORT211CR */ - { PINMUX_CFG_REG("MSEL1CR", 0xe605800c, 32, 1) { + { PINMUX_CFG_REG("MSEL1CR", 0xe605800c, 32, 1, GROUP( MSEL1CR_31_0, MSEL1CR_31_1, MSEL1CR_30_0, MSEL1CR_30_1, MSEL1CR_29_0, MSEL1CR_29_1,
@@ -3473,9 +3473,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {MSEL1CR_2_0 ,MSEL1CR_2_1 ,0 ,0 ,MSEL1CR_0_0 ,MSEL1CR_0_1 , - } + )) }, - { PINMUX_CFG_REG("MSEL3CR", 0xE6058020, 32, 1) { + { PINMUX_CFG_REG("MSEL3CR", 0xE6058020, 32, 1, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3486,9 +3486,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {MSEL3CR_6_0 ,MSEL3CR_6_1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , - } + )) }, - { PINMUX_CFG_REG("MSEL4CR", 0xE6058024, 32, 1) { + { PINMUX_CFG_REG("MSEL4CR", 0xE6058024, 32, 1, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3505,9 +3505,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,0 ,0 ,MSEL4CR_1_0 ,MSEL4CR_1_1 ,0 ,0 , - } + )) }, - { PINMUX_CFG_REG("MSEL5CR", 0xE6058028, 32, 1) { + { PINMUX_CFG_REG("MSEL5CR", 0xE6058028, 32, 1, GROUP( MSEL5CR_31_0, MSEL5CR_31_1, MSEL5CR_30_0, MSEL5CR_30_1, MSEL5CR_29_0, MSEL5CR_29_1,
@@ -3540,7 +3540,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MSEL5CR_2_0, MSEL5CR_2_1, 0, 0, MSEL5CR_0_0, MSEL5CR_0_1, - } + )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a77470.c +12 -12
@@ -1482,7 +1482,7 @@ static const struct sh_pfc_function pinmux_functions[] = { };static const struct pinmux_cfg_reg pinmux_config_regs[] = { - { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1) { + { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -1514,9 +1514,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_0_3_FN ,FN_USB1_OVC ,GP_0_2_FN ,FN_USB1_PWEN ,GP_0_1_FN ,FN_USB0_OVC , - GP_0_0_FN, FN_USB0_PWEN, } + GP_0_0_FN, FN_USB0_PWEN, )) }, - { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1) { + { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -1548,9 +1548,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_1_3_FN ,FN_IP1_23_20 ,GP_1_2_FN ,FN_IP1_19_16 ,GP_1_1_FN ,FN_IP1_15_12 , - GP_1_0_FN, FN_IP1_11_8, } + GP_1_0_FN, FN_IP1_11_8, )) }, - { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1) { + { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1, GROUP( GP_2_31_FN, FN_IP8_3_0, GP_2_30_FN, FN_IP7_31_28, GP_2_29_FN, FN_IP7_27_24,
@@ -1582,9 +1582,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_2_3_FN ,FN_IP4_19_16 ,GP_2_2_FN ,FN_IP4_15_12 ,GP_2_1_FN ,FN_IP4_11_8 , - GP_2_0_FN, FN_IP4_7_4, } + GP_2_0_FN, FN_IP4_7_4, )) }, - { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1) { + { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1, GROUP( 0, 0, 0, 0, GP_3_29_FN, FN_IP10_19_16,
@@ -1616,9 +1616,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_3_3_FN ,FN_IP8_19_16 ,GP_3_2_FN ,FN_IP8_15_12 ,GP_3_1_FN ,FN_IP8_11_8 , - GP_3_0_FN, FN_IP8_7_4, } + GP_3_0_FN, FN_IP8_7_4, )) }, - { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1) { + { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -1650,9 +1650,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_4_3_FN ,FN_IP11_3_0 ,GP_4_2_FN ,FN_IP10_31_28 ,GP_4_1_FN ,FN_IP10_27_24 , - GP_4_0_FN, FN_IP10_23_20, } + GP_4_0_FN, FN_IP10_23_20, )) }, - { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1) { + { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1, GROUP( GP_5_31_FN, FN_IP17_27_24, GP_5_30_FN, FN_IP17_23_20, GP_5_29_FN, FN_IP17_19_16,
@@ -1684,7 +1684,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_5_3_FN ,FN_IP14_11_8 ,GP_5_2_FN ,FN_IP14_7_4 ,GP_5_1_FN ,FN_IP14_3_0 , - GP_5_0_FN, FN_IP13_31_28, } + GP_5_0_FN, FN_IP13_31_28, )) }, { PINMUX_CFG_REG_VAR("IPSR0", 0xE6060040, 32, 4, 4, 4, 4, 4, 4, 4, 4) {
drivers/pinctrl/sh-pfc/pfc-r8a7778.c +10 -10
@@ -2112,7 +2112,7 @@ static const struct sh_pfc_function pinmux_functions[] = { };static const struct pinmux_cfg_reg pinmux_config_regs[] = { - { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1) { + { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1, GROUP( GP_0_31_FN, FN_IP1_14_11, GP_0_30_FN, FN_IP1_10_8, GP_0_29_FN, FN_IP1_7_5,
@@ -2144,9 +2144,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_0_3_FN, FN_IP0_4_2, GP_0_2_FN, FN_PENC1, GP_0_1_FN, FN_PENC0, - GP_0_0_FN, FN_IP0_1_0 } + GP_0_0_FN, FN_IP0_1_0 )) }, - { PINMUX_CFG_REG("GPSR1", 0xfffc0008, 32, 1) { + { PINMUX_CFG_REG("GPSR1", 0xfffc0008, 32, 1, GROUP( GP_1_31_FN, FN_IP4_6_4, GP_1_30_FN, FN_IP4_3_1, GP_1_29_FN, FN_IP4_0,
@@ -2178,9 +2178,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_1_3_FN, FN_IP1_27_25, GP_1_2_FN, FN_IP1_24, GP_1_1_FN, FN_WE0, - GP_1_0_FN, FN_IP1_23_21 } + GP_1_0_FN, FN_IP1_23_21 )) }, - { PINMUX_CFG_REG("GPSR2", 0xfffc000c, 32, 1) { + { PINMUX_CFG_REG("GPSR2", 0xfffc000c, 32, 1, GROUP( GP_2_31_FN, FN_IP6_7, GP_2_30_FN, FN_IP6_6_5, GP_2_29_FN, FN_IP6_4_2,
@@ -2212,9 +2212,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_2_3_FN, FN_IP4_12_11, GP_2_2_FN, FN_IP4_10_9, GP_2_1_FN, FN_IP4_8, - GP_2_0_FN, FN_IP4_7 } + GP_2_0_FN, FN_IP4_7 )) }, - { PINMUX_CFG_REG("GPSR3", 0xfffc0010, 32, 1) { + { PINMUX_CFG_REG("GPSR3", 0xfffc0010, 32, 1, GROUP( GP_3_31_FN, FN_IP8_10_9, GP_3_30_FN, FN_IP8_8_6, GP_3_29_FN, FN_IP8_5_3,
@@ -2246,9 +2246,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_3_3_FN, FN_IP6_10, GP_3_2_FN, FN_SSI_SCK34, GP_3_1_FN, FN_IP6_9, - GP_3_0_FN, FN_IP6_8 } + GP_3_0_FN, FN_IP6_8 )) }, - { PINMUX_CFG_REG("GPSR4", 0xfffc0014, 32, 1) { + { PINMUX_CFG_REG("GPSR4", 0xfffc0014, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -2280,7 +2280,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_4_3_FN, FN_IP8_21_19, GP_4_2_FN, FN_IP8_18_16, GP_4_1_FN, FN_IP8_15_14, - GP_4_0_FN, FN_IP8_13_11 } + GP_4_0_FN, FN_IP8_13_11 )) }, { PINMUX_CFG_REG_VAR("IPSR0", 0xfffc0020, 32,
drivers/pinctrl/sh-pfc/pfc-r8a7779.c +14 -14
@@ -3048,7 +3048,7 @@ static const struct sh_pfc_function pinmux_functions[] = { };static const struct pinmux_cfg_reg pinmux_config_regs[] = { - { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1) { + { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1, GROUP( GP_0_31_FN, FN_IP3_31_29, GP_0_30_FN, FN_IP3_26_24, GP_0_29_FN, FN_IP3_22_21,
@@ -3080,9 +3080,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_0_3_FN, FN_A17, GP_0_2_FN, FN_IP0_7_6, GP_0_1_FN, FN_AVS2, - GP_0_0_FN, FN_AVS1 } + GP_0_0_FN, FN_AVS1 )) }, - { PINMUX_CFG_REG("GPSR1", 0xfffc0008, 32, 1) { + { PINMUX_CFG_REG("GPSR1", 0xfffc0008, 32, 1, GROUP( GP_1_31_FN, FN_IP5_23_21, GP_1_30_FN, FN_IP5_20_17, GP_1_29_FN, FN_IP5_16_15,
@@ -3114,9 +3114,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_1_3_FN, FN_IP4_10_8, GP_1_2_FN, FN_IP4_7_5, GP_1_1_FN, FN_IP4_4_2, - GP_1_0_FN, FN_IP4_1_0 } + GP_1_0_FN, FN_IP4_1_0 )) }, - { PINMUX_CFG_REG("GPSR2", 0xfffc000c, 32, 1) { + { PINMUX_CFG_REG("GPSR2", 0xfffc000c, 32, 1, GROUP( GP_2_31_FN, FN_IP10_28_26, GP_2_30_FN, FN_IP10_25_24, GP_2_29_FN, FN_IP10_23_21,
@@ -3148,9 +3148,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_2_3_FN, FN_IP8_24_23, GP_2_2_FN, FN_IP8_22_21, GP_2_1_FN, FN_IP8_20, - GP_2_0_FN, FN_IP5_27_24 } + GP_2_0_FN, FN_IP5_27_24 )) }, - { PINMUX_CFG_REG("GPSR3", 0xfffc0010, 32, 1) { + { PINMUX_CFG_REG("GPSR3", 0xfffc0010, 32, 1, GROUP( GP_3_31_FN, FN_IP6_3_2, GP_3_30_FN, FN_IP6_1_0, GP_3_29_FN, FN_IP5_30_29,
@@ -3182,9 +3182,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_3_3_FN, FN_IP11_8_6, GP_3_2_FN, FN_IP11_5_3, GP_3_1_FN, FN_IP11_2_0, - GP_3_0_FN, FN_IP10_31_29 } + GP_3_0_FN, FN_IP10_31_29 )) }, - { PINMUX_CFG_REG("GPSR4", 0xfffc0014, 32, 1) { + { PINMUX_CFG_REG("GPSR4", 0xfffc0014, 32, 1, GROUP( GP_4_31_FN, FN_IP8_19, GP_4_30_FN, FN_IP8_18, GP_4_29_FN, FN_IP8_17_16,
@@ -3216,9 +3216,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_4_3_FN, FN_IP6_11_9, GP_4_2_FN, FN_IP6_8, GP_4_1_FN, FN_IP6_7_6, - GP_4_0_FN, FN_IP6_5_4 } + GP_4_0_FN, FN_IP6_5_4 )) }, - { PINMUX_CFG_REG("GPSR5", 0xfffc0018, 32, 1) { + { PINMUX_CFG_REG("GPSR5", 0xfffc0018, 32, 1, GROUP( GP_5_31_FN, FN_IP3_5, GP_5_30_FN, FN_IP3_4, GP_5_29_FN, FN_IP3_3,
@@ -3250,9 +3250,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_5_3_FN, FN_A4, GP_5_2_FN, FN_A3, GP_5_1_FN, FN_A2, - GP_5_0_FN, FN_A1 } + GP_5_0_FN, FN_A1 )) }, - { PINMUX_CFG_REG("GPSR6", 0xfffc001c, 32, 1) { + { PINMUX_CFG_REG("GPSR6", 0xfffc001c, 32, 1, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3267,7 +3267,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_6_3_FN, FN_IP3_15, GP_6_2_FN, FN_IP3_8, GP_6_1_FN, FN_IP3_7, - GP_6_0_FN, FN_IP3_6 } + GP_6_0_FN, FN_IP3_6 )) }, { PINMUX_CFG_REG_VAR("IPSR0", 0xfffc0020, 32,
drivers/pinctrl/sh-pfc/pfc-r8a7790.c +12 -12
@@ -4755,7 +4755,7 @@ static const struct sh_pfc_function pinmux_functions[] = { };static const struct pinmux_cfg_reg pinmux_config_regs[] = { - { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1) { + { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1, GROUP( GP_0_31_FN, FN_IP3_17_15, GP_0_30_FN, FN_IP3_14_12, GP_0_29_FN, FN_IP3_11_8,
@@ -4787,9 +4787,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_0_3_FN, FN_IP0_11_9, GP_0_2_FN, FN_IP0_8_6, GP_0_1_FN, FN_IP0_5_3, - GP_0_0_FN, FN_IP0_2_0 } + GP_0_0_FN, FN_IP0_2_0 )) }, - { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1) { + { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1, GROUP( 0, 0, 0, 0, GP_1_29_FN, FN_IP6_13_11,
@@ -4821,9 +4821,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_1_3_FN ,FN_IP3_28_26 ,GP_1_2_FN ,FN_IP3_25_23 ,GP_1_1_FN ,FN_IP3_22_20 , - GP_1_0_FN, FN_IP3_19_18, } + GP_1_0_FN, FN_IP3_19_18, )) }, - { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1) { + { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1, GROUP( 0, 0, 0, 0, GP_2_29_FN, FN_IP7_15_13,
@@ -4855,9 +4855,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_2_3_FN, FN_IP8_3_2, GP_2_2_FN, FN_IP8_1_0, GP_2_1_FN, FN_IP7_30_29, - GP_2_0_FN, FN_IP7_28_27 } + GP_2_0_FN, FN_IP7_28_27 )) }, - { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1) { + { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1, GROUP( GP_3_31_FN, FN_IP11_21_18, GP_3_30_FN, FN_IP11_17_15, GP_3_29_FN, FN_IP11_14_13,
@@ -4889,9 +4889,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_3_3_FN, FN_IP9_3_2, GP_3_2_FN, FN_IP9_1_0, GP_3_1_FN, FN_IP8_30_29, - GP_3_0_FN, FN_IP8_28 } + GP_3_0_FN, FN_IP8_28 )) }, - { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1) { + { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1, GROUP( GP_4_31_FN, FN_IP14_18_16, GP_4_30_FN, FN_IP14_15_12, GP_4_29_FN, FN_IP14_11_9,
@@ -4923,9 +4923,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_4_3_FN, FN_IP11_31_30, GP_4_2_FN, FN_IP11_29_27, GP_4_1_FN, FN_IP11_26_24, - GP_4_0_FN, FN_IP11_23_22 } + GP_4_0_FN, FN_IP11_23_22 )) }, - { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1) { + { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1, GROUP( GP_5_31_FN, FN_IP7_24_22, GP_5_30_FN, FN_IP7_21_19, GP_5_29_FN, FN_IP7_18_16,
@@ -4957,7 +4957,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_5_3_FN, FN_IP14_30_28,GP_5_2_FN ,FN_IP14_27_25 ,GP_5_1_FN ,FN_IP14_24_22 , - GP_5_0_FN, FN_IP14_21_19 } + GP_5_0_FN, FN_IP14_21_19 )) }, { PINMUX_CFG_REG_VAR("IPSR0", 0xE6060020, 32, 1, 4, 4, 3, 4, 4, 3, 3, 3, 3) {
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +16 -16
@@ -5434,7 +5434,7 @@ static const struct { };static const struct pinmux_cfg_reg pinmux_config_regs[] = { - { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1) { + { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1, GROUP( GP_0_31_FN, FN_IP1_22_20, GP_0_30_FN, FN_IP1_19_17, GP_0_29_FN, FN_IP1_16_14,
@@ -5466,9 +5466,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_0_3_FN ,FN_IP0_3 ,GP_0_2_FN ,FN_IP0_2 ,GP_0_1_FN ,FN_IP0_1 , - GP_0_0_FN, FN_IP0_0, } + GP_0_0_FN, FN_IP0_0, )) }, - { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1) { + { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -5500,9 +5500,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_1_3_FN ,FN_IP2_2_0 ,GP_1_2_FN ,FN_IP1_31_29 ,GP_1_1_FN ,FN_IP1_28_26 , - GP_1_0_FN, FN_IP1_25_23, } + GP_1_0_FN, FN_IP1_25_23, )) }, - { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1) { + { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1, GROUP( GP_2_31_FN, FN_IP6_7_6, GP_2_30_FN, FN_IP6_5_3, GP_2_29_FN, FN_IP6_2_0,
@@ -5534,9 +5534,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_2_3_FN, FN_IP4_4_2, GP_2_2_FN, FN_IP4_1_0, GP_2_1_FN, FN_IP3_30_28, - GP_2_0_FN, FN_IP3_27_25 } + GP_2_0_FN, FN_IP3_27_25 )) }, - { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1) { + { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1, GROUP( GP_3_31_FN, FN_IP9_18_17, GP_3_30_FN, FN_IP9_16, GP_3_29_FN, FN_IP9_15_13,
@@ -5568,9 +5568,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_3_3_FN, FN_IP7_12_11, GP_3_2_FN, FN_IP7_10_9, GP_3_1_FN, FN_IP7_8_6, - GP_3_0_FN, FN_IP7_5_3 } + GP_3_0_FN, FN_IP7_5_3 )) }, - { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1) { + { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1, GROUP( GP_4_31_FN, FN_IP15_5_4, GP_4_30_FN, FN_IP15_3_2, GP_4_29_FN, FN_IP15_1_0,
@@ -5602,9 +5602,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_4_3_FN, FN_IP9_24_23, GP_4_2_FN, FN_IP9_22_21, GP_4_1_FN, FN_IP9_20_19, - GP_4_0_FN, FN_VI0_CLK } + GP_4_0_FN, FN_VI0_CLK )) }, - { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1) { + { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1, GROUP( GP_5_31_FN, FN_IP3_24_22, GP_5_30_FN, FN_IP13_9_7, GP_5_29_FN, FN_IP13_6_5,
@@ -5636,9 +5636,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_5_3_FN, FN_IP11_18_17, GP_5_2_FN, FN_IP11_16_15, GP_5_1_FN, FN_IP11_14_12, - GP_5_0_FN, FN_IP11_11_9 } + GP_5_0_FN, FN_IP11_11_9 )) }, - { PINMUX_CFG_REG("GPSR6", 0xE606001C, 32, 1) { + { PINMUX_CFG_REG("GPSR6", 0xE606001C, 32, 1, GROUP( GP_6_31_FN, FN_DU0_DOTCLKIN, GP_6_30_FN, FN_USB1_OVC, GP_6_29_FN, FN_IP14_31_29,
@@ -5670,9 +5670,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_6_3_FN, FN_IP13_13, GP_6_2_FN, FN_IP13_12, GP_6_1_FN, FN_IP13_11, - GP_6_0_FN, FN_IP13_10 } + GP_6_0_FN, FN_IP13_10 )) }, - { PINMUX_CFG_REG("GPSR7", 0xE6060074, 32, 1) { + { PINMUX_CFG_REG("GPSR7", 0xE6060074, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -5704,7 +5704,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_7_3_FN, FN_IP15_26_24, GP_7_2_FN, FN_IP15_23_21, GP_7_1_FN, FN_IP15_20_18, - GP_7_0_FN, FN_IP15_17_15 } + GP_7_0_FN, FN_IP15_17_15 )) }, { PINMUX_CFG_REG_VAR("IPSR0", 0xE6060020, 32, 1, 2, 2, 2, 2, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1,
drivers/pinctrl/sh-pfc/pfc-r8a7792.c +24 -24
137 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +14 -14
@@ -4619,7 +4619,7 @@ static const struct sh_pfc_function pinmux_functions[] = { };static const struct pinmux_cfg_reg pinmux_config_regs[] = { - { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1) { + { PINMUX_CFG_REG("GPSR0", 0xE6060004, 32, 1, GROUP( GP_0_31_FN, FN_IP2_17_16, GP_0_30_FN, FN_IP2_15_14, GP_0_29_FN, FN_IP2_13_12,
@@ -4651,9 +4651,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_0_3_FN ,FN_IP0_27_26 ,GP_0_2_FN ,FN_IP0_25 ,GP_0_1_FN ,FN_IP0_24 , - GP_0_0_FN, FN_IP0_23_22, } + GP_0_0_FN, FN_IP0_23_22, )) }, - { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1) { + { PINMUX_CFG_REG("GPSR1", 0xE6060008, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -4685,9 +4685,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {GP_1_3_FN ,FN_IP2_29_27 ,GP_1_2_FN ,FN_IP2_26_24 ,GP_1_1_FN ,FN_IP2_23_21 , - GP_1_0_FN, FN_IP2_20_18, } + GP_1_0_FN, FN_IP2_20_18, )) }, - { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1) { + { PINMUX_CFG_REG("GPSR2", 0xE606000C, 32, 1, GROUP( GP_2_31_FN, FN_IP6_7_6, GP_2_30_FN, FN_IP6_5_4, GP_2_29_FN, FN_IP6_3_2,
@@ -4719,9 +4719,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_2_3_FN, FN_IP4_11_10, GP_2_2_FN, FN_IP4_9_8, GP_2_1_FN, FN_IP4_7_5, - GP_2_0_FN, FN_IP4_4_2 } + GP_2_0_FN, FN_IP4_4_2 )) }, - { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1) { + { PINMUX_CFG_REG("GPSR3", 0xE6060010, 32, 1, GROUP( GP_3_31_FN, FN_IP8_22_20, GP_3_30_FN, FN_IP8_19_17, GP_3_29_FN, FN_IP8_16_15,
@@ -4753,9 +4753,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_3_3_FN, FN_IP6_11, GP_3_2_FN, FN_IP6_10, GP_3_1_FN, FN_IP6_9, - GP_3_0_FN, FN_IP6_8 } + GP_3_0_FN, FN_IP6_8 )) }, - { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1) { + { PINMUX_CFG_REG("GPSR4", 0xE6060014, 32, 1, GROUP( GP_4_31_FN, FN_IP11_17_16, GP_4_30_FN, FN_IP11_15_14, GP_4_29_FN, FN_IP11_13_11,
@@ -4787,9 +4787,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_4_3_FN, FN_IP9_2_0, GP_4_2_FN, FN_IP8_31_29, GP_4_1_FN, FN_IP8_28_26, - GP_4_0_FN, FN_IP8_25_23 } + GP_4_0_FN, FN_IP8_25_23 )) }, - { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1) { + { PINMUX_CFG_REG("GPSR5", 0xE6060018, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -4821,9 +4821,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_5_3_FN, FN_IP11_29_27, GP_5_2_FN, FN_IP11_26_24, GP_5_1_FN, FN_IP11_23_21, - GP_5_0_FN, FN_IP11_20_18 } + GP_5_0_FN, FN_IP11_20_18 )) }, - { PINMUX_CFG_REG("GPSR6", 0xE606001C, 32, 1) { + { PINMUX_CFG_REG("GPSR6", 0xE606001C, 32, 1, GROUP( 0, 0, 0, 0, 0, 0,
@@ -4855,7 +4855,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GP_6_3_FN, FN_SD0_DATA1, GP_6_2_FN, FN_SD0_DATA0, GP_6_1_FN, FN_SD0_CMD, - GP_6_0_FN, FN_SD0_CLK } + GP_6_0_FN, FN_SD0_CLK )) }, { PINMUX_CFG_REG_VAR("IPSR0", 0xE6060020, 32, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +52 -52
296 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +54 -54
307 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +54 -54
307 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +54 -54
307 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a77970.c +30 -30
175 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a77980.c +34 -34
197 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +46 -46
263 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +42 -42
241 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7203.c +62 -62
142 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7264.c +92 -92
184 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7269.c +102 -102
204 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7720.c +36 -36
72 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7722.c +64 -64
128 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7723.c +54 -54
108 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7724.c +56 -56
112 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7734.c +24 -19
43 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7757.c +70 -70
140 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7785.c +36 -36
72 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7786.c +22 -22
44 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.7.4
Part of the diff is not shown here. View the raw message.
PATCH v2 8/51 pinctrl: sh-pfc: Absorb enum IDs in PINMUX_CFG_REG_VAR() macro
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 69f7be1c6314fb0b1d5e2b101726db0c90f1ee61 upstream.
Currently the PINMUX_CFG_REG_VAR() macro must be followed by initialization data, specifying all enum IDs. Hence the macro itself does not know anything about the enum IDs, preventing the macro from performing any validation on it.
Make the macro accept the enum IDs as a parameter, and update all users. Note that array data enclosed by curly braces cannot be passed to a macro as a parameter, hence both the register field widths and the enum IDs are wrapped using the GROUP() macro.
No functional changes.
--- drivers/pinctrl/sh-pfc/pfc-emev2.c | 47 +++++++----- drivers/pinctrl/sh-pfc/pfc-r8a77470.c | 111 +++++++++++++++++----------- drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 81 ++++++++++++-------- drivers/pinctrl/sh-pfc/pfc-r8a7779.c | 89 +++++++++++++--------- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 107 ++++++++++++++++----------- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 123 +++++++++++++++++++------------ drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 86 +++++++++++---------- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 98 ++++++++++++++---------- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 20 ++--- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 21 +++--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 21 +++--- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 21 +++--- drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 7 +- drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 7 +- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 14 ++-- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 13 ++-- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 83 ++++++++++++--------- drivers/pinctrl/sh-pfc/sh_pfc.h | 25 ++++--- 18 files changed, 572 insertions(+), 402 deletions(-)
drivers/pinctrl/sh-pfc/pfc-emev2.c +29 -18
@@ -1592,8 +1592,10 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { )) }, { PINMUX_CFG_REG_VAR("CHG_PINSEL_LCD3", 0xe0140284, 32, -1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 , - 1, 1, 1, 1, 2, 2, 2, 2, 2, 2) { + GROUP(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 2), + GROUP( /* 31 - 12 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1607,11 +1609,13 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 1 - 0 */ FN_SEL_LCD3_1_0_00 ,FN_SEL_LCD3_1_0_01 ,0 ,0 , - } + )) }, { PINMUX_CFG_REG_VAR("CHG_PINSEL_UART", 0xe0140288, 32, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2) { + GROUP(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2), + GROUP( /* 31 - 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1619,11 +1623,13 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 1 - 0 */ FN_SEL_UART_1_0_00 ,FN_SEL_UART_1_0_01 ,0 ,0 , - } + )) }, { PINMUX_CFG_REG_VAR("CHG_PINSEL_IIC", 0xe014028c, 32, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2) { + GROUP(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2), + GROUP( /* 31 - 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1631,11 +1637,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,/* 1 - 0 */ FN_SEL_IIC_1_0_00 ,FN_SEL_IIC_1_0_01 ,0 ,0 , - } + )) }, { PINMUX_CFG_REG_VAR("CHG_PINSEL_AB", 0xe0140294, 32, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2) { + GROUP(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2), + GROUP( /* 31 - 14 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1656,11 +1663,13 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_SEL_AB_3_2_10 ,FN_SEL_AB_3_2_11 ,/* 1 - 0 */ FN_SEL_AB_1_0_00 ,0 ,FN_SEL_AB_1_0_10 ,0 , - } + )) }, { PINMUX_CFG_REG_VAR("CHG_PINSEL_USI", 0xe0140298, 32, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2) { + GROUP(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 2), + GROUP( /* 31 - 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1675,11 +1684,13 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {FN_SEL_USI_3_2_00 ,FN_SEL_USI_3_2_01 ,0 ,0 ,/* 1 - 0 */ FN_SEL_USI_1_0_00 ,FN_SEL_USI_1_0_01 ,0 ,0 , - } + )) }, { PINMUX_CFG_REG_VAR("CHG_PINSEL_HSI", 0xe01402a8, 32, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2) { + GROUP(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2), + GROUP( /* 31 - 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1687,7 +1698,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,/* 1 - 0 */ FN_SEL_HSI_1_0_00, FN_SEL_HSI_1_0_01, 0, 0, - } + )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a77470.c +66 -45
283 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7778.c +49 -32
189 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7779.c +53 -36
213 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7790.c +63 -44
271 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +74 -49
295 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7792.c +47 -39
154 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +58 -40
238 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +11 -9
@@ -5158,8 +5158,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 1, 2, 2, 3, 1, 1, 2, 1, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1) { + GROUP(1, 2, 2, 3, 1, 1, 2, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1), + GROUP( 0, 0, /* RESERVED 31 */ MOD_SEL0_30_29 MOD_SEL0_28_27
@@ -5182,11 +5183,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_5_4 MOD_SEL0_3 MOD_SEL0_2_1 - 0, 0, /* RESERVED 0 */ } + 0, 0, /* RESERVED 0 */ )) }, { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, - 2, 3, 1, 2, 3, 1, 1, 2, 1, - 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1) { + GROUP(2, 3, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1), + GROUP( MOD_SEL1_31_30 MOD_SEL1_29_28_27 MOD_SEL1_26
@@ -5209,11 +5211,11 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL1_3 MOD_SEL1_2 MOD_SEL1_1 - MOD_SEL1_0 } + MOD_SEL1_0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL2", 0xe6060508, 32, - 1, 1, 1, 1, 4, 4, 4, - 4, 4, 4, 1, 2, 1) { + GROUP(1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 1, 2, 1), + GROUP( MOD_SEL2_31 MOD_SEL2_30 MOD_SEL2_29
@@ -5241,7 +5243,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { 0, 0, /* RESERVED 2, 1 */ 0, 0, 0, 0, - MOD_SEL2_0 } + MOD_SEL2_0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +12 -9
@@ -5549,8 +5549,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 3, 2, 3, 1, 1, 1, 1, 1, 2, 1, - 1, 2, 1, 1, 1, 2, 2, 1, 2, 3) { + GROUP(3, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 2, + 1, 1, 1, 2, 2, 1, 2, 3), + GROUP( MOD_SEL0_31_30_29 MOD_SEL0_28_27 MOD_SEL0_26_25_24
@@ -5571,11 +5572,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_5 MOD_SEL0_4_3 /* RESERVED 2, 1, 0 */ - 0, 0, 0, 0, 0, 0, 0, 0 } + 0, 0, 0, 0, 0, 0, 0, 0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, - 2, 3, 1, 2, 3, 1, 1, 2, 1, - 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1) { + GROUP(2, 3, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1), + GROUP( MOD_SEL1_31_30 MOD_SEL1_29_28_27 MOD_SEL1_26
@@ -5598,11 +5600,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL1_3 MOD_SEL1_2 MOD_SEL1_1 - MOD_SEL1_0 } + MOD_SEL1_0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL2", 0xe6060508, 32, - 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 4, 4, 4, 3, 1) { + GROUP(1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 3, 1), + GROUP( MOD_SEL2_31 MOD_SEL2_30 MOD_SEL2_29
@@ -5629,7 +5632,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* RESERVED 3, 2, 1 */ 0, 0, 0, 0, 0, 0, 0, 0, - MOD_SEL2_0 } + MOD_SEL2_0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +12 -9
@@ -5506,8 +5506,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 3, 2, 3, 1, 1, 1, 1, 1, 2, 1, - 1, 2, 1, 1, 1, 2, 2, 1, 2, 3) { + GROUP(3, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 2, + 1, 1, 1, 2, 2, 1, 2, 3), + GROUP( MOD_SEL0_31_30_29 MOD_SEL0_28_27 MOD_SEL0_26_25_24
@@ -5528,11 +5529,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_5 MOD_SEL0_4_3 /* RESERVED 2, 1, 0 */ - 0, 0, 0, 0, 0, 0, 0, 0 } + 0, 0, 0, 0, 0, 0, 0, 0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, - 2, 3, 1, 2, 3, 1, 1, 2, 1, - 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1) { + GROUP(2, 3, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1), + GROUP( MOD_SEL1_31_30 MOD_SEL1_29_28_27 MOD_SEL1_26
@@ -5555,11 +5557,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL1_3 MOD_SEL1_2 MOD_SEL1_1 - MOD_SEL1_0 } + MOD_SEL1_0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL2", 0xe6060508, 32, - 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 4, 4, 4, 3, 1) { + GROUP(1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 3, 1), + GROUP( MOD_SEL2_31 MOD_SEL2_30 MOD_SEL2_29
@@ -5585,7 +5588,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* RESERVED 3, 2, 1 */ 0, 0, 0, 0, 0, 0, 0, 0, - MOD_SEL2_0 } + MOD_SEL2_0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +12 -9
@@ -4491,8 +4491,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 3, 2, 3, 1, 1, 1, 1, 1, 2, 1, - 1, 2, 1, 1, 1, 2, 2, 1, 2, 3) { + GROUP(3, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 2, + 1, 1, 1, 2, 2, 1, 2, 3), + GROUP( MOD_SEL0_31_30_29 MOD_SEL0_28_27 MOD_SEL0_26_25_24
@@ -4513,11 +4514,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_5 MOD_SEL0_4_3 /* RESERVED 2, 1, 0 */ - 0, 0, 0, 0, 0, 0, 0, 0 } + 0, 0, 0, 0, 0, 0, 0, 0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, - 2, 3, 1, 2, 3, 1, 1, 2, 1, - 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1) { + GROUP(2, 3, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, + 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1), + GROUP( MOD_SEL1_31_30 MOD_SEL1_29_28_27 MOD_SEL1_26
@@ -4540,11 +4542,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL1_3 MOD_SEL1_2 MOD_SEL1_1 - MOD_SEL1_0 } + MOD_SEL1_0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL2", 0xe6060508, 32, - 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, - 4, 4, 4, 3, 1) { + GROUP(1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 3, 1), + GROUP( MOD_SEL2_31 MOD_SEL2_30 MOD_SEL2_29
@@ -4570,7 +4573,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* RESERVED 3, 2, 1 */ 0, 0, 0, 0, 0, 0, 0, 0, - MOD_SEL2_0 } + MOD_SEL2_0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a77970.c +4 -3
@@ -2354,8 +2354,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 4, 4, 4, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) { + GROUP(4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1), + GROUP( /* RESERVED 31, 30, 29, 28 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* RESERVED 27, 26, 25, 24 */
@@ -2377,7 +2378,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_3 MOD_SEL0_2 MOD_SEL0_1 - MOD_SEL0_0 } + MOD_SEL0_0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a77980.c +4 -3
@@ -2751,8 +2751,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 4, 4, 4, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) { + GROUP(4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1), + GROUP( /* RESERVED 31, 30, 29, 28 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* RESERVED 27, 26, 25, 24 */
@@ -2774,7 +2775,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { 0, 0, MOD_SEL0_2 MOD_SEL0_1 - MOD_SEL0_0 } + MOD_SEL0_0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +8 -6
@@ -4937,8 +4937,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 1, 2, 1, 2, 1, 1, 1, 1, 2, 3, 1, - 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2) { + GROUP(1, 2, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, + 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2), + GROUP( /* RESERVED 31 */ 0, 0, MOD_SEL0_30_29
@@ -4962,11 +4963,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_4 MOD_SEL0_3 MOD_SEL0_2 - MOD_SEL0_1_0 } + MOD_SEL0_1_0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, - 1, 2, 2, 2, 1, 1, 2, 1, 4) { + GROUP(1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, + 1, 2, 2, 2, 1, 1, 2, 1, 4), + GROUP( MOD_SEL1_31 MOD_SEL1_30 MOD_SEL1_29
@@ -4989,7 +4991,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL1_6_5 MOD_SEL1_4 /* RESERVED 3, 2, 1, 0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +7 -6
@@ -2404,8 +2404,9 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { #define F_(x, y) x, #define FM(x) FN_##x, { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, - 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1) { + GROUP(1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, + 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1), + GROUP( /* RESERVED 31 */ 0, 0, MOD_SEL0_30
@@ -2433,11 +2434,11 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_3 MOD_SEL0_2 MOD_SEL0_1 - MOD_SEL0_0 } + MOD_SEL0_0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, - 1, 1, 1, 1, 1, 1, 2, 4, 4, - 4, 4, 4, 4) { + GROUP(1, 1, 1, 1, 1, 1, 2, 4, 4, 4, 4, 4, 4), + GROUP( MOD_SEL1_31 MOD_SEL1_30 MOD_SEL1_29
@@ -2457,7 +2458,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { /* RESERVED 7, 6, 5, 4 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* RESERVED 3, 2, 1, 0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-sh7734.c +49 -34
199 lines not on this page · raw message
drivers/pinctrl/sh-pfc/sh_pfc.h +14 -11
@@ -142,16 +142,17 @@ struct pinmux_cfg_reg { * - name: Register name (unused, for documentation purposes only) * - r: Physical register address * - r_width: Width of the register (in bits) - * - var_fw0, var_fwn...: List of widths of the register fields (in bits), - * From left to right (i.e. MSB to LSB) - * This macro must be followed by initialization data: For each register field - * (from left to right, i.e. MSB to LSB), 2^var_fwi enum IDs must be specified, - * one for each possible combination of the register field bit values. + * - f_widths: List of widths of the register fields (in bits), from left + * to right (i.e. MSB to LSB), wrapped using the GROUP() macro. + * - ids: For each register field (from left to right, i.e. MSB to LSB), + * 2^f_widths[i] enum IDs must be specified, one for each possible + * combination of the register field bit values, all wrapped using + * the GROUP() macro. */ -#define PINMUX_CFG_REG_VAR(name, r, r_width, var_fw0, var_fwn...) \ - .reg = r, .reg_width = r_width, \ - .var_field_width = (const u8 []) { var_fw0, var_fwn, 0 }, \ - .enum_ids = (const u16 []) +#define PINMUX_CFG_REG_VAR(name, r, r_width, f_widths, ids) \ + .reg = r, .reg_width = r_width, \ + .var_field_width = (const u8 []) { f_widths, 0 }, \ + .enum_ids = (const u16 []) { ids } struct pinmux_drive_reg_field { u16 pin;
@@ -669,7 +670,9 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; */ #define PORTCR(nr, reg) \ { \ - PINMUX_CFG_REG_VAR("PORT" nr "CR", reg, 8, 2, 2, 1, 3) {\ + 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 */ \
@@ -681,7 +684,7 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; PORT##nr##_FN2, PORT##nr##_FN3, \ PORT##nr##_FN4, PORT##nr##_FN5, \ PORT##nr##_FN6, PORT##nr##_FN7 \ - } \ + )) \ } /*
Signature · 1 line
2.7.4
PATCH v2 9/51 pinctrl: sh-pfc: Absorb enum IDs in PINMUX_DATA_REG() macro
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 19b593a1cf068effeca496f5dc92e5ad43f91bb2 upstream.
Currently the PINMUX_DATA_REG() macro must be followed by initialization data, specifying all enum IDs. Hence the macro itself does not know anything about the enum IDs, preventing the macro from performing any validation on it.
Make the macro accept the enum IDs as a parameter, and update all users. Note that array data enclosed by curly braces cannot be passed to a macro as a parameter, hence the enum IDs are wrapped using the GROUP() macro.
No functional changes.
--- drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 44 +++++++-------- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 40 +++++++------- drivers/pinctrl/sh-pfc/pfc-sh7203.c | 28 +++++----- drivers/pinctrl/sh-pfc/pfc-sh7264.c | 48 ++++++++-------- drivers/pinctrl/sh-pfc/pfc-sh7269.c | 48 ++++++++-------- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 40 +++++++------- drivers/pinctrl/sh-pfc/pfc-sh7720.c | 72 ++++++++++++------------ drivers/pinctrl/sh-pfc/pfc-sh7722.c | 92 +++++++++++++++---------------- drivers/pinctrl/sh-pfc/pfc-sh7723.c | 92 +++++++++++++++---------------- drivers/pinctrl/sh-pfc/pfc-sh7724.c | 92 +++++++++++++++---------------- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 14 ++--- drivers/pinctrl/sh-pfc/pfc-sh7757.c | 104 +++++++++++++++++------------------ drivers/pinctrl/sh-pfc/pfc-sh7785.c | 64 ++++++++++----------- drivers/pinctrl/sh-pfc/pfc-sh7786.c | 36 ++++++------ drivers/pinctrl/sh-pfc/pfc-shx3.c | 16 +++--- drivers/pinctrl/sh-pfc/sh_pfc.h | 10 ++-- 16 files changed, 420 insertions(+), 420 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a73a4.c +22 -22
@@ -2477,7 +2477,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {static const struct pinmux_data_reg pinmux_data_regs[] = { - { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) { + { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32, GROUP( 0, PORT30_DATA, PORT29_DATA, PORT28_DATA, PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA,
@@ -2486,9 +2486,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT11_DATA ,PORT10_DATA ,PORT9_DATA ,PORT8_DATA ,PORT7_DATA ,PORT6_DATA ,PORT5_DATA ,PORT4_DATA ,PORT3_DATA ,PORT2_DATA ,PORT1_DATA ,PORT0_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTD063_032DR", 0xe6055000, 32) { + { PINMUX_DATA_REG("PORTD063_032DR", 0xe6055000, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2497,9 +2497,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {0 ,0 ,0 ,PORT40_DATA ,PORT39_DATA ,PORT38_DATA ,PORT37_DATA ,PORT36_DATA ,PORT35_DATA ,PORT34_DATA ,PORT33_DATA ,PORT32_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054004, 32) { + { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054004, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PORT85_DATA, PORT84_DATA,
@@ -2508,9 +2508,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT75_DATA ,PORT74_DATA ,PORT73_DATA ,PORT72_DATA ,PORT71_DATA ,PORT70_DATA ,PORT69_DATA ,PORT68_DATA ,PORT67_DATA ,PORT66_DATA ,PORT65_DATA ,PORT64_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTD127_096DR", 0xe6055004, 32) { + { PINMUX_DATA_REG("PORTD127_096DR", 0xe6055004, 32, GROUP( 0, PORT126_DATA, PORT125_DATA, PORT124_DATA, PORT123_DATA, PORT122_DATA, PORT121_DATA, PORT120_DATA, PORT119_DATA, PORT118_DATA, PORT117_DATA, PORT116_DATA,
@@ -2519,9 +2519,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT107_DATA ,PORT106_DATA ,PORT105_DATA ,PORT104_DATA ,PORT103_DATA ,PORT102_DATA ,PORT101_DATA ,PORT100_DATA ,PORT99_DATA ,PORT98_DATA ,PORT97_DATA ,PORT96_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTD159_128DR", 0xe6055008, 32) { + { PINMUX_DATA_REG("PORTD159_128DR", 0xe6055008, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2530,9 +2530,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {0 ,0 ,0 ,0 ,0 ,PORT134_DATA ,PORT133_DATA ,PORT132_DATA ,PORT131_DATA ,PORT130_DATA ,PORT129_DATA ,PORT128_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056000, 32) { + { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056000, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2541,9 +2541,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT171_DATA ,PORT170_DATA ,PORT169_DATA ,PORT168_DATA ,PORT167_DATA ,PORT166_DATA ,PORT165_DATA ,PORT164_DATA ,PORT163_DATA ,PORT162_DATA ,PORT161_DATA ,PORT160_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056004, 32) { + { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056004, 32, GROUP( 0, PORT222_DATA, PORT221_DATA, PORT220_DATA, PORT219_DATA, PORT218_DATA, PORT217_DATA, PORT216_DATA, PORT215_DATA, PORT214_DATA, PORT213_DATA, PORT212_DATA,
@@ -2552,9 +2552,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT203_DATA ,PORT202_DATA ,PORT201_DATA ,PORT200_DATA ,PORT199_DATA ,PORT198_DATA ,PORT197_DATA ,PORT196_DATA ,PORT195_DATA ,PORT194_DATA ,PORT193_DATA ,PORT192_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTR255_224DR", 0xe6056008, 32) { + { PINMUX_DATA_REG("PORTR255_224DR", 0xe6056008, 32, GROUP( 0, 0, 0, 0, 0, PORT250_DATA, PORT249_DATA, PORT248_DATA, PORT247_DATA, PORT246_DATA, PORT245_DATA, PORT244_DATA,
@@ -2563,9 +2563,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT235_DATA ,PORT234_DATA ,PORT233_DATA ,PORT232_DATA ,PORT231_DATA ,PORT230_DATA ,PORT229_DATA ,PORT228_DATA ,PORT227_DATA ,PORT226_DATA ,PORT225_DATA ,PORT224_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTR287_256DR", 0xe605600C, 32) { + { PINMUX_DATA_REG("PORTR287_256DR", 0xe605600C, 32, GROUP( 0, 0, 0, 0, PORT283_DATA, PORT282_DATA, PORT281_DATA, PORT280_DATA, PORT279_DATA, PORT278_DATA, PORT277_DATA, PORT276_DATA,
@@ -2574,9 +2574,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT267_DATA ,PORT266_DATA ,PORT265_DATA ,PORT264_DATA ,PORT263_DATA ,PORT262_DATA ,PORT261_DATA ,PORT260_DATA ,PORT259_DATA ,PORT258_DATA ,PORT257_DATA ,PORT256_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTU319_288DR", 0xe6057000, 32) { + { PINMUX_DATA_REG("PORTU319_288DR", 0xe6057000, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PORT308_DATA,
@@ -2585,9 +2585,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = {PORT299_DATA ,PORT298_DATA ,PORT297_DATA ,PORT296_DATA ,PORT295_DATA ,PORT294_DATA ,PORT293_DATA ,PORT292_DATA ,PORT291_DATA ,PORT290_DATA ,PORT289_DATA ,PORT288_DATA , - } + )) }, - { PINMUX_DATA_REG("PORTU351_320DR", 0xe6057004, 32) { + { PINMUX_DATA_REG("PORTU351_320DR", 0xe6057004, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2596,7 +2596,7 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { 0, 0, PORT329_DATA, PORT328_DATA,PORT327_DATA ,PORT326_DATA ,PORT325_DATA ,PORT324_DATA , PORT323_DATA, PORT322_DATA, PORT321_DATA, PORT320_DATA, - } + )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +20 -20
@@ -3546,7 +3546,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { };static const struct pinmux_data_reg pinmux_data_regs[] = { - { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054800, 32) { + { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054800, 32, GROUP( PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA,
@@ -3554,9 +3554,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT15_DATA, PORT14_DATA, PORT13_DATA, PORT12_DATA, PORT11_DATA, PORT10_DATA, PORT9_DATA, PORT8_DATA, PORT7_DATA, PORT6_DATA, PORT5_DATA, PORT4_DATA, - PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA } + PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA )) }, - { PINMUX_DATA_REG("PORTL063_032DR", 0xe6054804, 32) { + { PINMUX_DATA_REG("PORTL063_032DR", 0xe6054804, 32, GROUP( PORT63_DATA, PORT62_DATA, PORT61_DATA, PORT60_DATA, PORT59_DATA, PORT58_DATA, PORT57_DATA, PORT56_DATA, PORT55_DATA, PORT54_DATA, PORT53_DATA, PORT52_DATA,
@@ -3564,9 +3564,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT47_DATA, PORT46_DATA, PORT45_DATA, PORT44_DATA, PORT43_DATA, PORT42_DATA, PORT41_DATA, PORT40_DATA, PORT39_DATA, PORT38_DATA, PORT37_DATA, PORT36_DATA, - PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA } + PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA )) }, - { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054808, 32) { + { PINMUX_DATA_REG("PORTL095_064DR", 0xe6054808, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3574,9 +3574,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT79_DATA, PORT78_DATA, PORT77_DATA, PORT76_DATA, PORT75_DATA, PORT74_DATA, PORT73_DATA, PORT72_DATA, PORT71_DATA, PORT70_DATA, PORT69_DATA, PORT68_DATA, - PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA } + PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA )) }, - { PINMUX_DATA_REG("PORTD095_064DR", 0xe6055808, 32) { + { PINMUX_DATA_REG("PORTD095_064DR", 0xe6055808, 32, GROUP( PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA, PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA, PORT87_DATA, PORT86_DATA, PORT85_DATA, PORT84_DATA,
@@ -3584,9 +3584,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0 } + 0, 0, 0, 0 )) }, - { PINMUX_DATA_REG("PORTD127_096DR", 0xe605580c, 32) { + { PINMUX_DATA_REG("PORTD127_096DR", 0xe605580c, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3594,9 +3594,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT111_DATA, PORT110_DATA, PORT109_DATA, PORT108_DATA, PORT107_DATA, PORT106_DATA, PORT105_DATA, PORT104_DATA, PORT103_DATA, PORT102_DATA, PORT101_DATA, PORT100_DATA, - PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA } + PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA )) }, - { PINMUX_DATA_REG("PORTR127_096DR", 0xe605680C, 32) { + { PINMUX_DATA_REG("PORTR127_096DR", 0xe605680C, 32, GROUP( PORT127_DATA, PORT126_DATA, PORT125_DATA, PORT124_DATA, PORT123_DATA, PORT122_DATA, PORT121_DATA, PORT120_DATA, PORT119_DATA, PORT118_DATA, PORT117_DATA, PORT116_DATA,
@@ -3604,9 +3604,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0 } + 0, 0, 0, 0 )) }, - { PINMUX_DATA_REG("PORTR159_128DR", 0xe6056810, 32) { + { PINMUX_DATA_REG("PORTR159_128DR", 0xe6056810, 32, GROUP( PORT159_DATA, PORT158_DATA, PORT157_DATA, PORT156_DATA, PORT155_DATA, PORT154_DATA, PORT153_DATA, PORT152_DATA, PORT151_DATA, PORT150_DATA, PORT149_DATA, PORT148_DATA,
@@ -3614,9 +3614,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT143_DATA, PORT142_DATA, PORT141_DATA, PORT140_DATA, PORT139_DATA, PORT138_DATA, PORT137_DATA, PORT136_DATA, PORT135_DATA, PORT134_DATA, PORT133_DATA, PORT132_DATA, - PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA } + PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA )) }, - { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056814, 32) { + { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056814, 32, GROUP( PORT191_DATA, PORT190_DATA, PORT189_DATA, PORT188_DATA, PORT187_DATA, PORT186_DATA, PORT185_DATA, PORT184_DATA, PORT183_DATA, PORT182_DATA, PORT181_DATA, PORT180_DATA,
@@ -3624,9 +3624,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT175_DATA, PORT174_DATA, PORT173_DATA, PORT172_DATA, PORT171_DATA, PORT170_DATA, PORT169_DATA, PORT168_DATA, PORT167_DATA, PORT166_DATA, PORT165_DATA, PORT164_DATA, - PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA } + PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA )) }, - { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056818, 32) { + { PINMUX_DATA_REG("PORTR223_192DR", 0xe6056818, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3634,9 +3634,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT207_DATA, PORT206_DATA, PORT205_DATA, PORT204_DATA, PORT203_DATA, PORT202_DATA, PORT201_DATA, PORT200_DATA, PORT199_DATA, PORT198_DATA, PORT197_DATA, PORT196_DATA, - PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA } + PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA )) }, - { PINMUX_DATA_REG("PORTU223_192DR", 0xe6057818, 32) { + { PINMUX_DATA_REG("PORTU223_192DR", 0xe6057818, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3644,7 +3644,7 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0 } + 0, 0, 0, 0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-sh7203.c +14 -14
@@ -1528,47 +1528,47 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { };static const struct pinmux_data_reg pinmux_data_regs[] = { - { PINMUX_DATA_REG("PADRL", 0xfffe3802, 16) { + {PINMUX_DATA_REG ("PADRL" ,0xfffe3802 ,16 ,GROUP (0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PA7_DATA ,PA6_DATA ,PA5_DATA ,PA4_DATA , -PA3_DATA ,PA2_DATA ,PA1_DATA ,PA0_DATA } +PA3_DATA ,PA2_DATA ,PA1_DATA ,PA0_DATA )) }, - { PINMUX_DATA_REG("PBDRL", 0xfffe3882, 16) { + {PINMUX_DATA_REG ("PBDRL" ,0xfffe3882 ,16 ,GROUP (0 ,0 ,0 ,PB12_DATA ,PB11_DATA ,PB10_DATA ,PB9_DATA ,PB8_DATA ,PB7_DATA ,PB6_DATA ,PB5_DATA ,PB4_DATA , -PB3_DATA ,PB2_DATA ,PB1_DATA ,PB0_DATA } +PB3_DATA ,PB2_DATA ,PB1_DATA ,PB0_DATA )) }, - { PINMUX_DATA_REG("PCDRL", 0xfffe3902, 16) { + {PINMUX_DATA_REG ("PCDRL" ,0xfffe3902 ,16 ,GROUP (0 ,PC14_DATA ,PC13_DATA ,PC12_DATA ,PC11_DATA ,PC10_DATA ,PC9_DATA ,PC8_DATA ,PC7_DATA ,PC6_DATA ,PC5_DATA ,PC4_DATA , -PC3_DATA ,PC2_DATA ,PC1_DATA ,PC0_DATA } +PC3_DATA ,PC2_DATA ,PC1_DATA ,PC0_DATA )) }, - { PINMUX_DATA_REG("PDDRL", 0xfffe3982, 16) { + {PINMUX_DATA_REG ("PDDRL" ,0xfffe3982 ,16 ,GROUP (PD15_DATA ,PD14_DATA ,PD13_DATA ,PD12_DATA ,PD11_DATA ,PD10_DATA ,PD9_DATA ,PD8_DATA ,PD7_DATA ,PD6_DATA ,PD5_DATA ,PD4_DATA , -PD3_DATA ,PD2_DATA ,PD1_DATA ,PD0_DATA } +PD3_DATA ,PD2_DATA ,PD1_DATA ,PD0_DATA )) }, - { PINMUX_DATA_REG("PEDRL", 0xfffe3a02, 16) { + {PINMUX_DATA_REG ("PEDRL" ,0xfffe3a02 ,16 ,GROUP (PE15_DATA ,PE14_DATA ,PE13_DATA ,PE12_DATA ,PE11_DATA ,PE10_DATA ,PE9_DATA ,PE8_DATA ,PE7_DATA ,PE6_DATA ,PE5_DATA ,PE4_DATA , -PE3_DATA ,PE2_DATA ,PE1_DATA ,PE0_DATA } +PE3_DATA ,PE2_DATA ,PE1_DATA ,PE0_DATA )) }, - { PINMUX_DATA_REG("PFDRH", 0xfffe3a80, 16) { + {PINMUX_DATA_REG ("PFDRH" ,0xfffe3a80 ,16 ,GROUP (0 ,PF30_DATA ,PF29_DATA ,PF28_DATA ,PF27_DATA ,PF26_DATA ,PF25_DATA ,PF24_DATA ,PF23_DATA ,PF22_DATA ,PF21_DATA ,PF20_DATA , -PF19_DATA ,PF18_DATA ,PF17_DATA ,PF16_DATA } +PF19_DATA ,PF18_DATA ,PF17_DATA ,PF16_DATA )) }, - { PINMUX_DATA_REG("PFDRL", 0xfffe3a82, 16) { + {PINMUX_DATA_REG ("PFDRL" ,0xfffe3a82 ,16 ,GROUP (PF15_DATA ,PF14_DATA ,PF13_DATA ,PF12_DATA ,PF11_DATA ,PF10_DATA ,PF9_DATA ,PF8_DATA ,PF7_DATA ,PF6_DATA ,PF5_DATA ,PF4_DATA , -PF3_DATA ,PF2_DATA ,PF1_DATA ,PF0_DATA } +PF3_DATA ,PF2_DATA ,PF1_DATA ,PF0_DATA )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-sh7264.c +24 -24
103 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7269.c +24 -24
103 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +20 -20
@@ -4091,7 +4091,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { };static const struct pinmux_data_reg pinmux_data_regs[] = { - { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) { + { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32, GROUP( PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA,
@@ -4099,9 +4099,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT15_DATA, PORT14_DATA, PORT13_DATA, PORT12_DATA, PORT11_DATA, PORT10_DATA, PORT9_DATA, PORT8_DATA, PORT7_DATA, PORT6_DATA, PORT5_DATA, PORT4_DATA, - PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA } + PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA )) }, - { PINMUX_DATA_REG("PORTD063_032DR", 0xe6055000, 32) { + { PINMUX_DATA_REG("PORTD063_032DR", 0xe6055000, 32, GROUP( PORT63_DATA, PORT62_DATA, PORT61_DATA, PORT60_DATA, PORT59_DATA, PORT58_DATA, PORT57_DATA, PORT56_DATA, PORT55_DATA, PORT54_DATA, PORT53_DATA, PORT52_DATA,
@@ -4109,9 +4109,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT47_DATA, PORT46_DATA, PORT45_DATA, PORT44_DATA, PORT43_DATA, PORT42_DATA, PORT41_DATA, PORT40_DATA, PORT39_DATA, PORT38_DATA, PORT37_DATA, PORT36_DATA, - PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA } + PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA )) }, - { PINMUX_DATA_REG("PORTD095_064DR", 0xe6055004, 32) { + { PINMUX_DATA_REG("PORTD095_064DR", 0xe6055004, 32, GROUP( PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA, PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA, PORT87_DATA, PORT86_DATA, PORT85_DATA, PORT84_DATA,
@@ -4119,9 +4119,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT79_DATA, PORT78_DATA, PORT77_DATA, PORT76_DATA, PORT75_DATA, PORT74_DATA, PORT73_DATA, PORT72_DATA, PORT71_DATA, PORT70_DATA, PORT69_DATA, PORT68_DATA, - PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA } + PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA )) }, - { PINMUX_DATA_REG("PORTR127_096DR", 0xe6056000, 32) { + { PINMUX_DATA_REG("PORTR127_096DR", 0xe6056000, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, PORT118_DATA, PORT117_DATA, PORT116_DATA,
@@ -4129,9 +4129,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT111_DATA, PORT110_DATA, PORT109_DATA, PORT108_DATA, PORT107_DATA, PORT106_DATA, PORT105_DATA, PORT104_DATA, PORT103_DATA, PORT102_DATA, PORT101_DATA, PORT100_DATA, - PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA } + PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA )) }, - { PINMUX_DATA_REG("PORTR159_128DR", 0xe6056004, 32) { + { PINMUX_DATA_REG("PORTR159_128DR", 0xe6056004, 32, GROUP( PORT159_DATA, PORT158_DATA, PORT157_DATA, PORT156_DATA, PORT155_DATA, PORT154_DATA, PORT153_DATA, PORT152_DATA, PORT151_DATA, PORT150_DATA, PORT149_DATA, PORT148_DATA,
@@ -4139,9 +4139,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT143_DATA, PORT142_DATA, PORT141_DATA, PORT140_DATA, PORT139_DATA, PORT138_DATA, PORT137_DATA, PORT136_DATA, PORT135_DATA, PORT134_DATA, PORT133_DATA, PORT132_DATA, - PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA } + PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA )) }, - { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056008, 32) { + { PINMUX_DATA_REG("PORTR191_160DR", 0xe6056008, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -4149,9 +4149,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PORT164_DATA, - PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA } + PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA )) }, - { PINMUX_DATA_REG("PORTR223_192DR", 0xe605600C, 32) { + { PINMUX_DATA_REG("PORTR223_192DR", 0xe605600C, 32, GROUP( PORT223_DATA, PORT222_DATA, PORT221_DATA, PORT220_DATA, PORT219_DATA, PORT218_DATA, PORT217_DATA, PORT216_DATA, PORT215_DATA, PORT214_DATA, PORT213_DATA, PORT212_DATA,
@@ -4159,9 +4159,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT207_DATA, PORT206_DATA, PORT205_DATA, PORT204_DATA, PORT203_DATA, PORT202_DATA, PORT201_DATA, PORT200_DATA, PORT199_DATA, PORT198_DATA, PORT197_DATA, PORT196_DATA, - PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA } + PORT195_DATA, PORT194_DATA, PORT193_DATA, PORT192_DATA )) }, - { PINMUX_DATA_REG("PORTU255_224DR", 0xe6057000, 32) { + { PINMUX_DATA_REG("PORTU255_224DR", 0xe6057000, 32, GROUP( PORT255_DATA, PORT254_DATA, PORT253_DATA, PORT252_DATA, PORT251_DATA, PORT250_DATA, PORT249_DATA, PORT248_DATA, PORT247_DATA, PORT246_DATA, PORT245_DATA, PORT244_DATA,
@@ -4169,9 +4169,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT239_DATA, PORT238_DATA, PORT237_DATA, PORT236_DATA, PORT235_DATA, PORT234_DATA, PORT233_DATA, PORT232_DATA, PORT231_DATA, PORT230_DATA, PORT229_DATA, PORT228_DATA, - PORT227_DATA, PORT226_DATA, PORT225_DATA, PORT224_DATA } + PORT227_DATA, PORT226_DATA, PORT225_DATA, PORT224_DATA )) }, - { PINMUX_DATA_REG("PORTU287_256DR", 0xe6057004, 32) { + { PINMUX_DATA_REG("PORTU287_256DR", 0xe6057004, 32, GROUP( 0, 0, 0, 0, 0, PORT282_DATA, PORT281_DATA, PORT280_DATA, PORT279_DATA, PORT278_DATA, PORT277_DATA, PORT276_DATA,
@@ -4179,9 +4179,9 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT271_DATA, PORT270_DATA, PORT269_DATA, PORT268_DATA, PORT267_DATA, PORT266_DATA, PORT265_DATA, PORT264_DATA, PORT263_DATA, PORT262_DATA, PORT261_DATA, PORT260_DATA, - PORT259_DATA, PORT258_DATA, PORT257_DATA, PORT256_DATA } + PORT259_DATA, PORT258_DATA, PORT257_DATA, PORT256_DATA )) }, - { PINMUX_DATA_REG("PORTR319_288DR", 0xe6056010, 32) { + { PINMUX_DATA_REG("PORTR319_288DR", 0xe6056010, 32, GROUP( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PORT309_DATA, PORT308_DATA,
@@ -4189,7 +4189,7 @@ static const struct pinmux_data_reg pinmux_data_regs[] = { PORT303_DATA, PORT302_DATA, PORT301_DATA, PORT300_DATA,PORT299_DATA ,PORT298_DATA ,PORT297_DATA ,PORT296_DATA ,PORT295_DATA ,PORT294_DATA ,PORT293_DATA ,PORT292_DATA , - PORT291_DATA, PORT290_DATA, PORT289_DATA, PORT288_DATA } + PORT291_DATA, PORT290_DATA, PORT289_DATA, PORT288_DATA )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-sh7720.c +36 -36
113 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7722.c +46 -46
143 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7723.c +46 -46
143 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7724.c +46 -46
143 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7734.c +7 -7
@@ -2428,17 +2428,17 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {static const struct pinmux_data_reg pinmux_data_regs[] = {/* GPIO 0 - 5*/ - { PINMUX_DATA_REG("INDT0", 0xFFC4000C, 32) { GP_INDT(0) } }, - { PINMUX_DATA_REG("INDT1", 0xFFC4100C, 32) { GP_INDT(1) } }, - { PINMUX_DATA_REG("INDT2", 0xFFC4200C, 32) { GP_INDT(2) } }, - { PINMUX_DATA_REG("INDT3", 0xFFC4300C, 32) { GP_INDT(3) } }, - { PINMUX_DATA_REG("INDT4", 0xFFC4400C, 32) { GP_INDT(4) } }, - { PINMUX_DATA_REG("INDT5", 0xFFC4500C, 32) { + {PINMUX_DATA_REG ("INDT0" ,0xFFC4000C ,32 ,GROUP (GP_INDT (0 ))) }, + {PINMUX_DATA_REG ("INDT1" ,0xFFC4100C ,32 ,GROUP (GP_INDT (1 ))) }, + {PINMUX_DATA_REG ("INDT2" ,0xFFC4200C ,32 ,GROUP (GP_INDT (2 ))) }, + {PINMUX_DATA_REG ("INDT3" ,0xFFC4300C ,32 ,GROUP (GP_INDT (3 ))) }, + {PINMUX_DATA_REG ("INDT4" ,0xFFC4400C ,32 ,GROUP (GP_INDT (4 ))) }, + {PINMUX_DATA_REG ("INDT5" ,0xFFC4500C ,32 ,GROUP (0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,GP_5_11_DATA ,GP_5_10_DATA ,GP_5_9_DATA ,GP_5_8_DATA ,GP_5_7_DATA ,GP_5_6_DATA ,GP_5_5_DATA ,GP_5_4_DATA , -GP_5_3_DATA ,GP_5_2_DATA ,GP_5_1_DATA ,GP_5_0_DATA } +GP_5_3_DATA ,GP_5_2_DATA ,GP_5_1_DATA ,GP_5_0_DATA )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-sh7757.c +52 -52
161 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7785.c +32 -32
101 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-sh7786.c +18 -18
@@ -760,41 +760,41 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { };static const struct pinmux_data_reg pinmux_data_regs[] = { - { PINMUX_DATA_REG("PADR", 0xffcc0020, 8) { + {PINMUX_DATA_REG ("PADR" ,0xffcc0020 ,8 ,GROUP (PA7_DATA ,PA6_DATA ,PA5_DATA ,PA4_DATA , -PA3_DATA ,PA2_DATA ,PA1_DATA ,PA0_DATA } +PA3_DATA ,PA2_DATA ,PA1_DATA ,PA0_DATA )) }, - { PINMUX_DATA_REG("PBDR", 0xffcc0022, 8) { + {PINMUX_DATA_REG ("PBDR" ,0xffcc0022 ,8 ,GROUP (PB7_DATA ,PB6_DATA ,PB5_DATA ,PB4_DATA , -PB3_DATA ,PB2_DATA ,PB1_DATA ,PB0_DATA } +PB3_DATA ,PB2_DATA ,PB1_DATA ,PB0_DATA )) }, - { PINMUX_DATA_REG("PCDR", 0xffcc0024, 8) { + {PINMUX_DATA_REG ("PCDR" ,0xffcc0024 ,8 ,GROUP (PC7_DATA ,PC6_DATA ,PC5_DATA ,PC4_DATA , -PC3_DATA ,PC2_DATA ,PC1_DATA ,PC0_DATA } +PC3_DATA ,PC2_DATA ,PC1_DATA ,PC0_DATA )) }, - { PINMUX_DATA_REG("PDDR", 0xffcc0026, 8) { + {PINMUX_DATA_REG ("PDDR" ,0xffcc0026 ,8 ,GROUP (PD7_DATA ,PD6_DATA ,PD5_DATA ,PD4_DATA , -PD3_DATA ,PD2_DATA ,PD1_DATA ,PD0_DATA } +PD3_DATA ,PD2_DATA ,PD1_DATA ,PD0_DATA )) }, - { PINMUX_DATA_REG("PEDR", 0xffcc0028, 8) { + {PINMUX_DATA_REG ("PEDR" ,0xffcc0028 ,8 ,GROUP (PE7_DATA ,PE6_DATA , -0 ,0 ,0 ,0 ,0 ,0 } +0 ,0 ,0 ,0 ,0 ,0 )) }, - { PINMUX_DATA_REG("PFDR", 0xffcc002a, 8) { + {PINMUX_DATA_REG ("PFDR" ,0xffcc002a ,8 ,GROUP (PF7_DATA ,PF6_DATA ,PF5_DATA ,PF4_DATA , -PF3_DATA ,PF2_DATA ,PF1_DATA ,PF0_DATA } +PF3_DATA ,PF2_DATA ,PF1_DATA ,PF0_DATA )) }, - { PINMUX_DATA_REG("PGDR", 0xffcc002c, 8) { + {PINMUX_DATA_REG ("PGDR" ,0xffcc002c ,8 ,GROUP (PG7_DATA ,PG6_DATA ,PG5_DATA ,0 , -0 ,0 ,0 ,0 } +0 ,0 ,0 ,0 )) }, - { PINMUX_DATA_REG("PHDR", 0xffcc002e, 8) { + {PINMUX_DATA_REG ("PHDR" ,0xffcc002e ,8 ,GROUP (PH7_DATA ,PH6_DATA ,PH5_DATA ,PH4_DATA , -PH3_DATA ,PH2_DATA ,PH1_DATA ,PH0_DATA } +PH3_DATA ,PH2_DATA ,PH1_DATA ,PH0_DATA )) }, - { PINMUX_DATA_REG("PJDR", 0xffcc0030, 8) { + {PINMUX_DATA_REG ("PJDR" ,0xffcc0030 ,8 ,GROUP (PJ7_DATA ,PJ6_DATA ,PJ5_DATA ,PJ4_DATA , -PJ3_DATA ,PJ2_DATA ,PJ1_DATA ,0 } +PJ3_DATA ,PJ2_DATA ,PJ1_DATA ,0 )) }, { }, };
drivers/pinctrl/sh-pfc/pfc-shx3.c +8 -8
@@ -510,37 +510,37 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { };static const struct pinmux_data_reg pinmux_data_regs[] = { - { PINMUX_DATA_REG("PABDR", 0xffc70010, 32) { + {PINMUX_DATA_REG ("PABDR" ,0xffc70010 ,32 ,GROUP (0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PA7_DATA ,PA6_DATA ,PA5_DATA ,PA4_DATA ,PA3_DATA ,PA2_DATA ,PA1_DATA ,PA0_DATA ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PB7_DATA ,PB6_DATA ,PB5_DATA ,PB4_DATA , -PB3_DATA ,PB2_DATA ,PB1_DATA ,PB0_DATA , }, + PB3_DATA, PB2_DATA, PB1_DATA, PB0_DATA, )) }, - { PINMUX_DATA_REG("PCDDR", 0xffc70014, 32) { + {PINMUX_DATA_REG ("PCDDR" ,0xffc70014 ,32 ,GROUP (0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PC7_DATA ,PC6_DATA ,PC5_DATA ,PC4_DATA ,PC3_DATA ,PC2_DATA ,PC1_DATA ,PC0_DATA ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PD7_DATA ,PD6_DATA ,PD5_DATA ,PD4_DATA , -PD3_DATA ,PD2_DATA ,PD1_DATA ,PD0_DATA , }, + PD3_DATA, PD2_DATA, PD1_DATA, PD0_DATA, )) }, - { PINMUX_DATA_REG("PEFDR", 0xffc70018, 32) { + {PINMUX_DATA_REG ("PEFDR" ,0xffc70018 ,32 ,GROUP (0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PE7_DATA ,PE6_DATA ,PE5_DATA ,PE4_DATA ,PE3_DATA ,PE2_DATA ,PE1_DATA ,PE0_DATA ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PF7_DATA ,PF6_DATA ,PF5_DATA ,PF4_DATA , -PF3_DATA ,PF2_DATA ,PF1_DATA ,PF0_DATA , }, + PF3_DATA, PF2_DATA, PF1_DATA, PF0_DATA, )) }, - { PINMUX_DATA_REG("PGHDR", 0xffc7001c, 32) { + {PINMUX_DATA_REG ("PGHDR" ,0xffc7001c ,32 ,GROUP (0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PG7_DATA ,PG6_DATA ,PG5_DATA ,PG4_DATA ,PG3_DATA ,PG2_DATA ,PG1_DATA ,PG0_DATA ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,PH5_DATA ,PH4_DATA , -PH3_DATA ,PH2_DATA ,PH1_DATA ,PH0_DATA , }, + PH3_DATA, PH2_DATA, PH1_DATA, PH0_DATA, )) }, { }, };
drivers/pinctrl/sh-pfc/sh_pfc.h +5 -5
@@ -195,12 +195,12 @@ struct pinmux_data_reg {* - name: Register name (unused, for documentation purposes only) * - r: Physical register address * - r_width: Width of the register (in bits) -* This macro must be followed by initialization data: For each register bit -* (from left to right, i.e. MSB to LSB), one enum ID must be specified. +* - ids: For each register bit (from left to right, i.e. MSB to LSB), one +* enum ID must be specified, all wrapped using the GROUP() macro. */ -#define PINMUX_DATA_REG (name, r, r_width) \ - .reg = r, .reg_width = r_width, \ - .enum_ids = (const u16 [r_width]) \ +#define PINMUX_DATA_REG (name, r, r_width, ids) \ + .reg = r, .reg_width = r_width, \ + .enum_ids = (const u16 [r_width]) { ids }struct pinmux_irq {const short *gpios;
Signature · 1 line
2.7.4
PATCH v2 10/51 pinctrl: sh-pfc: Validate enum IDs for regs with fixed-width fields
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit c481c8178420b8cc8b188807fe6eee8b069ce2d8 upstream.
Add build-time checks to the PINMUX_CFG_REG() and PINMUX_DATA_REG() macros, to ensure the number of provided enum IDs is correct.
This helps catching bugs early.
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/sh_pfc.h +6 -2
@@ -133,7 +133,9 @@ struct pinmux_cfg_reg {*/ #define PINMUX_CFG_REG (name, r, r_width, f_width, ids) \ .reg = r, .reg_width = r_width, \ - .field_width = f_width + BUILD_BUG_ON_ZERO(r_width % f_width), \ + .field_width = f_width + BUILD_BUG_ON_ZERO(r_width % f_width) + \ + BUILD_BUG_ON_ZERO(sizeof((const u16 []) { ids }) / sizeof(u16) != \ + (r_width / f_width) * (1 << f_width)), \ .enum_ids = (const u16 [(r_width / f_width) * (1 << f_width)]) \ { ids }
@@ -199,7 +201,9 @@ struct pinmux_data_reg {* enum ID must be specified, all wrapped using the GROUP() macro. */ #define PINMUX_DATA_REG (name, r, r_width, ids) \ - .reg = r, .reg_width = r_width, \ + .reg = r, .reg_width = r_width + \ + BUILD_BUG_ON_ZERO(sizeof((const u16 []) { ids }) / sizeof(u16) != \ + r_width), \ .enum_ids = (const u16 [r_width]) { ids }struct pinmux_irq {
Signature · 1 line
2.7.4
PATCH v2 11/51 pinctrl: sh-pfc: Validate enum IDs for regs with variable-width fields
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit fa4d36712f20e2425171ab1f62341ebb6416d3ea upstream.
Add a run-time check to the PINMUX_CFG_REG_VAR() macro, to ensure the number of provided enum IDs is correct. This cannot be done at build time, as the number of values depends on the variable-width fields in the config register.
This helps catching bugs early.
--- drivers/pinctrl/sh-pfc/core.c | 6 ++++++ drivers/pinctrl/sh-pfc/sh_pfc.h | 7 +++++++ 2 files changed, 13 insertions(+)
drivers/pinctrl/sh-pfc/core.c +6 -0
@@ -753,6 +753,12 @@ static void sh_pfc_check_cfg_reg(const char *drvname, drvname, cfg_reg->reg, rw, cfg_reg->reg_width); sh_pfc_errors++; } + +if (n != cfg_reg->nr_enum_ids) { +pr_err ("%s: reg 0x%x: enum_ids[] has %u instead of %u values\n" , + drvname, cfg_reg->reg, cfg_reg->nr_enum_ids, n); + sh_pfc_errors++; + } }static void sh_pfc_check_info (const struct sh_pfc_soc_info *info)
drivers/pinctrl/sh-pfc/sh_pfc.h +7 -0
@@ -114,6 +114,12 @@ struct pinmux_func {struct pinmux_cfg_reg {u32 reg;u8 reg_width, field_width; +#ifdef DEBUG +u16 nr_enum_ids;/* for variable width regs only */ +#define SET_NR_ENUM_IDS (n) .nr_enum_ids = n, +#else +#define SET_NR_ENUM_IDS (n) +#endif const u16 *enum_ids;const u8 *var_field_width; };
@@ -154,6 +160,7 @@ struct pinmux_cfg_reg {#define PINMUX_CFG_REG_VAR (name, r, r_width, f_widths, ids) \ .reg = r, .reg_width = r_width, \ .var_field_width = (const u8 []) { f_widths, 0 }, \ + SET_NR_ENUM_IDS(sizeof((const u16 []) { ids }) / sizeof(u16)) \ .enum_ids = (const u16 []) { ids }struct pinmux_drive_reg_field {
Signature · 1 line
2.7.4
PATCH v2 12/51 pinctrl: sh-pfc: Improve PINMUX_IPSR_PHYS() documentation
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 360328c7dc15f48dd9b6187e7d4a9517a64e51f7 upstream.
- The IPSR field is meant for documentation only,
- The function name refers to the pin function, not to the IPSR field.
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/sh_pfc.h +2 -2
@@ -420,8 +420,8 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;/* * Describe a pinmux configuration in which a pin is physically multiplexed * with other pins. -* - ipsr: IPSR field -* - fn: Function name, also referring to the IPSR field +* - ipsr: IPSR field (unused, for documentation purposes only) +* - fn: Function name * - psel: Physical multiplexing selector */ #define PINMUX_IPSR_PHYS (ipsr, fn, psel) \
Signature · 1 line
2.7.4
PATCH v2 13/51 pinctrl: sh-pfc: Rename 2-parameter CPU_ALL_PORT() variant
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit bd79c92039f117a3e448b9ef042595497a5218a6 upstream.
There are two variants of the CPU_ALL_PORT() macro in use:
1. A three-parameter variant, to be provided for SoCs with a linear GPIO pin space ("PORT style"),
2. A two-parameter variant, to be provided for SoCs with 32-port GPIO banks ("GP port style").
Rename the 2-parameter variant to CPU_ALL_GP(), to avoid confusion, and to increase naming consistency.
--- drivers/pinctrl/sh-pfc/pfc-r8a77470.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7779.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 2 +- drivers/pinctrl/sh-pfc/pfc-sh7734.c | 2 +- drivers/pinctrl/sh-pfc/sh_pfc.h | 6 +++--- 17 files changed, 19 insertions(+), 19 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77470.c +1 -1
@@ -9,7 +9,7 @@#include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_23(0, fn, sfx), \ PORT_GP_23(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/sh-pfc/pfc-r8a7778.c +1 -1
@@ -46,7 +46,7 @@PORT_GP_PUP_1 (bank,24 , fn, sfx),PORT_GP_PUP_1 (bank,25 , fn, sfx), \ PORT_GP_PUP_1(bank, 26, fn, sfx) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_32(0, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \ PORT_GP_CFG_32(1, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \ PORT_GP_CFG_32(2, fn, sfx, SH_PFC_PIN_CFG_PULL_UP), \
drivers/pinctrl/sh-pfc/pfc-r8a7779.c +1 -1
@@ -23,7 +23,7 @@#include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_32(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/sh-pfc/pfc-r8a7790.c +1 -1
@@ -30,7 +30,7 @@* All pins assigned to GPIO bank 3 can be used for SD interfaces in * which case they support both 3.3V and 1.8V signalling. */ -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_30(1, fn, sfx), \ PORT_GP_30(2, fn, sfx), \
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -1
@@ -17,7 +17,7 @@* Pins 0-23 assigned to GPIO bank 6 can be used for SD interfaces in * which case they support both 3.3V and 1.8V signalling. */ -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_26(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/sh-pfc/pfc-r8a7792.c +1 -1
@@ -14,7 +14,7 @@#include "core.h" #include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_29(0, fn, sfx), \ PORT_GP_23(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +1 -1
@@ -15,7 +15,7 @@#include "core.h" #include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_26(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +1 -1
@@ -17,7 +17,7 @@ SH_PFC_PIN_CFG_PULL_UP | \ SH_PFC_PIN_CFG_PULL_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_28(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +1 -1
@@ -18,7 +18,7 @@ SH_PFC_PIN_CFG_PULL_UP | \ SH_PFC_PIN_CFG_PULL_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +1 -1
@@ -23,7 +23,7 @@ SH_PFC_PIN_CFG_PULL_UP | \ SH_PFC_PIN_CFG_PULL_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +1 -1
@@ -21,7 +21,7 @@ SH_PFC_PIN_CFG_PULL_UP | \ SH_PFC_PIN_CFG_PULL_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_29(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_15(2, fn, sfx, CFG_FLAGS), \
drivers/pinctrl/sh-pfc/pfc-r8a77970.c +1 -1
@@ -21,7 +21,7 @@#include "core.h" #include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_22(0, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ PORT_GP_28(1, fn, sfx), \ PORT_GP_CFG_17(2, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \
drivers/pinctrl/sh-pfc/pfc-r8a77980.c +1 -1
@@ -18,7 +18,7 @@#include "core.h" #include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_22(0, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \ PORT_GP_28(1, fn, sfx), \ PORT_GP_CFG_30(2, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +1 -1
@@ -19,7 +19,7 @@#define CFG_FLAGS (SH_PFC_PIN_CFG_PULL_UP | \ SH_PFC_PIN_CFG_PULL_DOWN) -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_18(0, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_23(1, fn, sfx, CFG_FLAGS), \ PORT_GP_CFG_26(2, fn, sfx, CFG_FLAGS), \
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +1 -1
@@ -19,7 +19,7 @@#include "core.h" #include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_9(0, fn, sfx), \ PORT_GP_32(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/sh-pfc/pfc-sh7734.c +1 -1
@@ -14,7 +14,7 @@#include "sh_pfc.h" -#define CPU_ALL_PORT (fn, sfx) \ +#define CPU_ALL_GP (fn, sfx) \ PORT_GP_32(0, fn, sfx), \ PORT_GP_32(1, fn, sfx), \ PORT_GP_32(2, fn, sfx), \
drivers/pinctrl/sh-pfc/sh_pfc.h +3 -3
@@ -586,7 +586,7 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;/* GP_ALL(suffix) - Expand to a list of GP_#_#_suffix */ #define _GP_ALL (bank, pin, name, sfx, cfg) name##_##sfx -#define GP_ALL (str) CPU_ALL_PORT(_GP_ALL, str) +#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) \
@@ -596,11 +596,11 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; .enum_id = _name##_DATA, \ .configs = cfg, \ } -#define PINMUX_GPIO_GP_ALL () CPU_ALL_PORT(_GP_GPIO, unused) +#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 */ #define _GP_DATA (bank, pin, name, sfx, cfg) PINMUX_DATA(name##_DATA, name##_FN) -#define PINMUX_DATA_GP_ALL () CPU_ALL_PORT(_GP_DATA, unused) +#define PINMUX_DATA_GP_ALL () CPU_ALL_GP(_GP_DATA, unused)/* * PORT style (linear pin space)
Signature · 1 line
2.7.4
PATCH v2 14/51 pinctrl: sh-pfc: Add SH_PFC_PIN_CFG_PULL_UP_DOWN shorthand
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit f1074e7281a2e83b1cca7dee8f7005fbcc1f594e upstream.
It is very common for a pin to support both pull-up and pull-down functionality. Hence add a shorthand SH_PFC_PIN_CFG_PULL_UP_DOWN. This not only reduces typing, but also avoids the need for several line breaks, and makes many overly long lines shorter, improving readability.
--- drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 12 +++++------- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 3 +-- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 2 +- drivers/pinctrl/sh-pfc/pinctrl.c | 3 +-- drivers/pinctrl/sh-pfc/sh_pfc.h | 2 ++ 10 files changed, 27 insertions(+), 35 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a73a4.c +1 -1
@@ -1265,7 +1265,7 @@ static const u16 pinmux_data[] = {#define __O (SH_PFC_PIN_CFG_OUTPUT)#define __IO (SH_PFC_PIN_CFG_INPUT | SH_PFC_PIN_CFG_OUTPUT) -#define __PUD (SH_PFC_PIN_CFG_PULL_DOWN | SH_PFC_PIN_CFG_PULL_UP) +#define __PUD (SH_PFC_PIN_CFG_PULL_UP_DOWN)#define R8A73A4_PIN_IO_PU_PD (pin) SH_PFC_PIN_CFG(pin, __IO | __PUD)#define R8A73A4_PIN_O (pin) SH_PFC_PIN_CFG(pin, __O)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -1
@@ -1528,7 +1528,7 @@ static const u16 pinmux_data[] = {#define __IO (SH_PFC_PIN_CFG_INPUT | SH_PFC_PIN_CFG_OUTPUT)#define __PD (SH_PFC_PIN_CFG_PULL_DOWN)#define __PU (SH_PFC_PIN_CFG_PULL_UP) -#define __PUD (SH_PFC_PIN_CFG_PULL_DOWN | SH_PFC_PIN_CFG_PULL_UP) +#define __PUD (SH_PFC_PIN_CFG_PULL_UP_DOWN)#define R8A7740_PIN_I_PD (pin) SH_PFC_PIN_CFG(pin, __I | __PD)#define R8A7740_PIN_I_PU (pin) SH_PFC_PIN_CFG(pin, __I | __PU)
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +5 -7
@@ -13,9 +13,7 @@#include "core.h" #include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ - SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \
@@ -1493,17 +1491,17 @@ static const struct sh_pfc_pin pinmux_pins[] = {SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),5 ,QSPI0_MOSI_IO0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),7 ,QSPI1_MOSI_IO0 ,CFG_FLAGS ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('D'), 38, FSCLKST#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),4 ,QSPI1_IO2 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),5 ,QSPI1_MISO_IO1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),7 ,DU_DOTCLKIN0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),8 ,DU_DOTCLKIN1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),7 ,DU_DOTCLKIN2 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN3 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), + SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP_DOWN), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),30 ,TMS ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),28 ,TDO ,SH_PFC_PIN_CFG_DRIVE_STRENGTH ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('T'), 30, ASEBRK, CFG_FLAGS), };
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +5 -7
@@ -14,9 +14,7 @@#include "core.h" #include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ - SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \
@@ -1553,17 +1551,17 @@ static const struct sh_pfc_pin pinmux_pins[] = {SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),5 ,QSPI0_MOSI_IO0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),7 ,QSPI1_MOSI_IO0 ,CFG_FLAGS ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('D'), 38, FSCLKST#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),4 ,QSPI1_IO2 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),5 ,QSPI1_MISO_IO1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),7 ,DU_DOTCLKIN0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),8 ,DU_DOTCLKIN1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),7 ,DU_DOTCLKIN2 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN3 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), + SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP_DOWN), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),30 ,TMS ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),28 ,TDO ,SH_PFC_PIN_CFG_DRIVE_STRENGTH ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('T'), 30, ASEBRK, CFG_FLAGS), };
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +5 -7
@@ -19,9 +19,7 @@#include "core.h" #include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ - SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \
@@ -1559,16 +1557,16 @@ static const struct sh_pfc_pin pinmux_pins[] = {SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),5 ,QSPI0_MOSI_IO0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),7 ,QSPI1_MOSI_IO0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),38 ,FSCLKST ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),4 ,QSPI1_IO2 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),5 ,QSPI1_MISO_IO1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),7 ,DU_DOTCLKIN0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),8 ,DU_DOTCLKIN1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN2 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), + SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP_DOWN), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),30 ,TMS ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),28 ,TDO ,SH_PFC_PIN_CFG_DRIVE_STRENGTH ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('T'), 30, ASEBRK, CFG_FLAGS), };
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +5 -7
@@ -17,9 +17,7 @@#include "core.h" #include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | \ - SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_DRIVE_STRENGTH | SH_PFC_PIN_CFG_PULL_UP_DOWN)#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_16(0, fn, sfx, CFG_FLAGS), \
@@ -1561,16 +1559,16 @@ static const struct sh_pfc_pin pinmux_pins[] = {SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),5 ,QSPI0_MOSI_IO0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),7 ,QSPI1_MOSI_IO0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),38 ,FSCLKST ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),4 ,QSPI1_IO2 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),5 ,QSPI1_MISO_IO1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),7 ,DU_DOTCLKIN0 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),8 ,DU_DOTCLKIN1 ,CFG_FLAGS ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN2 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP | SH_PFC_PIN_CFG_PULL_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), + SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP_DOWN), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),30 ,TMS ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ), +SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP_DOWN ),SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),28 ,TDO ,SH_PFC_PIN_CFG_DRIVE_STRENGTH ), SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('T'), 30, ASEBRK, CFG_FLAGS), };
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +1 -2
@@ -16,8 +16,7 @@#include "core.h" #include "sh_pfc.h" -#define CFG_FLAGS (SH_PFC_PIN_CFG_PULL_UP | \ - SH_PFC_PIN_CFG_PULL_DOWN) +#define CFG_FLAGS (SH_PFC_PIN_CFG_PULL_UP_DOWN)#define CPU_ALL_GP (fn, sfx) \ PORT_GP_CFG_18(0, fn, sfx, CFG_FLAGS), \
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +1 -1
@@ -1160,7 +1160,7 @@ static const u16 pinmux_data[] = {#define __IO (SH_PFC_PIN_CFG_INPUT | SH_PFC_PIN_CFG_OUTPUT)#define __PD (SH_PFC_PIN_CFG_PULL_DOWN)#define __PU (SH_PFC_PIN_CFG_PULL_UP) -#define __PUD (SH_PFC_PIN_CFG_PULL_DOWN | SH_PFC_PIN_CFG_PULL_UP) +#define __PUD (SH_PFC_PIN_CFG_PULL_UP_DOWN)#define SH73A0_PIN_I_PD (pin) SH_PFC_PIN_CFG(pin, __I | __PD)#define SH73A0_PIN_I_PU (pin) SH_PFC_PIN_CFG(pin, __I | __PU)
drivers/pinctrl/sh-pfc/pinctrl.c +1 -2
@@ -570,8 +570,7 @@ static bool sh_pfc_pinconf_validate(struct sh_pfc *pfc, unsigned int _pin,switch (param) {case PIN_CONFIG_BIAS_DISABLE : -return pin->configs & - (SH_PFC_PIN_CFG_PULL_UP |SH_PFC_PIN_CFG_PULL_DOWN ); +return pin->configs &SH_PFC_PIN_CFG_PULL_UP_DOWN ;case PIN_CONFIG_BIAS_PULL_UP :return pin->configs &SH_PFC_PIN_CFG_PULL_UP ;
drivers/pinctrl/sh-pfc/sh_pfc.h +2 -0
@@ -28,6 +28,8 @@ enum {#define SH_PFC_PIN_CFG_OUTPUT (1 << 1)#define SH_PFC_PIN_CFG_PULL_UP (1 << 2)#define SH_PFC_PIN_CFG_PULL_DOWN (1 << 3) +#define SH_PFC_PIN_CFG_PULL_UP_DOWN (SH_PFC_PIN_CFG_PULL_UP | \ + SH_PFC_PIN_CFG_PULL_DOWN)#define SH_PFC_PIN_CFG_IO_VOLTAGE (1 << 4)#define SH_PFC_PIN_CFG_DRIVE_STRENGTH (1 << 5)#define SH_PFC_PIN_CFG_NO_GPIO (1 << 31)
Signature · 1 line
2.7.4
PATCH v2 15/51 pinctrl: sh-pfc: Add new non-GPIO helper macros
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 4818f448986dd8d0e28b648be5f99c3f29abe6bf upstream.
Add new macros for describing pins without GPIO functionality:
- NOGP_ALL() expands to a list of PIN_id values, to be used for generating symbolic enum values,
- PINMUX_NOGP_ALL() expands to a list of sh_pfc_pin entries, to list all pins and their capabilities.
Both macros depend on an SoC-specific CPU_ALL_NOGP() macro, to be provided by each individual SoC pin control driver.
The new macros offer two advantages over the existing SH_PFC_PIN_NAMED() and SH_PFC_PIN_NAMED_CFG() macros:
1. They do not rely on PIN_NUMBER() macros and physical pin numbering, hence do not suffer from pin numbering confusion among different SoC/SiP packages.
2. They are similar in spirit to the existing scheme for handling pins with GPIO functionality.
Note that internal to the driver, non-GPIO pins use a sequential numbering scheme which starts after the highest GPIO pin number in use. This value is calculated automatically, using two new helper macros, for systems with either 32-port bank (GP port style) or linear (PORT style) pin space. Sample expansion:
GP_LAST = sizeof(union {
char dummy[0] __attribute__((deprecated, deprecated));
char GP_0_0[(0 * 32) + 0] __attribute__((deprecated, deprecated));
char GP_0_1[(0 * 32) + 1] __attribute__((deprecated, deprecated));
...
char GP_7_3[(7 * 32) + 3] __attribute__((deprecated, deprecated));
})--- drivers/pinctrl/sh-pfc/sh_pfc.h | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+)
drivers/pinctrl/sh-pfc/sh_pfc.h +56 -0
@@ -605,6 +605,24 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info;#define PINMUX_DATA_GP_ALL () CPU_ALL_GP(_GP_DATA, unused)/* +* GP_ASSIGN_LAST() - Expand to an enum definition for the last GP pin +* +* The largest GP pin index is obtained by taking the size of a union, +* containing one array per GP pin, sized by the corresponding pin index. +* As the fields in the CPU_ALL_GP() macro definition are separated by commas, +* while the members of a union must be terminated by semicolons, the commas +* are absorbed by wrapping them inside dummy attributes. +*/ +#define _GP_ENTRY (bank, pin, name, sfx, cfg) \ + deprecated)); char name[(bank * 32) + pin] __attribute__((deprecated +#define GP_ASSIGN_LAST () \ + GP_LAST = sizeof(union { \ + char dummy[0] __attribute__((deprecated, \ + CPU_ALL_GP(_GP_ENTRY, unused), \ + deprecated)); \ + }) + +/* * PORT style (linear pin space) */
@@ -669,6 +687,24 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; PORT##pfx##_OUT, PORT##pfx##_IN)#define PINMUX_DATA_ALL () CPU_ALL_PORT(_PORT_DATA, , unused) +/* +* PORT_ASSIGN_LAST() - Expand to an enum definition for the last PORT pin +* +* The largest PORT pin index is obtained by taking the size of a union, +* containing one array per PORT pin, sized by the corresponding pin index. +* As the fields in the CPU_ALL_PORT() macro definition are separated by +* commas, while the members of a union must be terminated by semicolons, the +* commas are absorbed by wrapping them inside dummy attributes. +*/ +#define _PORT_ENTRY (pn, pfx, sfx) \ + deprecated)); char pfx[pn] __attribute__((deprecated +#define PORT_ASSIGN_LAST () \ + PORT_LAST = sizeof(union { \ + char dummy[0] __attribute__((deprecated, \ + CPU_ALL_PORT(_PORT_ENTRY, PORT, unused), \ + deprecated)); \ + }) +/* GPIO_FN(name) - Expand to a sh_pfc_pin entry for a function GPIO */ #define PINMUX_GPIO_FN (gpio, base, data_or_mark) \ [gpio - (base)] = { \
@@ -679,6 +715,26 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; PINMUX_GPIO_FN(GPIO_FN_##str, PINMUX_FN_BASE, str##_MARK)/* +* Pins not associated with a GPIO port +*/ + +#define PIN_NOGP_CFG (pin, name, fn, cfg) fn(pin, name, cfg) +#define PIN_NOGP (pin, name, fn) fn(pin, name, 0) + +/* NOGP_ALL - Expand to a list of PIN_id */ +#define _NOGP_ALL (pin, name, cfg) PIN_##pin +#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 PINMUX_NOGP_ALL () CPU_ALL_NOGP(_NOGP_PINMUX) + +/* * PORTnCR helper macro for SH-Mobile/R-Mobile */ #define PORTCR (nr, reg) \
Signature · 1 line
2.7.4
PATCH v2 16/51 pinctrl: sh-pfc: Correct printk level of group reference warning
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 5f304f8c87c71572da4ee514eb2ec50f8f4d2e26 upstream.
Improve wording while at it.
--- drivers/pinctrl/sh-pfc/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/core.c +2 -2
@@ -800,8 +800,8 @@ static void sh_pfc_check_info(const struct sh_pfc_soc_info *info) info->groups[i].name); sh_pfc_errors++; }else if (refcnts[i] >1 ) { -pr_err ("%s: group %s referred by %u functions\n" , - drvname, info->groups[i].name, refcnts[i]); +pr_warn ("%s: group %s referenced by %u functions\n" , + drvname, info->groups[i].name, refcnts[i]); sh_pfc_warnings++; } }
Signature · 1 line
2.7.4
PATCH v2 17/51 pinctrl: sh-pfc: Mark run-time debug code __init
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 80cde64f68ff09617f89e78dfadf5a6873be87a8 upstream.
All run-time debug code is called from sh_pfc_init(), which is __init.
--- drivers/pinctrl/sh-pfc/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/pinctrl/sh-pfc/core.c +7 -7
@@ -714,7 +714,7 @@ static int sh_pfc_suspend_init(struct sh_pfc *pfc) { return 0; }#endif /* CONFIG_PM_SLEEP && CONFIG_ARM_PSCI_FW */ #ifdef DEBUG -static bool is0s (const u16 *enum_ids,unsigned int n) +static bool __init is0s (const u16 *enum_ids,unsigned int n) {unsigned int i;
@@ -725,11 +725,11 @@ static bool is0s(const u16 *enum_ids, unsigned int n)return true; } -static unsigned int sh_pfc_errors; -static unsigned int sh_pfc_warnings; +static unsigned int sh_pfc_errors__initdata =0 ; +static unsigned int sh_pfc_warnings__initdata =0 ; -static void sh_pfc_check_cfg_reg (const char *drvname, -const struct pinmux_cfg_reg *cfg_reg) +static void __init sh_pfc_check_cfg_reg (const char *drvname, +const struct pinmux_cfg_reg *cfg_reg) {unsigned int i, n, rw, fw;
@@ -761,7 +761,7 @@ static void sh_pfc_check_cfg_reg(const char *drvname, } } -static void sh_pfc_check_info (const struct sh_pfc_soc_info *info) +static void __init sh_pfc_check_info (const struct sh_pfc_soc_info *info) {const struct sh_pfc_function *func;const char *drvname = info->name;
@@ -813,7 +813,7 @@ static void sh_pfc_check_info(const struct sh_pfc_soc_info *info)sh_pfc_check_cfg_reg (drvname, &info->cfg_regs[i]); } -static void sh_pfc_check_driver (const struct platform_driver *pdrv) +static void __init sh_pfc_check_driver (const struct platform_driver *pdrv) {unsigned int i;
Signature · 1 line
2.7.4
PATCH v2 18/51 pinctrl: sh-pfc: Add check for empty pinmux groups/functions
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 3dd5fd79f07103f7cda30567f8bf85a854796dd6 upstream.
The pinmux groups and functions arrays may contain two parts, to ease supporting SoCs that expose pin subsets of other related SoCs. Both parts need to be declared with explicit sizes, which thus need to be updated when adding support for more groups and functions.
If a size is too small, the compiler will detect this at build time ("excess elements in array initializer").
If a size is too large, this may go undetected (for pin groups), lead to pin controller registration failures (for pin functions: "pinmux ops has no name for functionN"), or crash the optional run-time debug code (for pin groups).
Extend the run-time debug code with checks to detect this, to help catching bugs early.
--- drivers/pinctrl/sh-pfc/core.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/core.c +12 -1
@@ -777,9 +777,15 @@ static void __init sh_pfc_check_info(const struct sh_pfc_soc_info *info)for (i =0 ; i < info->nr_functions; i++) { func = &info->functions[i]; +if (!func->name) { +pr_err ("%s: empty function %u\n" , drvname, i); + sh_pfc_errors++; +continue ; + }for (j =0 ; j < func->nr_groups; j++) {for (k =0 ; k < info->nr_groups; k++) { -if (!strcmp (func->groups[j], +if (info->groups[k].name && + !strcmp (func->groups[j], info->groups[k].name)) { refcnts[k]++;break ;
@@ -795,6 +801,11 @@ static void __init sh_pfc_check_info(const struct sh_pfc_soc_info *info) }for (i =0 ; i < info->nr_groups; i++) { +if (!info->groups[i].name) { +pr_err ("%s: empty group %u\n" , drvname, i); + sh_pfc_errors++; +continue ; + }if (!refcnts[i]) {pr_err ("%s: orphan group %s\n" , drvname, info->groups[i].name);
Signature · 1 line
2.7.4
PATCH v2 19/51 pinctrl: sh-pfc: Validate pin tables at runtime
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 542ffc9e026a3f736eeaa041823d406510f40a12 upstream.
Extend the run-time debug code with checks to ensure there are no conflicting pin names, numbers, or enumeration values.
This helps catching bugs early.
--- drivers/pinctrl/sh-pfc/core.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
drivers/pinctrl/sh-pfc/core.c +29 -0
@@ -770,6 +770,35 @@ static void __init sh_pfc_check_info(const struct sh_pfc_soc_info *info)pr_info ("Checking %s\n" , drvname); +/* Check pins */ +for (i =0 ; i < info->nr_pins; i++) { +for (j =0 ; j < i; j++) { +if (!strcmp (info->pins[i].name, info->pins[j].name)) { +pr_err ("%s: pin %s/%s: name conflict\n" , + drvname, info->pins[i].name, + info->pins[j].name); + sh_pfc_errors++; + } + +if (info->pins[i].pin != (u16)-1 && + info->pins[i].pin == info->pins[j].pin) { +pr_err ("%s: pin %s/%s: pin %u conflict\n" , + drvname, info->pins[i].name, + info->pins[j].name, info->pins[i].pin); + sh_pfc_errors++; + } + +if (info->pins[i].enum_id && + info->pins[i].enum_id == info->pins[j].enum_id) { +pr_err ("%s: pin %s/%s: enum_id %u conflict\n" , + drvname, info->pins[i].name, + info->pins[j].name, + info->pins[i].enum_id); + sh_pfc_errors++; + } + } + } +/* Check groups and functions */ refcnts =kcalloc (info->nr_groups,sizeof (*refcnts),GFP_KERNEL );if (!refcnts)
Signature · 1 line
2.7.4
PATCH v2 20/51 pinctrl: sh-pfc: r8a7796: Fix VIN versioned groups
In reply to Fabrizio CastroFrom: Jacopo Mondi <[email protected]>
commit 10e78f03da181b24f33a8a77047fb6798126fb46 upstream.
Versioned VIN groups can appear on different sets of pins. Using the VIN_DATA_PIN_GROUP macro now supports proper naming of said groups through an optional 'version' argument.
Use the 'version' argument for said macro to fix naming of versioned groups for the R-Car M3-W R8A7796 SoC.
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +12 -12
@@ -4410,20 +4410,20 @@ static const struct {SH_PFC_PIN_GROUP (usb0),SH_PFC_PIN_GROUP (usb1),SH_PFC_PIN_GROUP (usb30), -VIN_DATA_PIN_GROUP (vin4_data_a,8 ), -VIN_DATA_PIN_GROUP (vin4_data_a,10 ), -VIN_DATA_PIN_GROUP (vin4_data_a,12 ), -VIN_DATA_PIN_GROUP (vin4_data_a,16 ), +VIN_DATA_PIN_GROUP (vin4_data,8 , _a), +VIN_DATA_PIN_GROUP (vin4_data,10 , _a), +VIN_DATA_PIN_GROUP (vin4_data,12 , _a), +VIN_DATA_PIN_GROUP (vin4_data,16 , _a),SH_PFC_PIN_GROUP (vin4_data18_a), -VIN_DATA_PIN_GROUP (vin4_data_a,20 ), -VIN_DATA_PIN_GROUP (vin4_data_a,24 ), -VIN_DATA_PIN_GROUP (vin4_data_b,8 ), -VIN_DATA_PIN_GROUP (vin4_data_b,10 ), -VIN_DATA_PIN_GROUP (vin4_data_b,12 ), -VIN_DATA_PIN_GROUP (vin4_data_b,16 ), +VIN_DATA_PIN_GROUP (vin4_data,20 , _a), +VIN_DATA_PIN_GROUP (vin4_data,24 , _a), +VIN_DATA_PIN_GROUP (vin4_data,8 , _b), +VIN_DATA_PIN_GROUP (vin4_data,10 , _b), +VIN_DATA_PIN_GROUP (vin4_data,12 , _b), +VIN_DATA_PIN_GROUP (vin4_data,16 , _b),SH_PFC_PIN_GROUP (vin4_data18_b), -VIN_DATA_PIN_GROUP (vin4_data_b,20 ), -VIN_DATA_PIN_GROUP (vin4_data_b,24 ), +VIN_DATA_PIN_GROUP (vin4_data,20 , _b), +VIN_DATA_PIN_GROUP (vin4_data,24 , _b),SH_PFC_PIN_GROUP (vin4_sync),SH_PFC_PIN_GROUP (vin4_field), SH_PFC_PIN_GROUP(vin4_clkenb),
Signature · 1 line
2.7.4
PATCH v2 21/51 pinctrl: sh-pfc: r8a7796: Add I2C{0, 3, 5} pins, groups and functions
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit 8d7bcad65ef390ef9efd4b3d3fd18dc2a08f2a14 upstream.
This patch adds I2C{0,3,5} pins, groups and functions to the R8A7796 SoC.
These pins are physically muxed with other pins. Therefore, setup of MOD_SEL is needed for exclusive control with other pins.
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 98 ++++++++++++++++++++++++++++-------- 1 file changed, 77 insertions(+), 21 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +77 -21
@@ -557,6 +557,9 @@ MOD_SEL0_4_3 MOD_SEL1_4 \FM (DU_DOTCLKIN0)FM (DU_DOTCLKIN1 )FM (DU_DOTCLKIN2 ) \FM (TMS )FM (TDO )FM (ASEBRK )FM (MLB_REF )FM (TDI )FM (TCK )FM (TRST )FM (EXTALR ) +#define PINMUX_PHYS \ +FM (SCL0 )FM (SDA0 )FM (SCL3 )FM (SDA3 )FM (SCL5 )FM (SDA5 ) + enum { PINMUX_RESERVED = 0,
@@ -582,6 +585,7 @@ enum {PINMUX_IPSR PINMUX_MOD_SELSPINMUX_STATIC + PINMUX_PHYS PINMUX_MARK_END,#undef F_#undef FM
@@ -618,13 +622,15 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP0_15_12 ,MSIOF2_SCK_C ,SEL_MSIOF2_2 ),PINMUX_IPSR_MSEL (IP0_15_12 ,TX4_A ,SEL_SCIF4_0 ), -PINMUX_IPSR_MSEL (IP0_19_16 ,AVB_AVTP_MATCH_A ,SEL_ETHERAVB_0 ), -PINMUX_IPSR_MSEL (IP0_19_16 ,MSIOF2_RXD_C ,SEL_MSIOF2_2 ), -PINMUX_IPSR_MSEL (IP0_19_16 ,CTS4_N_A ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_19_16 ,AVB_AVTP_MATCH_A ,I2C_SEL_5_0 ,SEL_ETHERAVB_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_19_16 ,MSIOF2_RXD_C ,I2C_SEL_5_0 ,SEL_MSIOF2_2 ), +PINMUX_IPSR_PHYS_MSEL (IP0_19_16 ,CTS4_N_A ,I2C_SEL_5_0 ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS (IP0_19_16 ,SCL5 ,I2C_SEL_5_1 ), -PINMUX_IPSR_MSEL (IP0_23_20 ,AVB_AVTP_CAPTURE_A ,SEL_ETHERAVB_0 ), -PINMUX_IPSR_MSEL (IP0_23_20 ,MSIOF2_TXD_C ,SEL_MSIOF2_2 ), -PINMUX_IPSR_MSEL (IP0_23_20 ,RTS4_N_A ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_23_20 ,AVB_AVTP_CAPTURE_A ,I2C_SEL_5_0 ,SEL_ETHERAVB_0 ), +PINMUX_IPSR_PHYS_MSEL (IP0_23_20 ,MSIOF2_TXD_C ,I2C_SEL_5_0 ,SEL_MSIOF2_2 ), +PINMUX_IPSR_PHYS_MSEL (IP0_23_20 ,RTS4_N_A ,I2C_SEL_5_0 ,SEL_SCIF4_0 ), +PINMUX_IPSR_PHYS (IP0_23_20 ,SDA5 ,I2C_SEL_5_1 ),PINMUX_IPSR_GPSR (IP0_27_24 ,IRQ0 ), PINMUX_IPSR_GPSR(IP0_27_24, QPOLB),
@@ -676,14 +682,16 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP1_19_16 ,VI4_DATA6_B ,SEL_VIN4_1 ),PINMUX_IPSR_MSEL (IP1_19_16 ,IECLK_B ,SEL_IEBUS_1 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,PWM1_A ,SEL_PWM1_0 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,HRX3_D ,SEL_HSCIF3_3 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,VI4_DATA7_B ,SEL_VIN4_1 ), -PINMUX_IPSR_MSEL (IP1_23_20 ,IERX_B ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,PWM1_A ,I2C_SEL_3_0 ,SEL_PWM1_0 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,HRX3_D ,I2C_SEL_3_0 ,SEL_HSCIF3_3 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,VI4_DATA7_B ,I2C_SEL_3_0 ,SEL_VIN4_1 ), +PINMUX_IPSR_PHYS_MSEL (IP1_23_20 ,IERX_B ,I2C_SEL_3_0 ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS (IP0_23_20 ,SCL3 ,I2C_SEL_3_1 ), -PINMUX_IPSR_MSEL (IP1_27_24 ,PWM2_A ,SEL_PWM2_0 ), -PINMUX_IPSR_MSEL (IP1_27_24 ,HTX3_D ,SEL_HSCIF3_3 ), -PINMUX_IPSR_MSEL (IP1_27_24 ,IETX_B ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS_MSEL (IP1_27_24 ,PWM2_A ,I2C_SEL_3_0 ,SEL_PWM2_0 ), +PINMUX_IPSR_PHYS_MSEL (IP1_27_24 ,HTX3_D ,I2C_SEL_3_0 ,SEL_HSCIF3_3 ), +PINMUX_IPSR_PHYS_MSEL (IP1_27_24 ,IETX_B ,I2C_SEL_3_0 ,SEL_IEBUS_1 ), +PINMUX_IPSR_PHYS (IP1_27_24 ,SDA3 ,I2C_SEL_3_1 ),PINMUX_IPSR_GPSR (IP1_31_28 ,A0 ), PINMUX_IPSR_GPSR(IP1_31_28, LCDOUT16),
@@ -1116,13 +1124,15 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP11_15_12 ,NFDATA15_A ,SEL_NDFC_0 ),PINMUX_IPSR_MSEL (IP11_15_12 ,SDA2_B ,SEL_I2C2_1 ), -PINMUX_IPSR_GPSR (IP11_19_16 ,SD1_CD ), -PINMUX_IPSR_MSEL (IP11_19_16 ,NFRB_N_A ,SEL_NDFC_0 ), -PINMUX_IPSR_MSEL (IP11_19_16 ,SIM0_CLK_B ,SEL_SIMCARD_1 ), +PINMUX_IPSR_MSEL (IP11_19_16 ,SD1_CD ,I2C_SEL_0_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_19_16 ,NFRB_N_A ,I2C_SEL_0_0 ,SEL_NDFC_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_19_16 ,SIM0_CLK_B ,I2C_SEL_0_0 ,SEL_SIMCARD_1 ), +PINMUX_IPSR_PHYS (IP11_19_16 ,SCL0 ,I2C_SEL_0_1 ), -PINMUX_IPSR_GPSR (IP11_23_20 ,SD1_WP ), -PINMUX_IPSR_MSEL (IP11_23_20 ,NFCE_N_A ,SEL_NDFC_0 ), -PINMUX_IPSR_MSEL (IP11_23_20 ,SIM0_D_B ,SEL_SIMCARD_1 ), +PINMUX_IPSR_MSEL (IP11_23_20 ,SD1_WP ,I2C_SEL_0_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_23_20 ,NFCE_N_A ,I2C_SEL_0_0 ,SEL_NDFC_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_23_20 ,SIM0_D_B ,I2C_SEL_0_0 ,SEL_SIMCARD_1 ), +PINMUX_IPSR_PHYS (IP11_23_20 ,SDA0 ,I2C_SEL_0_1 ),PINMUX_IPSR_GPSR (IP11_27_24 ,SCK0 ), PINMUX_IPSR_MSEL(IP11_27_24, HSCK1_B, SEL_HSCIF1_1),
@@ -2348,6 +2358,15 @@ static const unsigned int hscif4_data_b_mux[] = { };/* - I2C -------------------------------------------------------------------- */ +static const unsigned int i2c0_pins[] = { +/* SCL, SDA */ +RCAR_GP_PIN (3 ,14 ),RCAR_GP_PIN (3 ,15 ), +}; + +static const unsigned int i2c0_mux[] = { +SCL0_MARK ,SDA0_MARK , +}; +static const unsigned int i2c1_a_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (5 ,11 ),RCAR_GP_PIN (5 ,10 ),
@@ -2376,6 +2395,25 @@ static const unsigned int i2c2_b_pins[] = {static const unsigned int i2c2_b_mux[] = {SDA2_B_MARK ,SCL2_B_MARK , }; + +static const unsigned int i2c3_pins[] = { +/* SCL, SDA */ +RCAR_GP_PIN (2 ,7 ),RCAR_GP_PIN (2 ,8 ), +}; + +static const unsigned int i2c3_mux[] = { +SCL3_MARK ,SDA3_MARK , +}; + +static const unsigned int i2c5_pins[] = { +/* SCL, SDA */ +RCAR_GP_PIN (2 ,13 ),RCAR_GP_PIN (2 ,14 ), +}; + +static const unsigned int i2c5_mux[] = { +SCL5_MARK ,SDA5_MARK , +}; +static const unsigned int i2c6_a_pins[] = {/* SDA, SCL */ RCAR_GP_PIN (1 ,8 ),RCAR_GP_PIN (1 ,11 ),
@@ -4125,7 +4163,7 @@ static const unsigned int vin5_clk_mux[] = { };static const struct { -struct sh_pfc_pin_group common[307 ]; +struct sh_pfc_pin_group common[310 ];struct sh_pfc_pin_group automotive[33 ]; } pinmux_groups = { .common = {
@@ -4198,10 +4236,13 @@ static const struct {SH_PFC_PIN_GROUP (hscif4_clk),SH_PFC_PIN_GROUP (hscif4_ctrl),SH_PFC_PIN_GROUP (hscif4_data_b), +SH_PFC_PIN_GROUP (i2c0),SH_PFC_PIN_GROUP (i2c1_a),SH_PFC_PIN_GROUP (i2c1_b),SH_PFC_PIN_GROUP (i2c2_a),SH_PFC_PIN_GROUP (i2c2_b), +SH_PFC_PIN_GROUP (i2c3), +SH_PFC_PIN_GROUP (i2c5),SH_PFC_PIN_GROUP (i2c6_a),SH_PFC_PIN_GROUP (i2c6_b), SH_PFC_PIN_GROUP(i2c6_c),
@@ -4630,6 +4671,10 @@ static const char * const hscif4_groups[] = { "hscif4_data_b", }; +static const char *const i2c0_groups[] = { +"i2c0" , +}; +static const char *const i2c1_groups[] = {"i2c1_a" ,"i2c1_b" ,
@@ -4640,6 +4685,14 @@ static const char * const i2c2_groups[] = { "i2c2_b", }; +static const char *const i2c3_groups[] = { +"i2c3" , +}; + +static const char *const i2c5_groups[] = { +"i2c5" , +}; +static const char *const i2c6_groups[] = {"i2c6_a" ,"i2c6_b" ,
@@ -4968,7 +5021,7 @@ static const char * const vin5_groups[] = { };static const struct { -struct sh_pfc_function common[45 ]; +struct sh_pfc_function common[48 ];struct sh_pfc_function automotive[6 ]; } pinmux_functions = { .common = {
@@ -4984,8 +5037,11 @@ static const struct {SH_PFC_FUNCTION (hscif2),SH_PFC_FUNCTION (hscif3),SH_PFC_FUNCTION (hscif4), +SH_PFC_FUNCTION (i2c0),SH_PFC_FUNCTION (i2c1),SH_PFC_FUNCTION (i2c2), +SH_PFC_FUNCTION (i2c3), +SH_PFC_FUNCTION (i2c5),SH_PFC_FUNCTION (i2c6),SH_PFC_FUNCTION (intc_ex), SH_PFC_FUNCTION(msiof0),
Signature · 1 line
2.7.4
PATCH v2 22/51 pinctrl: sh-pfc: r8a7796: Deduplicate VIN5 pin definitions
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 08b7e2112a9b19ccc583617cd81714d0e98b7e79 upstream.
Use union vin_data16 and VIN_DATA_PIN_GROUP() to reduce redundancies in pin definitions for the VIN5 channel.
This reduces kernel size by 240 bytes.
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 90 +++++++++++------------------------- 1 file changed, 26 insertions(+), 64 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +26 -64
@@ -4071,67 +4071,29 @@ static const unsigned int vin4_clk_mux[] = { };/* - VIN5 ------------------------------------------------------------------- */ -static const unsigned int vin5_data8_pins[] = { -RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), -RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), -RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), -RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), -}; -static const unsigned int vin5_data8_mux[] = { -VI5_DATA0_MARK ,VI5_DATA1_MARK , -VI5_DATA2_MARK ,VI5_DATA3_MARK , -VI5_DATA4_MARK ,VI5_DATA5_MARK , -VI5_DATA6_MARK ,VI5_DATA7_MARK , -}; -static const unsigned int vin5_data10_pins[] = { -RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), -RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), -RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), -RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), -RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,13 ), -}; -static const unsigned int vin5_data10_mux[] = { -VI5_DATA0_MARK ,VI5_DATA1_MARK , -VI5_DATA2_MARK ,VI5_DATA3_MARK , -VI5_DATA4_MARK ,VI5_DATA5_MARK , -VI5_DATA6_MARK ,VI5_DATA7_MARK , -VI5_DATA8_MARK ,VI5_DATA9_MARK , -}; -static const unsigned int vin5_data12_pins[] = { -RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), -RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), -RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), -RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), -RCAR_GP_PIN (1 ,12 ),RCAR_GP_PIN (1 ,13 ), -RCAR_GP_PIN (1 ,14 ),RCAR_GP_PIN (1 ,15 ), -}; -static const unsigned int vin5_data12_mux[] = { -VI5_DATA0_MARK ,VI5_DATA1_MARK , -VI5_DATA2_MARK ,VI5_DATA3_MARK , -VI5_DATA4_MARK ,VI5_DATA5_MARK , -VI5_DATA6_MARK ,VI5_DATA7_MARK , -VI5_DATA8_MARK ,VI5_DATA9_MARK , -VI5_DATA10_MARK ,VI5_DATA11_MARK , -}; -static const unsigned int vin5_data16_pins[] = { -RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), -RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), -RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), -RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), -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 union vin_data16 vin5_data_pins = { + .data16 = { +RCAR_GP_PIN (0 ,0 ),RCAR_GP_PIN (0 ,1 ), +RCAR_GP_PIN (0 ,2 ),RCAR_GP_PIN (0 ,3 ), +RCAR_GP_PIN (0 ,4 ),RCAR_GP_PIN (0 ,5 ), +RCAR_GP_PIN (0 ,6 ),RCAR_GP_PIN (0 ,7 ), +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_data16_mux[] = { -VI5_DATA0_MARK ,VI5_DATA1_MARK , -VI5_DATA2_MARK ,VI5_DATA3_MARK , -VI5_DATA4_MARK ,VI5_DATA5_MARK , -VI5_DATA6_MARK ,VI5_DATA7_MARK , -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 union vin_data16 vin5_data_mux = { + .data16 = { +VI5_DATA0_MARK ,VI5_DATA1_MARK , +VI5_DATA2_MARK ,VI5_DATA3_MARK , +VI5_DATA4_MARK ,VI5_DATA5_MARK , +VI5_DATA6_MARK ,VI5_DATA7_MARK , +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# */
@@ -4469,10 +4431,10 @@ static const struct {SH_PFC_PIN_GROUP (vin4_field),SH_PFC_PIN_GROUP (vin4_clkenb),SH_PFC_PIN_GROUP (vin4_clk), -SH_PFC_PIN_GROUP (vin5_data8), -SH_PFC_PIN_GROUP (vin5_data10), -SH_PFC_PIN_GROUP (vin5_data12), -SH_PFC_PIN_GROUP (vin5_data16), +VIN_DATA_PIN_GROUP (vin5_data,8 ), +VIN_DATA_PIN_GROUP (vin5_data,10 ), +VIN_DATA_PIN_GROUP (vin5_data,12 ), +VIN_DATA_PIN_GROUP (vin5_data,16 ),SH_PFC_PIN_GROUP (vin5_sync),SH_PFC_PIN_GROUP (vin5_field), SH_PFC_PIN_GROUP(vin5_clkenb),
Signature · 1 line
2.7.4
PATCH v2 23/51 pinctrl: sh-pfc: r8a7796: Move CANFD pin groups and functions
In reply to Fabrizio Castrocommit dcd24e098d8df8b4f85686c6be7673d4506c1888 upstream.
CANFD is found also on the R8A774A1, therefore move CANFD pin groups and functions to "common".
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +9 -9
@@ -4125,8 +4125,8 @@ static const unsigned int vin5_clk_mux[] = { };static const struct { -struct sh_pfc_pin_group common[310 ]; -struct sh_pfc_pin_group automotive[33 ]; +struct sh_pfc_pin_group common[313 ]; +struct sh_pfc_pin_group automotive[30 ]; } pinmux_groups = { .common = {SH_PFC_PIN_GROUP (audio_clk_a_a),
@@ -4161,6 +4161,9 @@ static const struct {SH_PFC_PIN_GROUP (can0_data_b),SH_PFC_PIN_GROUP (can1_data),SH_PFC_PIN_GROUP (can_clk), +SH_PFC_PIN_GROUP (canfd0_data_a), +SH_PFC_PIN_GROUP (canfd0_data_b), +SH_PFC_PIN_GROUP (canfd1_data),SH_PFC_PIN_GROUP (du_rgb666),SH_PFC_PIN_GROUP (du_rgb888), SH_PFC_PIN_GROUP(du_clk_out_0),
@@ -4441,9 +4444,6 @@ static const struct {SH_PFC_PIN_GROUP (vin5_clk), }, .automotive = { -SH_PFC_PIN_GROUP (canfd0_data_a), -SH_PFC_PIN_GROUP (canfd0_data_b), -SH_PFC_PIN_GROUP (canfd1_data),SH_PFC_PIN_GROUP (drif0_ctrl_a),SH_PFC_PIN_GROUP (drif0_data0_a),SH_PFC_PIN_GROUP (drif0_data1_a),
@@ -4983,8 +4983,8 @@ static const char * const vin5_groups[] = { };static const struct { -struct sh_pfc_function common[48 ]; -struct sh_pfc_function automotive[6 ]; +struct sh_pfc_function common[50 ]; +struct sh_pfc_function automotive[4 ]; } pinmux_functions = { .common = {SH_PFC_FUNCTION (audio_clk),
@@ -4992,6 +4992,8 @@ static const struct {SH_PFC_FUNCTION (can0),SH_PFC_FUNCTION (can1),SH_PFC_FUNCTION (can_clk), +SH_PFC_FUNCTION (canfd0), +SH_PFC_FUNCTION (canfd1),SH_PFC_FUNCTION (du),SH_PFC_FUNCTION (hdmi0), SH_PFC_FUNCTION(hscif0),
@@ -5037,8 +5039,6 @@ static const struct {SH_PFC_FUNCTION (vin5), }, .automotive = { -SH_PFC_FUNCTION (canfd0), -SH_PFC_FUNCTION (canfd1),SH_PFC_FUNCTION (drif0),SH_PFC_FUNCTION (drif1),SH_PFC_FUNCTION (drif2),
Signature · 1 line
2.7.4
PATCH v2 24/51 pinctrl: sh-pfc: r8a77990: Rename IOCTRLx registers
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 3df892fdbfe6919270a65a25c7982e2701c44f2b upstream.
The R-Car Gen3 HardWare Manual Errata for Rev. 1.00 (Jul 2, 2018) renamed the various miscellaneous I/O control registers (IOCTRLx) on R-Car E3, to reflect better their actual purposes, and matching other SoCs.
Update the code to match this.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +3 -3
@@ -4996,11 +4996,11 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { };enum ioctrl_regs { -IOCTRL30 , +POCCTRL0 , };static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = { - [IOCTRL30 ] = {0xe6060380 , }, + [POCCTRL0 ] = {0xe6060380 , }, {/* sentinel */ }, };
@@ -5009,7 +5009,7 @@ static int r8a77990_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, {int bit = -EINVAL ; - *pocctrl = pinmux_ioctrl_regs[IOCTRL30 ].reg; + *pocctrl = pinmux_ioctrl_regs[POCCTRL0 ].reg;if (pin >=RCAR_GP_PIN (3 ,0 ) && pin <=RCAR_GP_PIN (3 ,11 )) bit = pin &0x1f ;
Signature · 1 line
2.7.4
PATCH v2 25/51 pinctrl: sh-pfc: r8a77990: Move CANFD pin groups and functions
In reply to Fabrizio Castrocommit 2cee6cb290ab30f2f3a69866d24ca6cb64b1d7e8 upstream.
CANFD is found also on the R8A774C0, therefore move CANFD pin groups and functions to "common".
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +8 -8
@@ -3765,8 +3765,8 @@ static const unsigned int vin5_clk_b_mux[] = { };static const struct { -struct sh_pfc_pin_group common[245 ]; -struct sh_pfc_pin_group automotive[23 ]; +struct sh_pfc_pin_group common[247 ]; +struct sh_pfc_pin_group automotive[21 ]; } pinmux_groups = { .common = {SH_PFC_PIN_GROUP (audio_clk_a),
@@ -3797,6 +3797,8 @@ static const struct {SH_PFC_PIN_GROUP (can0_data),SH_PFC_PIN_GROUP (can1_data),SH_PFC_PIN_GROUP (can_clk), +SH_PFC_PIN_GROUP (canfd0_data), +SH_PFC_PIN_GROUP (canfd1_data),SH_PFC_PIN_GROUP (du_rgb666),SH_PFC_PIN_GROUP (du_rgb888), SH_PFC_PIN_GROUP(du_clk_in_0),
@@ -4016,8 +4018,6 @@ static const struct {SH_PFC_PIN_GROUP (vin5_clk_b), }, .automotive = { -SH_PFC_PIN_GROUP (canfd0_data), -SH_PFC_PIN_GROUP (canfd1_data),SH_PFC_PIN_GROUP (drif0_ctrl_a),SH_PFC_PIN_GROUP (drif0_data0_a),SH_PFC_PIN_GROUP (drif0_data1_a),
@@ -4464,8 +4464,8 @@ static const char * const vin5_groups[] = { };static const struct { -struct sh_pfc_function common[45 ]; -struct sh_pfc_function automotive[6 ]; +struct sh_pfc_function common[47 ]; +struct sh_pfc_function automotive[4 ]; } pinmux_functions = { .common = {SH_PFC_FUNCTION (audio_clk),
@@ -4473,6 +4473,8 @@ static const struct {SH_PFC_FUNCTION (can0),SH_PFC_FUNCTION (can1),SH_PFC_FUNCTION (can_clk), +SH_PFC_FUNCTION (canfd0), +SH_PFC_FUNCTION (canfd1),SH_PFC_FUNCTION (du),SH_PFC_FUNCTION (hscif0), SH_PFC_FUNCTION(hscif1),
@@ -4515,8 +4517,6 @@ static const struct {SH_PFC_FUNCTION (vin5), }, .automotive = { -SH_PFC_FUNCTION (canfd0), -SH_PFC_FUNCTION (canfd1),SH_PFC_FUNCTION (drif0),SH_PFC_FUNCTION (drif1),SH_PFC_FUNCTION (drif2),
Signature · 1 line
2.7.4
PATCH v2 26/51 pinctrl: sh-pfc: rcar-gen3: Retain TDSELCTRL register across suspend/resume
In reply to Fabrizio CastroFrom: Marek Vasut <[email protected]>
commit d92ee9cf8ec8d7fe1d7dbc4b3ee459419b1e5533 upstream.
The TDSELCTRL register is responsible for configuring the SDHI/MMC 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/pfc-r8a7796.c | 2 ++ drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 2 ++ 2 files changed, 4 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +2 -0
@@ -5859,10 +5859,12 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = {enum ioctrl_regs {POCCTRL , +TDSELCTRL , };static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = { [POCCTRL ] = {0xe6060380 , }, + [TDSELCTRL ] = {0xe60603c0 , }, {/* sentinel */ }, };
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +2 -0
@@ -4997,10 +4997,12 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {enum ioctrl_regs {POCCTRL0 , +TDSELCTRL , };static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = { [POCCTRL0 ] = {0xe6060380 , }, + [TDSELCTRL ] = {0xe60603c0 , }, {/* sentinel */ }, };
Signature · 1 line
2.7.4
PATCH v2 27/51 pinctrl: sh-pfc: Add missing #include <linux/errno.h>
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 2f9f5094f8b7a1da8852c4a50b205232e62d72dc upstream.
Source files using -Exxx error codes should include <linux/errno.h>. On ARM, this header file is included indirectly; on SuperH, it is not, leading to "error: ?EINVAL? undeclared" failures when enabling compile-testing later.
--- drivers/pinctrl/sh-pfc/pfc-r8a77470.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7794.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 1 + drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 1 + 12 files changed, 12 insertions(+)
drivers/pinctrl/sh-pfc/pfc-r8a77470.c +1 -0
@@ -5,6 +5,7 @@* Copyright (C) 2018 Renesas Electronics Corp. */ +#include <linux/errno.h> #include <linux/kernel.h> #include "sh_pfc.h"
drivers/pinctrl/sh-pfc/pfc-r8a7790.c +1 -0
@@ -21,6 +21,7 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/errno.h> #include <linux/io.h> #include <linux/kernel.h>
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -0
@@ -9,6 +9,7 @@* as published by the Free Software Foundation. */ +#include <linux/errno.h> #include <linux/kernel.h> #include "sh_pfc.h"
drivers/pinctrl/sh-pfc/pfc-r8a7794.c +1 -0
@@ -10,6 +10,7 @@* as published by the Free Software Foundation. */ +#include <linux/errno.h> #include <linux/kernel.h> #include "core.h"
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +1 -0
@@ -8,6 +8,7 @@* the Free Software Foundation; version 2 of the License. */ +#include <linux/errno.h> #include <linux/kernel.h> #include "core.h"
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +1 -0
@@ -8,6 +8,7 @@* the Free Software Foundation; version 2 of the License. */ +#include <linux/errno.h> #include <linux/kernel.h> #include <linux/sys_soc.h>
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +1 -0
@@ -14,6 +14,7 @@* the Free Software Foundation; version 2 of the License. */ +#include <linux/errno.h> #include <linux/kernel.h> #include "core.h"
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +1 -0
@@ -12,6 +12,7 @@* Copyright (C) 2015 Renesas Electronics Corporation */ +#include <linux/errno.h> #include <linux/kernel.h> #include "core.h"
drivers/pinctrl/sh-pfc/pfc-r8a77970.c +1 -0
@@ -15,6 +15,7 @@* the Free Software Foundation; version 2 of the License. */ +#include <linux/errno.h> #include <linux/io.h> #include <linux/kernel.h>
drivers/pinctrl/sh-pfc/pfc-r8a77980.c +1 -0
@@ -12,6 +12,7 @@* Copyright (C) 2015 Renesas Electronics Corporation */ +#include <linux/errno.h> #include <linux/io.h> #include <linux/kernel.h>
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +1 -0
@@ -11,6 +11,7 @@* Copyright (C) 2016-2017 Renesas Electronics Corp. */ +#include <linux/errno.h> #include <linux/kernel.h> #include "core.h"
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +1 -0
@@ -14,6 +14,7 @@* the Free Software Foundation; version 2 of the License. */ +#include <linux/errno.h> #include <linux/kernel.h> #include "core.h"
Signature · 1 line
2.7.4
PATCH v2 28/51 pinctrl: sh-pfc: rcar-gen3: Remove HDMI CEC pins, groups, and functions
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit 5671f8e0270ad5e33e3088e5f0fa71af67129630 upstream.
The HDMI CEC function is not supported by the R-Car Gen3 Hardware Manual Rev 1.00. Therefore, delete the corresponding pin groups and functions, and rename the HDMI[01]_CEC definitions to match their GPIO functionality.
--- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 44 ++++++-------------------------- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 44 ++++++-------------------------- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 27 +++++--------------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 8 +++--- 4 files changed, 26 insertions(+), 97 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +8 -36
@@ -200,8 +200,8 @@#define GPSR6_0 F_(SSI_SCK01239, IP13_23_20)/* GPSR7 */ -#define GPSR7_3 FM(HDMI1_CEC) -#define GPSR7_2 FM(HDMI0_CEC) +#define GPSR7_3 FM(GP7_03) +#define GPSR7_2 FM(GP7_02)#define GPSR7_1 FM(AVS2)#define GPSR7_0 FM(AVS1)
@@ -574,8 +574,8 @@ static const u16 pinmux_data[] = {PINMUX_SINGLE (AVS1 ),PINMUX_SINGLE (AVS2 ), -PINMUX_SINGLE (HDMI0_CEC ), -PINMUX_SINGLE (HDMI1_CEC ), +PINMUX_SINGLE (GP7_02 ), +PINMUX_SINGLE (GP7_03 ),PINMUX_SINGLE (I2C_SEL_0_1 ),PINMUX_SINGLE (I2C_SEL_3_1 ), PINMUX_SINGLE(I2C_SEL_5_1),
@@ -2066,22 +2066,6 @@ static const unsigned int du_disp_pins[] = {static const unsigned int du_disp_mux[] = {DU_DISP_MARK , }; -/* - HDMI ------------------------------------------------------------------- */ -static const unsigned int hdmi0_cec_pins[] = { -/* HDMI0_CEC */ -RCAR_GP_PIN (7 ,2 ), -}; -static const unsigned int hdmi0_cec_mux[] = { -HDMI0_CEC_MARK , -}; -static const unsigned int hdmi1_cec_pins[] = { -/* HDMI1_CEC */ -RCAR_GP_PIN (7 ,3 ), -}; -static const unsigned int hdmi1_cec_mux[] = { -HDMI1_CEC_MARK , -}; -/* - HSCIF0 ----------------------------------------------------------------- */ static const unsigned int hscif0_data_pins[] = {/* RX, TX */
@@ -3911,8 +3895,6 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {SH_PFC_PIN_GROUP (du_oddf),SH_PFC_PIN_GROUP (du_cde),SH_PFC_PIN_GROUP (du_disp), -SH_PFC_PIN_GROUP (hdmi0_cec), -SH_PFC_PIN_GROUP (hdmi1_cec),SH_PFC_PIN_GROUP (hscif0_data),SH_PFC_PIN_GROUP (hscif0_clk), SH_PFC_PIN_GROUP(hscif0_ctrl),
@@ -4263,14 +4245,6 @@ static const char * const du_groups[] = { "du_disp", }; -static const char *const hdmi0_groups[] = { -"hdmi0_cec" , -}; - -static const char *const hdmi1_groups[] = { -"hdmi1_cec" , -}; -static const char *const hscif0_groups[] = {"hscif0_data" ,"hscif0_clk" ,
@@ -4646,8 +4620,6 @@ static const struct sh_pfc_function pinmux_functions[] = {SH_PFC_FUNCTION (drif2),SH_PFC_FUNCTION (drif3),SH_PFC_FUNCTION (du), -SH_PFC_FUNCTION (hdmi0), -SH_PFC_FUNCTION (hdmi1),SH_PFC_FUNCTION (hscif0),SH_PFC_FUNCTION (hscif1), SH_PFC_FUNCTION(hscif2),
@@ -5363,8 +5335,8 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(0, 15), 24, 3 }, /* D15 */ { RCAR_GP_PIN(7, 0), 20, 3 }, /* AVS1 */ { RCAR_GP_PIN(7, 1), 16, 3 }, /* AVS2 */ - { RCAR_GP_PIN(7, 2), 12, 3 }, /* HDMI0_CEC */ - { RCAR_GP_PIN(7, 3), 8, 3 }, /* HDMI1_CEC */ + { RCAR_GP_PIN(7, 2), 12, 3 }, /* GP7_02 */ + { RCAR_GP_PIN(7, 3), 8, 3 }, /* GP7_03 */ { PIN_A_NUMBER('P', 7), 4, 2 }, /* DU_DOTCLKIN0 */ { PIN_A_NUMBER('P', 8), 0, 2 }, /* DU_DOTCLKIN1 */ } },
@@ -5619,8 +5591,8 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [25] = RCAR_GP_PIN(0, 15), /* D15 */ [26] = RCAR_GP_PIN(7, 0), /* AVS1 */ [27] = RCAR_GP_PIN(7, 1), /* AVS2 */ - [28] = RCAR_GP_PIN(7, 2), /* HDMI0_CEC */ - [29] = RCAR_GP_PIN(7, 3), /* HDMI1_CEC */ + [28] = RCAR_GP_PIN(7, 2), /* GP7_02 */ + [29] = RCAR_GP_PIN(7, 3), /* GP7_03 */ [30] = PIN_A_NUMBER('P', 7), /* DU_DOTCLKIN0 */ [31] = PIN_A_NUMBER('P', 8), /* DU_DOTCLKIN1 */ } },
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +8 -36
92 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +6 -21
@@ -208,7 +208,7 @@/* GPSR7 */ #define GPSR7_3 FM(GP7_03) -#define GPSR7_2 FM(HDMI0_CEC) +#define GPSR7_2 FM(GP7_02)#define GPSR7_1 FM(AVS2)#define GPSR7_0 FM(AVS1)
@@ -599,7 +599,7 @@ static const u16 pinmux_data[] = {PINMUX_SINGLE (AVS2 ),PINMUX_SINGLE (CLKOUT ),PINMUX_SINGLE (GP7_03 ), -PINMUX_SINGLE (HDMI0_CEC ), +PINMUX_SINGLE (GP7_02 ),PINMUX_SINGLE (MSIOF0_RXD ),PINMUX_SINGLE (MSIOF0_SCK ), PINMUX_SINGLE(MSIOF0_TXD),
@@ -2142,15 +2142,6 @@ static const unsigned int du_disp_mux[] = { DU_DISP_MARK, }; -/* - HDMI ------------------------------------------------------------------- */ -static const unsigned int hdmi0_cec_pins[] = { -/* HDMI0_CEC */ -RCAR_GP_PIN (7 ,2 ), -}; -static const unsigned int hdmi0_cec_mux[] = { -HDMI0_CEC_MARK , -}; -/* - HSCIF0 ----------------------------------------------------------------- */ static const unsigned int hscif0_data_pins[] = {/* RX, TX */
@@ -4126,7 +4117,7 @@ static const unsigned int vin5_clk_mux[] = { };static const struct { -struct sh_pfc_pin_group common[313 ]; +struct sh_pfc_pin_group common[312 ];struct sh_pfc_pin_group automotive[30 ]; } pinmux_groups = { .common = {
@@ -4173,7 +4164,6 @@ static const struct {SH_PFC_PIN_GROUP (du_oddf),SH_PFC_PIN_GROUP (du_cde),SH_PFC_PIN_GROUP (du_disp), -SH_PFC_PIN_GROUP (hdmi0_cec),SH_PFC_PIN_GROUP (hscif0_data),SH_PFC_PIN_GROUP (hscif0_clk), SH_PFC_PIN_GROUP(hscif0_ctrl),
@@ -4587,10 +4577,6 @@ static const char * const du_groups[] = { "du_disp", }; -static const char *const hdmi0_groups[] = { -"hdmi0_cec" , -}; -static const char *const hscif0_groups[] = {"hscif0_data" ,"hscif0_clk" ,
@@ -4984,7 +4970,7 @@ static const char * const vin5_groups[] = { };static const struct { -struct sh_pfc_function common[50 ]; +struct sh_pfc_function common[49 ];struct sh_pfc_function automotive[4 ]; } pinmux_functions = { .common = {
@@ -4996,7 +4982,6 @@ static const struct {SH_PFC_FUNCTION (canfd0),SH_PFC_FUNCTION (canfd1),SH_PFC_FUNCTION (du), -SH_PFC_FUNCTION (hdmi0),SH_PFC_FUNCTION (hscif0),SH_PFC_FUNCTION (hscif1), SH_PFC_FUNCTION(hscif2),
@@ -5726,7 +5711,7 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(0, 15), 24, 3 }, /* D15 */ { RCAR_GP_PIN(7, 0), 20, 3 }, /* AVS1 */ { RCAR_GP_PIN(7, 1), 16, 3 }, /* AVS2 */ - { RCAR_GP_PIN(7, 2), 12, 3 }, /* HDMI0_CEC */ + { RCAR_GP_PIN(7, 2), 12, 3 }, /* GP7_02 */ { RCAR_GP_PIN(7, 3), 8, 3 }, /* GP7_03 */ { PIN_A_NUMBER('P', 7), 4, 2 }, /* DU_DOTCLKIN0 */ { PIN_A_NUMBER('P', 8), 0, 2 }, /* DU_DOTCLKIN1 */
@@ -5982,7 +5967,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [25] = RCAR_GP_PIN(0, 15), /* D15 */ [26] = RCAR_GP_PIN(7, 0), /* AVS1 */ [27] = RCAR_GP_PIN(7, 1), /* AVS2 */ - [28] = RCAR_GP_PIN(7, 2), /* HDMI0_CEC */ + [28] = RCAR_GP_PIN(7, 2), /* GP7_02 */ [29] = RCAR_GP_PIN(7, 3), /* GP7_03 */ [30] = PIN_A_NUMBER('P', 7), /* DU_DOTCLKIN0 */ [31] = PIN_A_NUMBER('P', 8), /* DU_DOTCLKIN1 */
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +4 -4
@@ -206,7 +206,7 @@/* GPSR7 */ #define GPSR7_3 FM(GP7_03) -#define GPSR7_2 FM(HDMI0_CEC) +#define GPSR7_2 FM(GP7_02)#define GPSR7_1 FM(AVS2)#define GPSR7_0 FM(AVS1)
@@ -593,7 +593,7 @@ static const u16 pinmux_data[] = {PINMUX_SINGLE (AVS2 ),PINMUX_SINGLE (CLKOUT ),PINMUX_SINGLE (GP7_03 ), -PINMUX_SINGLE (HDMI0_CEC ), +PINMUX_SINGLE (GP7_02 ),PINMUX_SINGLE (MSIOF0_RXD ),PINMUX_SINGLE (MSIOF0_SCK ), PINMUX_SINGLE(MSIOF0_TXD),
@@ -4693,7 +4693,7 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(0, 15), 24, 3 }, /* D15 */ { RCAR_GP_PIN(7, 0), 20, 3 }, /* AVS1 */ { RCAR_GP_PIN(7, 1), 16, 3 }, /* AVS2 */ - { RCAR_GP_PIN(7, 2), 12, 3 }, /* HDMI0_CEC */ + { RCAR_GP_PIN(7, 2), 12, 3 }, /* GP7_02 */ { RCAR_GP_PIN(7, 3), 8, 3 }, /* GP7_03 */ { PIN_A_NUMBER('P', 7), 4, 2 }, /* DU_DOTCLKIN0 */ { PIN_A_NUMBER('P', 8), 0, 2 }, /* DU_DOTCLKIN1 */
@@ -4947,7 +4947,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [25] = RCAR_GP_PIN(0, 15), /* D15 */ [26] = RCAR_GP_PIN(7, 0), /* AVS1 */ [27] = RCAR_GP_PIN(7, 1), /* AVS2 */ - [28] = RCAR_GP_PIN(7, 2), /* HDMI0_CEC */ + [28] = RCAR_GP_PIN(7, 2), /* GP7_02 */ [29] = RCAR_GP_PIN(7, 3), /* GP7_03 */ [30] = PIN_A_NUMBER('P', 7), /* DU_DOTCLKIN0 */ [31] = PIN_A_NUMBER('P', 8), /* DU_DOTCLKIN1 */
Signature · 1 line
2.7.4
PATCH v2 29/51 pinctrl: sh-pfc: rcar-gen3: Remove CC5_OSCOUT pin
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit 662dc924a05e9dffd62f602c7111d6b7ada8fa88 upstream.
According to the R-Car Gen3 Hardware Manual Errata for Rev 1.00 of Jun 4, 2018, the CC5_OSCOUT pin is removed. Update the pin control drivers to reflect this.
--- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 3 +-- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 3 +-- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 3 +-- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 3 +-- drivers/pinctrl/sh-pfc/pfc-r8a77970.c | 3 +-- drivers/pinctrl/sh-pfc/pfc-r8a77980.c | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +1 -2
@@ -341,7 +341,7 @@#define IP15_23_20 FM(SSI_SDATA7) FM(HCTS2_N_B) FM(MSIOF1_RXD_C) F_(0, 0) F_(0, 0) FM(TS_SDEN1_A) FM(STP_ISEN_1_A) FM(RIF1_D0_A) FM(RIF3_D0_A) F_(0, 0) FM(TCLK2_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP15_27_24 FM(SSI_SDATA8) FM(HRTS2_N_B) FM(MSIOF1_TXD_C) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_A)FM(STP_ISSYNC_1_A) FM(RIF1_D1_A) FM(RIF3_D1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP15_31_28 FM(SSI_SDATA9_A) FM(HSCK2_B) FM(MSIOF1_SS1_C) FM(HSCK1_A) FM(SSI_WS1_B) FM(SCK1) FM(STP_IVCXO27_1_A) FM(SCK5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP16_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP16_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_7_4 FM(AUDIO_CLKB_B) FM(SCIF_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_IVCXO27_1_D) FM(REMOCON_A) F_(0, 0) F_(0, 0) FM(TCLK1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_11_8 FM(USB0_PWEN) F_(0, 0) F_(0, 0) FM(SIM0_RST_C) F_(0, 0) FM(TS_SCK1_D) FM(STP_ISCLK_1_D) FM(BPFCLK_B) FM(RIF3_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_15_12 FM(USB0_OVC) F_(0, 0) F_(0, 0) FM(SIM0_D_C) F_(0, 0) FM(TS_SDAT1_D) FM(STP_ISD_1_D) F_(0, 0) FM(RIF3_SYNC_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
@@ -1353,7 +1353,6 @@ static const u16 pinmux_data[] = {/* IPSR16 */ PINMUX_IPSR_MSEL (IP16_3_0 ,AUDIO_CLKA_A ,SEL_ADG_0 ), -PINMUX_IPSR_GPSR (IP16_3_0 ,CC5_OSCOUT ),PINMUX_IPSR_MSEL (IP16_7_4 ,AUDIO_CLKB_B ,SEL_ADG_1 ), PINMUX_IPSR_MSEL(IP16_7_4, SCIF_CLK_A, SEL_SCIF1_0),
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +1 -2
@@ -352,7 +352,7 @@#define IP16_23_20 FM(SSI_SDATA7) FM(HCTS2_N_B) FM(MSIOF1_RXD_C) F_(0, 0) F_(0, 0) FM(TS_SDEN1_A) FM(STP_ISEN_1_A) FM(RIF1_D0_A) FM(RIF3_D0_A) F_(0, 0) FM(TCLK2_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_27_24 FM(SSI_SDATA8) FM(HRTS2_N_B) FM(MSIOF1_TXD_C) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_A)FM(STP_ISSYNC_1_A) FM(RIF1_D1_A) FM(RIF3_D1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_31_28 FM(SSI_SDATA9_A) FM(HSCK2_B) FM(MSIOF1_SS1_C) FM(HSCK1_A) FM(SSI_WS1_B) FM(SCK1) FM(STP_IVCXO27_1_A) FM(SCK5_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP17_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP17_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP17_7_4 FM(AUDIO_CLKB_B) FM(SCIF_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_IVCXO27_1_D) FM(REMOCON_A) F_(0, 0) F_(0, 0) FM(TCLK1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP17_11_8 FM(USB0_PWEN) F_(0, 0) F_(0, 0) FM(SIM0_RST_C) F_(0, 0) FM(TS_SCK1_D) FM(STP_ISCLK_1_D) FM(BPFCLK_B) FM(RIF3_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HSCK2_C) F_(0, 0) F_(0, 0)#define IP17_15_12 FM(USB0_OVC) F_(0, 0) F_(0, 0) FM(SIM0_D_C) F_(0, 0) FM(TS_SDAT1_D) FM(STP_ISD_1_D) F_(0, 0) FM(RIF3_SYNC_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HRX2_C) F_(0, 0) F_(0, 0)
@@ -1404,7 +1404,6 @@ static const u16 pinmux_data[] = {/* IPSR17 */ PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADG_A_0 ), -PINMUX_IPSR_GPSR (IP17_3_0 ,CC5_OSCOUT ),PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADG_B_1 ), PINMUX_IPSR_MSEL(IP17_7_4, SCIF_CLK_A, SEL_SCIF_0),
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +1 -2
@@ -357,7 +357,7 @@#define IP16_23_20 FM(SSI_SDATA7) FM(HCTS2_N_B) FM(MSIOF1_RXD_C) F_(0, 0) F_(0, 0) FM(TS_SDEN1_A) FM(STP_ISEN_1_A) FM(RIF1_D0_A) FM(RIF3_D0_A) F_(0, 0) FM(TCLK2_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_27_24 FM(SSI_SDATA8) FM(HRTS2_N_B) FM(MSIOF1_TXD_C) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_A)FM(STP_ISSYNC_1_A) FM(RIF1_D1_A) FM(RIF3_D1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_31_28 FM(SSI_SDATA9_A) FM(HSCK2_B) FM(MSIOF1_SS1_C) FM(HSCK1_A) FM(SSI_WS1_B) FM(SCK1) FM(STP_IVCXO27_1_A) FM(SCK5_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP17_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP17_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP17_7_4 FM(AUDIO_CLKB_B) FM(SCIF_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_IVCXO27_1_D) FM(REMOCON_A) F_(0, 0) F_(0, 0) FM(TCLK1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP17_11_8 FM(USB0_PWEN) F_(0, 0) F_(0, 0) FM(SIM0_RST_C) F_(0, 0) FM(TS_SCK1_D) FM(STP_ISCLK_1_D) FM(BPFCLK_B) FM(RIF3_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HSCK2_C) F_(0, 0) F_(0, 0)#define IP17_15_12 FM(USB0_OVC) F_(0, 0) F_(0, 0) FM(SIM0_D_C) F_(0, 0) FM(TS_SDAT1_D) FM(STP_ISD_1_D) F_(0, 0) FM(RIF3_SYNC_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HRX2_C) F_(0, 0) F_(0, 0)
@@ -1415,7 +1415,6 @@ static const u16 pinmux_data[] = {/* IPSR17 */ PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADG_A_0 ), -PINMUX_IPSR_GPSR (IP17_3_0 ,CC5_OSCOUT ),PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADG_B_1 ), PINMUX_IPSR_MSEL(IP17_7_4, SCIF_CLK_A, SEL_SCIF_0),
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +1 -2
@@ -355,7 +355,7 @@#define IP16_23_20 FM(SSI_SDATA7) FM(HCTS2_N_B) FM(MSIOF1_RXD_C) F_(0, 0) F_(0, 0) FM(TS_SDEN1_A) FM(STP_ISEN_1_A) FM(RIF1_D0_A) FM(RIF3_D0_A) F_(0, 0) FM(TCLK2_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_27_24 FM(SSI_SDATA8) FM(HRTS2_N_B) FM(MSIOF1_TXD_C) F_(0, 0) F_(0, 0) FM(TS_SPSYNC1_A)FM(STP_ISSYNC_1_A) FM(RIF1_D1_A) FM(RIF3_D1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP16_31_28 FM(SSI_SDATA9_A) FM(HSCK2_B) FM(MSIOF1_SS1_C) FM(HSCK1_A) FM(SSI_WS1_B) FM(SCK1) FM(STP_IVCXO27_1_A) FM(SCK5_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP17_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP17_3_0 FM(AUDIO_CLKA_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP17_7_4 FM(AUDIO_CLKB_B) FM(SCIF_CLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(STP_IVCXO27_1_D) FM(REMOCON_A) F_(0, 0) F_(0, 0) FM(TCLK1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP17_11_8 FM(USB0_PWEN) F_(0, 0) F_(0, 0) FM(SIM0_RST_C) F_(0, 0) FM(TS_SCK1_D) FM(STP_ISCLK_1_D) FM(BPFCLK_B) FM(RIF3_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HSCK2_C) F_(0, 0) F_(0, 0)#define IP17_15_12 FM(USB0_OVC) F_(0, 0) F_(0, 0) FM(SIM0_D_C) F_(0, 0) FM(TS_SDAT1_D) FM(STP_ISD_1_D) F_(0, 0) FM(RIF3_SYNC_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(HRX2_C) F_(0, 0) F_(0, 0)
@@ -1407,7 +1407,6 @@ static const u16 pinmux_data[] = {/* IPSR17 */ PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADG_A_0 ), -PINMUX_IPSR_GPSR (IP17_3_0 ,CC5_OSCOUT ),PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADG_B_1 ), PINMUX_IPSR_MSEL(IP17_7_4, SCIF_CLK_A, SEL_SCIF_0),
drivers/pinctrl/sh-pfc/pfc-r8a77970.c +1 -2
@@ -175,7 +175,7 @@#define IP2_15_12 FM(DU_EXHSYNC_DU_HSYNC) FM(HRX0) F_(0, 0) FM(A19) FM(IRQ3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP2_19_16 FM(DU_EXVSYNC_DU_VSYNC) FM(MSIOF3_SCK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP2_23_20 FM(DU_EXODDF_DU_ODDF_DISP_CDE) FM(MSIOF3_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP2_27_24 FM(IRQ0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP2_27_24 FM(IRQ0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP2_31_28 FM(VI0_CLK) FM(MSIOF2_SCK) FM(SCK3) F_(0, 0) FM(HSCK3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_3_0 FM(VI0_CLKENB) FM(MSIOF2_RXD) FM(RX3) FM(RD_WR_N) FM(HCTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_7_4 FM(VI0_HSYNC_N) FM(MSIOF2_TXD) FM(TX3) F_(0, 0) FM(HRTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
@@ -474,7 +474,6 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP2_23_20 ,MSIOF3_SYNC ),PINMUX_IPSR_GPSR (IP2_27_24 ,IRQ0 ), -PINMUX_IPSR_GPSR (IP2_27_24 ,CC5_OSCOUT ),PINMUX_IPSR_GPSR (IP2_31_28 ,VI0_CLK ), PINMUX_IPSR_GPSR(IP2_31_28, MSIOF2_SCK),
drivers/pinctrl/sh-pfc/pfc-r8a77980.c +1 -2
@@ -205,7 +205,7 @@#define IP2_15_12 FM(DU_EXHSYNC_DU_HSYNC) FM(MSIOF3_SS2) FM(GETHER_PHY_INT_B) FM(A19) FM(FXR_TXENA_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP2_19_16 FM(DU_EXVSYNC_DU_VSYNC) FM(MSIOF3_SCK) F_(0, 0) F_(0, 0) FM(FXR_TXENB_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP2_23_20 FM(DU_EXODDF_DU_ODDF_DISP_CDE) FM(MSIOF3_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP2_27_24 FM(IRQ0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP2_27_24 FM(IRQ0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP2_31_28 FM(VI0_CLK) FM(MSIOF2_SCK) FM(SCK3) F_(0, 0) FM(HSCK3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_3_0 FM(VI0_CLKENB) FM(MSIOF2_RXD) FM(RX3) FM(RD_WR_N) FM(HCTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_7_4 FM(VI0_HSYNC_N) FM(MSIOF2_TXD) FM(TX3) F_(0, 0) FM(HRTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
@@ -555,7 +555,6 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP2_23_20 ,MSIOF3_SYNC ),PINMUX_IPSR_GPSR (IP2_27_24 ,IRQ0 ), -PINMUX_IPSR_GPSR (IP2_27_24 ,CC5_OSCOUT ),PINMUX_IPSR_GPSR (IP2_31_28 ,VI0_CLK ), PINMUX_IPSR_GPSR(IP2_31_28, MSIOF2_SCK),
Signature · 1 line
2.7.4
PATCH v2 30/51 pinctrl: sh-pfc: rcar-gen3: Rename SEL_ADG_{A, B, C} to SEL_ADG{A, B, C}
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit a040f3dec8eb7b11c2fd28762bd4f838da4d166b upstream.
According to the R-Car Gen3 Hardware Manual Errata for Rev 0.80 of Dec 22, 2017, and the Errata for Rev 1.50 of Dec 25, 2018, MOD_SEL0 register bits 3, 4, 17, and 18 are renamed from SEL_ADG_{A,B,C} to SEL_ADG{A,B,C}. Update the pin control drivers to reflect this.
--- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 22 +++++++++++----------- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 22 +++++++++++----------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 22 +++++++++++----------- 3 files changed, 33 insertions(+), 33 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +11 -11
@@ -1,7 +1,7 @@/* * R8A7795 ES2.0+ processor support - PFC hardware block. * -* Copyright (C) 2015-2017 Renesas Electronics Corporation +* Copyright (C) 2015-2019 Renesas Electronics Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -463,7 +463,7 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL0_9_8 FM(SEL_DRIF1_0) FM(SEL_DRIF1_1) FM(SEL_DRIF1_2) F_(0, 0)#define MOD_SEL0_7_6 FM(SEL_DRIF0_0) FM(SEL_DRIF0_1) FM(SEL_DRIF0_2) F_(0, 0)#define MOD_SEL0_5 FM(SEL_CANFD0_0) FM(SEL_CANFD0_1) -#define MOD_SEL0_4_3 FM(SEL_ADG_A_0) FM(SEL_ADG_A_1) FM(SEL_ADG_A_2) FM(SEL_ADG_A_3) +#define MOD_SEL0_4_3 FM(SEL_ADGA_0) FM(SEL_ADGA_1) FM(SEL_ADGA_2) FM(SEL_ADGA_3)/* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ #define MOD_SEL1_31_30 FM(SEL_TSIF1_0) FM(SEL_TSIF1_1) FM(SEL_TSIF1_2) FM(SEL_TSIF1_3)
@@ -499,8 +499,8 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL2_21 FM(SEL_SSI2_0) FM(SEL_SSI2_1)#define MOD_SEL2_20 FM(SEL_SSI9_0) FM(SEL_SSI9_1)#define MOD_SEL2_19 FM(SEL_TIMER_TMU2_0) FM(SEL_TIMER_TMU2_1) -#define MOD_SEL2_18 FM(SEL_ADG_B_0) FM(SEL_ADG_B_1) -#define MOD_SEL2_17 FM(SEL_ADG_C_0) FM(SEL_ADG_C_1) +#define MOD_SEL2_18 FM(SEL_ADGB_0) FM(SEL_ADGB_1) +#define MOD_SEL2_17 FM(SEL_ADGC_0) FM(SEL_ADGC_1)#define MOD_SEL2_0 FM(SEL_VIN4_0) FM(SEL_VIN4_1)#define PINMUX_MOD_SELS \
@@ -1124,7 +1124,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP11_27_24 ,SCK0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,HSCK1_B ,SEL_HSCIF1_1 ),PINMUX_IPSR_MSEL (IP11_27_24 ,MSIOF1_SS2_B ,SEL_MSIOF1_1 ), -PINMUX_IPSR_MSEL (IP11_27_24 ,AUDIO_CLKC_B ,SEL_ADG_C_1 ), +PINMUX_IPSR_MSEL (IP11_27_24 ,AUDIO_CLKC_B ,SEL_ADGC_1 ),PINMUX_IPSR_MSEL (IP11_27_24 ,SDA2_A ,SEL_I2C2_0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,SIM0_RST_B ,SEL_SIMCARD_1 ), PINMUX_IPSR_MSEL(IP11_27_24, STP_OPWM_0_C, SEL_SSP1_0_2),
@@ -1157,7 +1157,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP12_11_8 ,RTS0_N ),PINMUX_IPSR_MSEL (IP12_11_8 ,HRTS1_N_B ,SEL_HSCIF1_1 ),PINMUX_IPSR_MSEL (IP12_11_8 ,MSIOF1_SS1_B ,SEL_MSIOF1_1 ), -PINMUX_IPSR_MSEL (IP12_11_8 ,AUDIO_CLKA_B ,SEL_ADG_A_1 ), +PINMUX_IPSR_MSEL (IP12_11_8 ,AUDIO_CLKA_B ,SEL_ADGA_1 ),PINMUX_IPSR_MSEL (IP12_11_8 ,SCL2_A ,SEL_I2C2_0 ),PINMUX_IPSR_MSEL (IP12_11_8 ,STP_IVCXO27_1_C ,SEL_SSP1_1_2 ), PINMUX_IPSR_MSEL(IP12_11_8, RIF0_SYNC_B, SEL_DRIF0_1),
@@ -1216,7 +1216,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP13_11_8 ,HSCK0 ),PINMUX_IPSR_MSEL (IP13_11_8 ,MSIOF1_SCK_D ,SEL_MSIOF1_3 ), -PINMUX_IPSR_MSEL (IP13_11_8 ,AUDIO_CLKB_A ,SEL_ADG_B_0 ), +PINMUX_IPSR_MSEL (IP13_11_8 ,AUDIO_CLKB_A ,SEL_ADGB_0 ),PINMUX_IPSR_MSEL (IP13_11_8 ,SSI_SDATA1_B ,SEL_SSI1_1 ),PINMUX_IPSR_MSEL (IP13_11_8 ,TS_SCK0_D ,SEL_TSIF0_3 ), PINMUX_IPSR_MSEL(IP13_11_8, STP_ISCLK_0_D, SEL_SSP1_0_3),
@@ -1263,7 +1263,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP14_3_0 ,MSIOF0_SS1 ),PINMUX_IPSR_MSEL (IP14_3_0 ,RX5_A ,SEL_SCIF5_0 ),PINMUX_IPSR_GPSR (IP14_3_0 ,NFWP_N_A ), -PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADG_A_2 ), +PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADGA_2 ),PINMUX_IPSR_MSEL (IP14_3_0 ,SSI_SCK2_A ,SEL_SSI2_0 ),PINMUX_IPSR_MSEL (IP14_3_0 ,STP_IVCXO27_0_C ,SEL_SSP1_0_2 ), PINMUX_IPSR_GPSR(IP14_3_0, AUDIO_CLKOUT3_A),
@@ -1272,7 +1272,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP14_7_4 ,MSIOF0_SS2 ),PINMUX_IPSR_MSEL (IP14_7_4 ,TX5_A ,SEL_SCIF5_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,MSIOF1_SS2_D ,SEL_MSIOF1_3 ), -PINMUX_IPSR_MSEL (IP14_7_4 ,AUDIO_CLKC_A ,SEL_ADG_C_0 ), +PINMUX_IPSR_MSEL (IP14_7_4 ,AUDIO_CLKC_A ,SEL_ADGC_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,SSI_WS2_A ,SEL_SSI2_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,STP_OPWM_0_D ,SEL_SSP1_0_3 ), PINMUX_IPSR_GPSR(IP14_7_4, AUDIO_CLKOUT_D),
@@ -1403,9 +1403,9 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP16_31_28 ,SCK5_A ,SEL_SCIF5_0 ),/* IPSR17 */ -PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADG_A_0 ), +PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADGA_0 ), -PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADG_B_1 ), +PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADGB_1 ),PINMUX_IPSR_MSEL (IP17_7_4 ,SCIF_CLK_A ,SEL_SCIF_0 ),PINMUX_IPSR_MSEL (IP17_7_4 ,STP_IVCXO27_1_D ,SEL_SSP1_1_3 ), PINMUX_IPSR_MSEL(IP17_7_4, REMOCON_A, SEL_REMOCON_0),
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +11 -11
@@ -1,7 +1,7 @@/* * R8A7796 processor support - PFC hardware block. * -* Copyright (C) 2016-2017 Renesas Electronics Corp. +* Copyright (C) 2016-2019 Renesas Electronics Corp. * * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7795.c *
@@ -468,7 +468,7 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL0_9_8 FM(SEL_DRIF1_0) FM(SEL_DRIF1_1) FM(SEL_DRIF1_2) F_(0, 0)#define MOD_SEL0_7_6 FM(SEL_DRIF0_0) FM(SEL_DRIF0_1) FM(SEL_DRIF0_2) F_(0, 0)#define MOD_SEL0_5 FM(SEL_CANFD0_0) FM(SEL_CANFD0_1) -#define MOD_SEL0_4_3 FM(SEL_ADG_A_0) FM(SEL_ADG_A_1) FM(SEL_ADG_A_2) FM(SEL_ADG_A_3) +#define MOD_SEL0_4_3 FM(SEL_ADGA_0) FM(SEL_ADGA_1) FM(SEL_ADGA_2) FM(SEL_ADGA_3)/* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ #define MOD_SEL1_31_30 FM(SEL_TSIF1_0) FM(SEL_TSIF1_1) FM(SEL_TSIF1_2) FM(SEL_TSIF1_3)
@@ -505,8 +505,8 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL2_21 FM(SEL_SSI2_0) FM(SEL_SSI2_1)#define MOD_SEL2_20 FM(SEL_SSI9_0) FM(SEL_SSI9_1)#define MOD_SEL2_19 FM(SEL_TIMER_TMU2_0) FM(SEL_TIMER_TMU2_1) -#define MOD_SEL2_18 FM(SEL_ADG_B_0) FM(SEL_ADG_B_1) -#define MOD_SEL2_17 FM(SEL_ADG_C_0) FM(SEL_ADG_C_1) +#define MOD_SEL2_18 FM(SEL_ADGB_0) FM(SEL_ADGB_1) +#define MOD_SEL2_17 FM(SEL_ADGC_0) FM(SEL_ADGC_1)#define MOD_SEL2_0 FM(SEL_VIN4_0) FM(SEL_VIN4_1)#define PINMUX_MOD_SELS \
@@ -1138,7 +1138,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP11_27_24 ,SCK0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,HSCK1_B ,SEL_HSCIF1_1 ),PINMUX_IPSR_MSEL (IP11_27_24 ,MSIOF1_SS2_B ,SEL_MSIOF1_1 ), -PINMUX_IPSR_MSEL (IP11_27_24 ,AUDIO_CLKC_B ,SEL_ADG_C_1 ), +PINMUX_IPSR_MSEL (IP11_27_24 ,AUDIO_CLKC_B ,SEL_ADGC_1 ),PINMUX_IPSR_MSEL (IP11_27_24 ,SDA2_A ,SEL_I2C2_0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,SIM0_RST_B ,SEL_SIMCARD_1 ), PINMUX_IPSR_MSEL(IP11_27_24, STP_OPWM_0_C, SEL_SSP1_0_2),
@@ -1171,7 +1171,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP12_11_8 ,RTS0_N ),PINMUX_IPSR_MSEL (IP12_11_8 ,HRTS1_N_B ,SEL_HSCIF1_1 ),PINMUX_IPSR_MSEL (IP12_11_8 ,MSIOF1_SS1_B ,SEL_MSIOF1_1 ), -PINMUX_IPSR_MSEL (IP12_11_8 ,AUDIO_CLKA_B ,SEL_ADG_A_1 ), +PINMUX_IPSR_MSEL (IP12_11_8 ,AUDIO_CLKA_B ,SEL_ADGA_1 ),PINMUX_IPSR_MSEL (IP12_11_8 ,SCL2_A ,SEL_I2C2_0 ),PINMUX_IPSR_MSEL (IP12_11_8 ,STP_IVCXO27_1_C ,SEL_SSP1_1_2 ), PINMUX_IPSR_MSEL(IP12_11_8, RIF0_SYNC_B, SEL_DRIF0_1),
@@ -1230,7 +1230,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP13_11_8 ,HSCK0 ),PINMUX_IPSR_MSEL (IP13_11_8 ,MSIOF1_SCK_D ,SEL_MSIOF1_3 ), -PINMUX_IPSR_MSEL (IP13_11_8 ,AUDIO_CLKB_A ,SEL_ADG_B_0 ), +PINMUX_IPSR_MSEL (IP13_11_8 ,AUDIO_CLKB_A ,SEL_ADGB_0 ),PINMUX_IPSR_MSEL (IP13_11_8 ,SSI_SDATA1_B ,SEL_SSI1_1 ),PINMUX_IPSR_MSEL (IP13_11_8 ,TS_SCK0_D ,SEL_TSIF0_3 ), PINMUX_IPSR_MSEL(IP13_11_8, STP_ISCLK_0_D, SEL_SSP1_0_3),
@@ -1277,7 +1277,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP14_3_0 ,MSIOF0_SS1 ),PINMUX_IPSR_MSEL (IP14_3_0 ,RX5_A ,SEL_SCIF5_0 ),PINMUX_IPSR_MSEL (IP14_3_0 ,NFWP_N_A ,SEL_NDFC_0 ), -PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADG_A_2 ), +PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADGA_2 ),PINMUX_IPSR_MSEL (IP14_3_0 ,SSI_SCK2_A ,SEL_SSI2_0 ),PINMUX_IPSR_MSEL (IP14_3_0 ,STP_IVCXO27_0_C ,SEL_SSP1_0_2 ), PINMUX_IPSR_GPSR(IP14_3_0, AUDIO_CLKOUT3_A),
@@ -1286,7 +1286,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP14_7_4 ,MSIOF0_SS2 ),PINMUX_IPSR_MSEL (IP14_7_4 ,TX5_A ,SEL_SCIF5_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,MSIOF1_SS2_D ,SEL_MSIOF1_3 ), -PINMUX_IPSR_MSEL (IP14_7_4 ,AUDIO_CLKC_A ,SEL_ADG_C_0 ), +PINMUX_IPSR_MSEL (IP14_7_4 ,AUDIO_CLKC_A ,SEL_ADGC_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,SSI_WS2_A ,SEL_SSI2_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,STP_OPWM_0_D ,SEL_SSP1_0_3 ), PINMUX_IPSR_GPSR(IP14_7_4, AUDIO_CLKOUT_D),
@@ -1414,9 +1414,9 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP16_31_28 ,SCK5_A ,SEL_SCIF5_0 ),/* IPSR17 */ -PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADG_A_0 ), +PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADGA_0 ), -PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADG_B_1 ), +PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADGB_1 ),PINMUX_IPSR_MSEL (IP17_7_4 ,SCIF_CLK_A ,SEL_SCIF_0 ),PINMUX_IPSR_MSEL (IP17_7_4 ,STP_IVCXO27_1_D ,SEL_SSP1_1_3 ), PINMUX_IPSR_MSEL(IP17_7_4, REMOCON_A, SEL_REMOCON_0),
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +11 -11
@@ -3,7 +3,7 @@* R8A77965 processor support - PFC hardware block. * * Copyright (C) 2018 Jacopo Mondi <[email protected]> -* Copyright (C) 2016 Renesas Electronics Corp. +* Copyright (C) 2016-2019 Renesas Electronics Corp. * * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7796.c *
@@ -466,7 +466,7 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL0_9_8 FM(SEL_DRIF1_0) FM(SEL_DRIF1_1) FM(SEL_DRIF1_2) F_(0, 0)#define MOD_SEL0_7_6 FM(SEL_DRIF0_0) FM(SEL_DRIF0_1) FM(SEL_DRIF0_2) F_(0, 0)#define MOD_SEL0_5 FM(SEL_CANFD0_0) FM(SEL_CANFD0_1) -#define MOD_SEL0_4_3 FM(SEL_ADG_A_0) FM(SEL_ADG_A_1) FM(SEL_ADG_A_2) FM(SEL_ADG_A_3) +#define MOD_SEL0_4_3 FM(SEL_ADGA_0) FM(SEL_ADGA_1) FM(SEL_ADGA_2) FM(SEL_ADGA_3)/* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ #define MOD_SEL1_31_30 FM(SEL_TSIF1_0) FM(SEL_TSIF1_1) FM(SEL_TSIF1_2) FM(SEL_TSIF1_3)
@@ -503,8 +503,8 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL2_21 FM(SEL_SSI2_0) FM(SEL_SSI2_1)#define MOD_SEL2_20 FM(SEL_SSI9_0) FM(SEL_SSI9_1)#define MOD_SEL2_19 FM(SEL_TIMER_TMU2_0) FM(SEL_TIMER_TMU2_1) -#define MOD_SEL2_18 FM(SEL_ADG_B_0) FM(SEL_ADG_B_1) -#define MOD_SEL2_17 FM(SEL_ADG_C_0) FM(SEL_ADG_C_1) +#define MOD_SEL2_18 FM(SEL_ADGB_0) FM(SEL_ADGB_1) +#define MOD_SEL2_17 FM(SEL_ADGC_0) FM(SEL_ADGC_1)#define MOD_SEL2_0 FM(SEL_VIN4_0) FM(SEL_VIN4_1)#define PINMUX_MOD_SELS \
@@ -1129,7 +1129,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP11_27_24 ,SCK0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,HSCK1_B ,SEL_HSCIF1_1 ),PINMUX_IPSR_MSEL (IP11_27_24 ,MSIOF1_SS2_B ,SEL_MSIOF1_1 ), -PINMUX_IPSR_MSEL (IP11_27_24 ,AUDIO_CLKC_B ,SEL_ADG_C_1 ), +PINMUX_IPSR_MSEL (IP11_27_24 ,AUDIO_CLKC_B ,SEL_ADGC_1 ),PINMUX_IPSR_MSEL (IP11_27_24 ,SDA2_A ,SEL_I2C2_0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,SIM0_RST_B ,SEL_SIMCARD_1 ), PINMUX_IPSR_MSEL(IP11_27_24, STP_OPWM_0_C, SEL_SSP1_0_2),
@@ -1162,7 +1162,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP12_11_8 ,RTS0_N ),PINMUX_IPSR_MSEL (IP12_11_8 ,HRTS1_N_B ,SEL_HSCIF1_1 ),PINMUX_IPSR_MSEL (IP12_11_8 ,MSIOF1_SS1_B ,SEL_MSIOF1_1 ), -PINMUX_IPSR_MSEL (IP12_11_8 ,AUDIO_CLKA_B ,SEL_ADG_A_1 ), +PINMUX_IPSR_MSEL (IP12_11_8 ,AUDIO_CLKA_B ,SEL_ADGA_1 ),PINMUX_IPSR_MSEL (IP12_11_8 ,SCL2_A ,SEL_I2C2_0 ),PINMUX_IPSR_MSEL (IP12_11_8 ,STP_IVCXO27_1_C ,SEL_SSP1_1_2 ), PINMUX_IPSR_MSEL(IP12_11_8, RIF0_SYNC_B, SEL_DRIF0_1),
@@ -1221,7 +1221,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP13_11_8 ,HSCK0 ),PINMUX_IPSR_MSEL (IP13_11_8 ,MSIOF1_SCK_D ,SEL_MSIOF1_3 ), -PINMUX_IPSR_MSEL (IP13_11_8 ,AUDIO_CLKB_A ,SEL_ADG_B_0 ), +PINMUX_IPSR_MSEL (IP13_11_8 ,AUDIO_CLKB_A ,SEL_ADGB_0 ),PINMUX_IPSR_MSEL (IP13_11_8 ,SSI_SDATA1_B ,SEL_SSI1_1 ),PINMUX_IPSR_MSEL (IP13_11_8 ,TS_SCK0_D ,SEL_TSIF0_3 ), PINMUX_IPSR_MSEL(IP13_11_8, STP_ISCLK_0_D, SEL_SSP1_0_3),
@@ -1268,7 +1268,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP14_3_0 ,MSIOF0_SS1 ),PINMUX_IPSR_MSEL (IP14_3_0 ,RX5_A ,SEL_SCIF5_0 ),PINMUX_IPSR_MSEL (IP14_3_0 ,NFWP_N_A ,SEL_NDFC_0 ), -PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADG_A_2 ), +PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADGA_2 ),PINMUX_IPSR_MSEL (IP14_3_0 ,SSI_SCK2_A ,SEL_SSI2_0 ),PINMUX_IPSR_MSEL (IP14_3_0 ,STP_IVCXO27_0_C ,SEL_SSP1_0_2 ), PINMUX_IPSR_GPSR(IP14_3_0, AUDIO_CLKOUT3_A),
@@ -1277,7 +1277,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP14_7_4 ,MSIOF0_SS2 ),PINMUX_IPSR_MSEL (IP14_7_4 ,TX5_A ,SEL_SCIF5_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,MSIOF1_SS2_D ,SEL_MSIOF1_3 ), -PINMUX_IPSR_MSEL (IP14_7_4 ,AUDIO_CLKC_A ,SEL_ADG_C_0 ), +PINMUX_IPSR_MSEL (IP14_7_4 ,AUDIO_CLKC_A ,SEL_ADGC_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,SSI_WS2_A ,SEL_SSI2_0 ),PINMUX_IPSR_MSEL (IP14_7_4 ,STP_OPWM_0_D ,SEL_SSP1_0_3 ), PINMUX_IPSR_GPSR(IP14_7_4, AUDIO_CLKOUT_D),
@@ -1406,9 +1406,9 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP16_31_28 ,SCK5_A ,SEL_SCIF5_0 ),/* IPSR17 */ -PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADG_A_0 ), +PINMUX_IPSR_MSEL (IP17_3_0 ,AUDIO_CLKA_A ,SEL_ADGA_0 ), -PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADG_B_1 ), +PINMUX_IPSR_MSEL (IP17_7_4 ,AUDIO_CLKB_B ,SEL_ADGB_1 ),PINMUX_IPSR_MSEL (IP17_7_4 ,SCIF_CLK_A ,SEL_SCIF_0 ),PINMUX_IPSR_MSEL (IP17_7_4 ,STP_IVCXO27_1_D ,SEL_SSP1_1_3 ), PINMUX_IPSR_MSEL(IP17_7_4, REMOCON_A, SEL_REMOCON_0),
Signature · 1 line
2.7.4
PATCH v2 31/51 pinctrl: sh-pfc: r8a77990: Fix MOD_SEL0 bit16 when using NFALE and NFRB_N
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit 943ff71281c6ce44ca48ea1b08c55f1e63648d00 upstream.
According to the R-Car Gen3 Hardware Manual Errata for Rev 1.00 of Aug 24, 2018, the MOD_SEL0 bit16 must be set to 0 when the NFALE_A and NFRB_N_A pin functions are selected.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +2 -2
@@ -1037,7 +1037,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP10_23_20 ,NFCLE ),PINMUX_IPSR_GPSR (IP10_27_24 ,SD0_CD ), -PINMUX_IPSR_GPSR (IP10_27_24 ,NFALE_A ), +PINMUX_IPSR_MSEL (IP10_27_24 ,NFALE_A ,SEL_NDFC_0 ),PINMUX_IPSR_GPSR (IP10_27_24 ,SD3_CD ),PINMUX_IPSR_MSEL (IP10_27_24 ,RIF0_CLK_B ,SEL_DRIF0_1 ), PINMUX_IPSR_MSEL(IP10_27_24, SCL2_B, SEL_I2C2_1),
@@ -1046,7 +1046,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP10_27_24 ,TS_SCK0 ),PINMUX_IPSR_GPSR (IP10_31_28 ,SD0_WP ), -PINMUX_IPSR_GPSR (IP10_31_28 ,NFRB_N_A ), +PINMUX_IPSR_MSEL (IP10_31_28 ,NFRB_N_A ,SEL_NDFC_0 ),PINMUX_IPSR_GPSR (IP10_31_28 ,SD3_WP ),PINMUX_IPSR_MSEL (IP10_31_28 ,RIF0_D0_B ,SEL_DRIF0_1 ), PINMUX_IPSR_MSEL(IP10_31_28, SDA2_B, SEL_I2C2_1),
Signature · 1 line
2.7.4
PATCH v2 32/51 pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit31 when using SIM0_D
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit e167d723e1a472d252e5c4baf823b77ce5543b05 upstream.
According to the R-Car Gen3 Hardware Manual Errata for Rev 1.00 of Aug 24, 2018, there is no need to configure MOD_SEL1 bit31 when the SIM0_D_{A,B} pin function is selected.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +4 -5
@@ -429,7 +429,6 @@ FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM#define MOD_SEL0_1_0 REV4(FM(SEL_SPEED_PULSE_IF_0), FM(SEL_SPEED_PULSE_IF_1), FM(SEL_SPEED_PULSE_IF_2), F_(0, 0))/* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ -#define MOD_SEL1_31 FM(SEL_SIMCARD_0) FM(SEL_SIMCARD_1)#define MOD_SEL1_30 FM(SEL_SSI2_0) FM(SEL_SSI2_1)#define MOD_SEL1_29 FM(SEL_TIMER_TMU_0) FM(SEL_TIMER_TMU_1)#define MOD_SEL1_28 FM(SEL_USB_20_CH0_0) FM(SEL_USB_20_CH0_1)
@@ -451,7 +450,6 @@ FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM#define PINMUX_MOD_SELS \ \ - MOD_SEL1_31 \ MOD_SEL0_30_29 MOD_SEL1_30 \ MOD_SEL1_29 \ MOD_SEL0_28 MOD_SEL1_28 \
@@ -1180,7 +1178,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP13_19_16 ,RIF0_D1_A ,SEL_DRIF0_0 ),PINMUX_IPSR_MSEL (IP13_19_16 ,SDA1_B ,SEL_I2C1_1 ),PINMUX_IPSR_MSEL (IP13_19_16 ,TCLK2_B ,SEL_TIMER_TMU_1 ), -PINMUX_IPSR_MSEL (IP13_19_16 ,SIM0_D_A ,SEL_SIMCARD_0 ), +PINMUX_IPSR_GPSR (IP13_19_16 ,SIM0_D_A ),PINMUX_IPSR_GPSR (IP13_23_20 ,MLB_DAT ), PINMUX_IPSR_MSEL(IP13_23_20, TX0_B, SEL_SCIF0_1),
@@ -1248,7 +1246,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP15_15_12 ,TPU0TO2 ),PINMUX_IPSR_MSEL (IP15_15_12 ,SDA1_D ,SEL_I2C1_3 ),PINMUX_IPSR_MSEL (IP15_15_12 ,FSO_CFE_1_N_B ,SEL_FSO_1 ), -PINMUX_IPSR_MSEL (IP15_15_12 ,SIM0_D_B ,SEL_SIMCARD_1 ), +PINMUX_IPSR_GPSR (IP15_15_12 ,SIM0_D_B ),PINMUX_IPSR_GPSR (IP15_19_16 ,SSI_SDATA6 ), PINMUX_IPSR_MSEL(IP15_19_16, HRTS2_N_A, SEL_HSCIF2_0),
@@ -4969,7 +4967,8 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { GROUP(1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 4), GROUP( - MOD_SEL1_31 + /* RESERVED 31 */ + 0, 0, MOD_SEL1_30 MOD_SEL1_29 MOD_SEL1_28
Signature · 1 line
2.7.4
PATCH v2 33/51 pinctrl: sh-pfc: r8a77990: Fix MOD_SEL1 bit30 when using SSI_SCK2 and SSI_WS2
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit e87882eb9be10b2b9e28156922c2a47d877f5db4 upstream.
According to the R-Car Gen3 Hardware Manual Errata for Rev 1.00 of Aug 24, 2018, there is no need to configure MOD_SEL1 bit30 when the SSI_SCK2_{A,B} or SSI_WS2_{A,B} pin functions are selected.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +9 -11
@@ -429,7 +429,6 @@ FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM#define MOD_SEL0_1_0 REV4(FM(SEL_SPEED_PULSE_IF_0), FM(SEL_SPEED_PULSE_IF_1), FM(SEL_SPEED_PULSE_IF_2), F_(0, 0))/* MOD_SEL1 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ -#define MOD_SEL1_30 FM(SEL_SSI2_0) FM(SEL_SSI2_1)#define MOD_SEL1_29 FM(SEL_TIMER_TMU_0) FM(SEL_TIMER_TMU_1)#define MOD_SEL1_28 FM(SEL_USB_20_CH0_0) FM(SEL_USB_20_CH0_1)#define MOD_SEL1_26 FM(SEL_DRIF2_0) FM(SEL_DRIF2_1)
@@ -450,7 +449,7 @@ FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM#define PINMUX_MOD_SELS \ \ -MOD_SEL0_30_29 MOD_SEL1_30 \ +MOD_SEL0_30_29 \ MOD_SEL1_29 \ MOD_SEL0_28 MOD_SEL1_28 \ MOD_SEL0_27_26 \
@@ -1040,7 +1039,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP10_27_24 ,RIF0_CLK_B ,SEL_DRIF0_1 ),PINMUX_IPSR_MSEL (IP10_27_24 ,SCL2_B ,SEL_I2C2_1 ),PINMUX_IPSR_MSEL (IP10_27_24 ,TCLK1_A ,SEL_TIMER_TMU_0 ), -PINMUX_IPSR_MSEL (IP10_27_24 ,SSI_SCK2_B ,SEL_SSI2_1 ), +PINMUX_IPSR_GPSR (IP10_27_24 ,SSI_SCK2_B ),PINMUX_IPSR_GPSR (IP10_27_24 ,TS_SCK0 ), PINMUX_IPSR_GPSR(IP10_31_28, SD0_WP),
@@ -1049,7 +1048,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP10_31_28 ,RIF0_D0_B ,SEL_DRIF0_1 ),PINMUX_IPSR_MSEL (IP10_31_28 ,SDA2_B ,SEL_I2C2_1 ),PINMUX_IPSR_MSEL (IP10_31_28 ,TCLK2_A ,SEL_TIMER_TMU_0 ), -PINMUX_IPSR_MSEL (IP10_31_28 ,SSI_WS2_B ,SEL_SSI2_1 ), +PINMUX_IPSR_GPSR (IP10_31_28 ,SSI_WS2_B ), PINMUX_IPSR_GPSR(IP10_31_28, TS_SDAT0),/* IPSR11 */
@@ -1067,13 +1066,13 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP11_11_8 ,RX0_A ,SEL_SCIF0_0 ),PINMUX_IPSR_MSEL (IP11_11_8 ,HRX1_A ,SEL_HSCIF1_0 ), -PINMUX_IPSR_MSEL (IP11_11_8 ,SSI_SCK2_A ,SEL_SSI2_0 ), +PINMUX_IPSR_GPSR (IP11_11_8 ,SSI_SCK2_A ),PINMUX_IPSR_GPSR (IP11_11_8 ,RIF1_SYNC ),PINMUX_IPSR_GPSR (IP11_11_8 ,TS_SCK1 ),PINMUX_IPSR_MSEL (IP11_15_12 ,TX0_A ,SEL_SCIF0_0 ),PINMUX_IPSR_GPSR (IP11_15_12 ,HTX1_A ), -PINMUX_IPSR_MSEL (IP11_15_12 ,SSI_WS2_A ,SEL_SSI2_0 ), +PINMUX_IPSR_GPSR (IP11_15_12 ,SSI_WS2_A ),PINMUX_IPSR_GPSR (IP11_15_12 ,RIF1_D0 ), PINMUX_IPSR_GPSR(IP11_15_12, TS_SDAT1),
@@ -4964,12 +4963,11 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { MOD_SEL0_1_0 )) }, { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32, - GROUP(1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, - 1, 2, 2, 2, 1, 1, 2, 1, 4), + GROUP(2, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, + 2, 2, 2, 1, 1, 2, 1, 4), GROUP( - /* RESERVED 31 */ - 0, 0, - MOD_SEL1_30 + /* RESERVED 31, 30 */ + 0, 0, 0, 0, MOD_SEL1_29 MOD_SEL1_28 /* RESERVED 27 */
Signature · 1 line
2.7.4
PATCH v2 34/51 pinctrl: sh-pfc: rcar-gen3: Rename RTS{0, 1, 3, 4}# pin function definitions
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit 624a7a12cc0cc776c9c82347ffe5ddce7218eeca upstream.
According to the R-Car Gen3 Hardware Manual Errata for Rev 1.50 of Feb 12, 2019, the RTS{0,1,3,4}_#/TANS pin names defined in the GPSR and IPSR registers are renamed to RTS{0,1,3,4}_#.
This patch updates the pin control drivers to reflect this.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +18 -18
@@ -2,7 +2,7 @@/* * R8A77990 processor support - PFC hardware block. * -* Copyright (C) 2018 Renesas Electronics Corp. +* Copyright (C) 2018-2019 Renesas Electronics Corp. * * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7796.c *
@@ -165,7 +165,7 @@#define GPSR5_7 F_(SCK2_A, IP12_7_4)#define GPSR5_6 F_(TX1, IP12_3_0)#define GPSR5_5 F_(RX1, IP11_31_28) -#define GPSR5_4 F_(RTS0_N_TANS_A, IP11_23_20) +#define GPSR5_4 F_(RTS0_N_A, IP11_23_20)#define GPSR5_3 F_(CTS0_N_A, IP11_19_16)#define GPSR5_2 F_(TX0_A, IP11_15_12)#define GPSR5_1 F_(RX0_A, IP11_11_8)
@@ -219,7 +219,7 @@#define IP3_3_0 FM(A1) FM(IRQ1) FM(PWM3_A) FM(DU_DOTCLKIN1) FM(VI5_DATA0_A) FM(DU_DISP_CDE) FM(SDA6_B) FM(IETX) FM(QCPV_QDE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_7_4 FM(A2) FM(IRQ2) FM(AVB_AVTP_PPS) FM(VI4_CLKENB) FM(VI5_DATA1_A) FM(DU_DISP) FM(SCL6_B) F_(0, 0) FM(QSTVB_QVE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_11_8 FM(A3) FM(CTS4_N_A) FM(PWM4_A) FM(VI4_DATA12) F_(0, 0) FM(DU_DOTCLKOUT0) FM(HTX3_D) FM(IECLK) FM(LCDOUT12) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP3_15_12 FM(A4) FM(RTS4_N_TANS_A) FM(MSIOF3_SYNC_B) FM(VI4_DATA8) FM(PWM2_B) FM(DU_DG4) FM(RIF2_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP3_15_12 FM(A4) FM(RTS4_N_A) FM(MSIOF3_SYNC_B) FM(VI4_DATA8) FM(PWM2_B) FM(DU_DG4) FM(RIF2_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_19_16 FM(A5) FM(SCK4_A) FM(MSIOF3_SCK_B) FM(VI4_DATA9) FM(PWM3_B) F_(0, 0) FM(RIF2_SYNC_B) F_(0, 0) FM(QPOLA) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_23_20 FM(A6) FM(RX4_A) FM(MSIOF3_RXD_B) FM(VI4_DATA10) F_(0, 0) F_(0, 0) FM(RIF2_D0_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP3_27_24 FM(A7) FM(TX4_A) FM(MSIOF3_TXD_B) FM(VI4_DATA11) F_(0, 0) F_(0, 0) FM(RIF2_D1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
@@ -240,10 +240,10 @@#define IP5_15_12 FM(CS0_N) FM(SCL5) F_(0, 0) F_(0, 0) F_(0, 0) FM(DU_DR0) FM(VI4_DATA2_B) F_(0, 0) FM(LCDOUT16) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP5_19_16 FM(WE0_N) FM(SDA5) F_(0, 0) F_(0, 0) F_(0, 0) FM(DU_DR1) FM(VI4_DATA3_B) F_(0, 0) FM(LCDOUT17) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP5_23_20 FM(D0) FM(MSIOF3_SCK_A) F_(0, 0) F_(0, 0) F_(0, 0) FM(DU_DR2) FM(CTS4_N_C) F_(0, 0) FM(LCDOUT18) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP5_27_24 FM(D1) FM(MSIOF3_SYNC_A) FM(SCK3_A) FM(VI4_DATA23) FM(VI5_CLKENB_A) FM(DU_DB7) FM(RTS4_N_TANS_C) F_(0, 0) FM(LCDOUT7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP5_27_24 FM(D1) FM(MSIOF3_SYNC_A) FM(SCK3_A) FM(VI4_DATA23) FM(VI5_CLKENB_A) FM(DU_DB7) FM(RTS4_N_C) F_(0, 0) FM(LCDOUT7) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP5_31_28 FM(D2) FM(MSIOF3_RXD_A) FM(RX5_C) F_(0, 0) FM(VI5_DATA14_A) FM(DU_DR3) FM(RX4_C) F_(0, 0) FM(LCDOUT19) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP6_3_0 FM(D3) FM(MSIOF3_TXD_A) FM(TX5_C) F_(0, 0) FM(VI5_DATA15_A) FM(DU_DR4) FM(TX4_C) F_(0, 0) FM(LCDOUT20) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP6_7_4 FM(D4) FM(CANFD1_TX) FM(HSCK3_B) FM(CAN1_TX) FM(RTS3_N_TANS_A) FM(MSIOF3_SS2_A) F_(0, 0) FM(VI5_DATA1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP6_7_4 FM(D4) FM(CANFD1_TX) FM(HSCK3_B) FM(CAN1_TX) FM(RTS3_N_A) FM(MSIOF3_SS2_A) F_(0, 0) FM(VI5_DATA1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP6_11_8 FM(D5) FM(RX3_A) FM(HRX3_B) F_(0, 0) F_(0, 0) FM(DU_DR5) FM(VI4_DATA4_B) F_(0, 0) FM(LCDOUT21) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP6_15_12 FM(D6) FM(TX3_A) FM(HTX3_B) F_(0, 0) F_(0, 0) FM(DU_DR6) FM(VI4_DATA5_B) F_(0, 0) FM(LCDOUT22) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP6_19_16 FM(D7) FM(CANFD1_RX) FM(IRQ5) FM(CAN1_RX) FM(CTS3_N_A) F_(0, 0) F_(0, 0) FM(VI5_DATA2_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
@@ -289,8 +289,8 @@#define IP11_11_8 FM(RX0_A) FM(HRX1_A) FM(SSI_SCK2_A) FM(RIF1_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SCK1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP11_15_12 FM(TX0_A) FM(HTX1_A) FM(SSI_WS2_A) FM(RIF1_D0) F_(0, 0) F_(0, 0) F_(0, 0) FM(TS_SDAT1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP11_19_16 FM(CTS0_N_A) FM(NFDATA14_A) FM(AUDIO_CLKOUT_A) FM(RIF1_D1) FM(SCIF_CLK_A) FM(FMCLK_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP11_23_20 FM(RTS0_N_TANS_A) FM(NFDATA15_A) FM(AUDIO_CLKOUT1_A) FM(RIF1_CLK) FM(SCL2_A) FM(FMIN_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define IP11_27_24 FM(SCK0_A) FM(HSCK1_A) FM(USB3HS0_ID) FM(RTS1_N_TANS) FM(SDA2_A) FM(FMCLK_C) F_(0, 0) F_(0, 0) FM(USB0_ID) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP11_23_20 FM(RTS0_N_A) FM(NFDATA15_A) FM(AUDIO_CLKOUT1_A) FM(RIF1_CLK) FM(SCL2_A) FM(FMIN_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) +#define IP11_27_24 FM(SCK0_A) FM(HSCK1_A) FM(USB3HS0_ID) FM(RTS1_N) FM(SDA2_A) FM(FMCLK_C) F_(0, 0) F_(0, 0) FM(USB0_ID) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)#define IP11_31_28 FM(RX1) FM(HRX2_B) FM(SSI_SCK9_B) FM(AUDIO_CLKOUT1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)/* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 */ /* 7 */ /* 8 */ /* 9 - F */
@@ -668,7 +668,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP3_11_8 ,LCDOUT12 ),PINMUX_IPSR_GPSR (IP3_15_12 ,A4 ), -PINMUX_IPSR_MSEL (IP3_15_12 ,RTS4_N_TANS_A ,SEL_SCIF4_0 ), +PINMUX_IPSR_MSEL (IP3_15_12 ,RTS4_N_A ,SEL_SCIF4_0 ),PINMUX_IPSR_MSEL (IP3_15_12 ,MSIOF3_SYNC_B ,SEL_MSIOF3_1 ),PINMUX_IPSR_GPSR (IP3_15_12 ,VI4_DATA8 ), PINMUX_IPSR_MSEL(IP3_15_12, PWM2_B, SEL_PWM2_1),
@@ -818,7 +818,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP5_27_24 ,VI4_DATA23 ),PINMUX_IPSR_MSEL (IP5_27_24 ,VI5_CLKENB_A ,SEL_VIN5_0 ),PINMUX_IPSR_GPSR (IP5_27_24 ,DU_DB7 ), -PINMUX_IPSR_MSEL (IP5_27_24 ,RTS4_N_TANS_C ,SEL_SCIF4_2 ), +PINMUX_IPSR_MSEL (IP5_27_24 ,RTS4_N_C ,SEL_SCIF4_2 ),PINMUX_IPSR_GPSR (IP5_27_24 ,LCDOUT7 ), PINMUX_IPSR_GPSR(IP5_31_28, D2),
@@ -842,7 +842,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP6_7_4 ,CANFD1_TX ),PINMUX_IPSR_MSEL (IP6_7_4 ,HSCK3_B ,SEL_HSCIF3_1 ),PINMUX_IPSR_GPSR (IP6_7_4 ,CAN1_TX ), -PINMUX_IPSR_MSEL (IP6_7_4 ,RTS3_N_TANS_A ,SEL_SCIF3_0 ), +PINMUX_IPSR_MSEL (IP6_7_4 ,RTS3_N_A ,SEL_SCIF3_0 ),PINMUX_IPSR_GPSR (IP6_7_4 ,MSIOF3_SS2_A ), PINMUX_IPSR_MSEL(IP6_7_4, VI5_DATA1_B, SEL_VIN5_1),
@@ -1083,7 +1083,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP11_19_16 ,SCIF_CLK_A ,SEL_SCIF_0 ),PINMUX_IPSR_MSEL (IP11_19_16 ,FMCLK_A ,SEL_FM_0 ), -PINMUX_IPSR_MSEL (IP11_23_20 ,RTS0_N_TANS_A ,SEL_SCIF0_0 ), +PINMUX_IPSR_MSEL (IP11_23_20 ,RTS0_N_A ,SEL_SCIF0_0 ),PINMUX_IPSR_MSEL (IP11_23_20 ,NFDATA15_A ,SEL_NDFC_0 ),PINMUX_IPSR_GPSR (IP11_23_20 ,AUDIO_CLKOUT1_A ), PINMUX_IPSR_GPSR(IP11_23_20, RIF1_CLK),
@@ -1093,7 +1093,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP11_27_24 ,SCK0_A ,SEL_SCIF0_0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,HSCK1_A ,SEL_HSCIF1_0 ),PINMUX_IPSR_GPSR (IP11_27_24 ,USB3HS0_ID ), -PINMUX_IPSR_GPSR (IP11_27_24 ,RTS1_N_TANS ), +PINMUX_IPSR_GPSR (IP11_27_24 ,RTS1_N ),PINMUX_IPSR_MSEL (IP11_27_24 ,SDA2_A ,SEL_I2C2_0 ),PINMUX_IPSR_MSEL (IP11_27_24 ,FMCLK_C ,SEL_FM_2 ), PINMUX_IPSR_GPSR(IP11_27_24, USB0_ID),
@@ -2836,7 +2836,7 @@ static const unsigned int scif0_ctrl_a_pins[] = { };static const unsigned int scif0_ctrl_a_mux[] = { -RTS0_N_TANS_A_MARK ,CTS0_N_A_MARK , +RTS0_N_A_MARK ,CTS0_N_A_MARK , };static const unsigned int scif0_data_b_pins[] = {
@@ -2882,7 +2882,7 @@ static const unsigned int scif1_ctrl_pins[] = { };static const unsigned int scif1_ctrl_mux[] = { -RTS1_N_TANS_MARK ,CTS1_N_MARK , +RTS1_N_MARK ,CTS1_N_MARK , };/* - SCIF2 ------------------------------------------------------------------ */
@@ -2938,7 +2938,7 @@ static const unsigned int scif3_ctrl_a_pins[] = { };static const unsigned int scif3_ctrl_a_mux[] = { -RTS3_N_TANS_A_MARK ,CTS3_N_A_MARK , +RTS3_N_A_MARK ,CTS3_N_A_MARK , };static const unsigned int scif3_data_b_pins[] = {
@@ -2993,7 +2993,7 @@ static const unsigned int scif4_ctrl_a_pins[] = { };static const unsigned int scif4_ctrl_a_mux[] = { -RTS4_N_TANS_A_MARK ,CTS4_N_A_MARK , +RTS4_N_A_MARK ,CTS4_N_A_MARK , };static const unsigned int scif4_data_b_pins[] = {
@@ -3029,7 +3029,7 @@ static const unsigned int scif4_ctrl_c_pins[] = { };static const unsigned int scif4_ctrl_c_mux[] = { -RTS4_N_TANS_C_MARK ,CTS4_N_C_MARK , +RTS4_N_C_MARK ,CTS4_N_C_MARK , };/* - SCIF5 ------------------------------------------------------------------ */
@@ -5125,7 +5125,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { } }, { PINMUX_BIAS_REG("PUEN3", 0xe606040c, "PUD3", 0xe606044c) { [0] = RCAR_GP_PIN(5, 0), /* SCK0_A */ - [1] = RCAR_GP_PIN(5, 4), /* RTS0#/TANS_A */ + [1] = RCAR_GP_PIN(5, 4), /* RTS0#_A */ [2] = RCAR_GP_PIN(5, 3), /* CTS0#_A */ [3] = RCAR_GP_PIN(5, 2), /* TX0_A */ [4] = RCAR_GP_PIN(5, 1), /* RX0_A */
Signature · 1 line
2.7.4
PATCH v2 35/51 pinctrl: sh-pfc: rcar-gen3: Rename SEL_NDFC to SEL_NDF
In reply to Fabrizio CastroFrom: Takeshi Kihara <[email protected]>
commit e551122cdb7fcb9a0fef3c22cf3dfbb34626bafc upstream.
According to the R-Car Gen3 Hardware Manual Errata for Rev 1.50 of Feb 12, 2019, the sel_ndfc MOD_SEL register bit is renamed to sel_ndf.
Update the pin control drivers to reflect this.
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 22 +++++++++++----------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 22 +++++++++++----------- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 26 +++++++++++++------------- 3 files changed, 35 insertions(+), 35 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +11 -11
@@ -501,7 +501,7 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL2_28_27 FM(SEL_FM_0) FM(SEL_FM_1) FM(SEL_FM_2) FM(SEL_FM_3)#define MOD_SEL2_26 FM(SEL_SCIF5_0) FM(SEL_SCIF5_1)#define MOD_SEL2_25_24_23 FM(SEL_I2C6_0) FM(SEL_I2C6_1) FM(SEL_I2C6_2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define MOD_SEL2_22 FM(SEL_NDFC_0) FM(SEL_NDFC_1) +#define MOD_SEL2_22 FM(SEL_NDF_0) FM(SEL_NDF_1)#define MOD_SEL2_21 FM(SEL_SSI2_0) FM(SEL_SSI2_1)#define MOD_SEL2_20 FM(SEL_SSI9_0) FM(SEL_SSI9_1)#define MOD_SEL2_19 FM(SEL_TIMER_TMU2_0) FM(SEL_TIMER_TMU2_1)
@@ -1023,35 +1023,35 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP8_15_12 ,SD1_CMD ),PINMUX_IPSR_MSEL (IP8_15_12 ,MSIOF1_SYNC_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_15_12 ,NFCE_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_15_12 ,NFCE_N_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_15_12 ,SIM0_D_A ,SEL_SIMCARD_0 ),PINMUX_IPSR_MSEL (IP8_15_12 ,STP_IVCXO27_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_19_16 ,SD1_DAT0 ),PINMUX_IPSR_GPSR (IP8_19_16 ,SD2_DAT4 ),PINMUX_IPSR_MSEL (IP8_19_16 ,MSIOF1_RXD_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_19_16 ,NFWP_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_19_16 ,NFWP_N_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_19_16 ,TS_SCK1_B ,SEL_TSIF1_1 ),PINMUX_IPSR_MSEL (IP8_19_16 ,STP_ISCLK_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_23_20 ,SD1_DAT1 ),PINMUX_IPSR_GPSR (IP8_23_20 ,SD2_DAT5 ),PINMUX_IPSR_MSEL (IP8_23_20 ,MSIOF1_TXD_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_23_20 ,NFDATA14_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_23_20 ,NFDATA14_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_23_20 ,TS_SPSYNC1_B ,SEL_TSIF1_1 ),PINMUX_IPSR_MSEL (IP8_23_20 ,STP_ISSYNC_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_27_24 ,SD1_DAT2 ),PINMUX_IPSR_GPSR (IP8_27_24 ,SD2_DAT6 ),PINMUX_IPSR_MSEL (IP8_27_24 ,MSIOF1_SS1_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_27_24 ,NFDATA15_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_27_24 ,NFDATA15_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_27_24 ,TS_SDAT1_B ,SEL_TSIF1_1 ),PINMUX_IPSR_MSEL (IP8_27_24 ,STP_ISD_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_31_28 ,SD1_DAT3 ),PINMUX_IPSR_GPSR (IP8_31_28 ,SD2_DAT7 ),PINMUX_IPSR_MSEL (IP8_31_28 ,MSIOF1_SS2_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_31_28 ,NFRB_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_31_28 ,NFRB_N_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_31_28 ,TS_SDEN1_B ,SEL_TSIF1_1 ), PINMUX_IPSR_MSEL(IP8_31_28, STP_ISEN_1_B, SEL_SSP1_1_1),
@@ -1117,21 +1117,21 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP11_7_4 ,NFCLE ),PINMUX_IPSR_GPSR (IP11_11_8 ,SD0_CD ), -PINMUX_IPSR_MSEL (IP11_11_8 ,NFDATA14_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_11_8 ,NFDATA14_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP11_11_8 ,SCL2_B ,SEL_I2C2_1 ),PINMUX_IPSR_MSEL (IP11_11_8 ,SIM0_RST_A ,SEL_SIMCARD_0 ),PINMUX_IPSR_GPSR (IP11_15_12 ,SD0_WP ), -PINMUX_IPSR_MSEL (IP11_15_12 ,NFDATA15_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_15_12 ,NFDATA15_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP11_15_12 ,SDA2_B ,SEL_I2C2_1 ),PINMUX_IPSR_MSEL (IP11_19_16 ,SD1_CD ,I2C_SEL_0_0 ), -PINMUX_IPSR_PHYS_MSEL (IP11_19_16 ,NFRB_N_A ,I2C_SEL_0_0 ,SEL_NDFC_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_19_16 ,NFRB_N_A ,I2C_SEL_0_0 ,SEL_NDF_0 ),PINMUX_IPSR_PHYS_MSEL (IP11_19_16 ,SIM0_CLK_B ,I2C_SEL_0_0 ,SEL_SIMCARD_1 ),PINMUX_IPSR_PHYS (IP11_19_16 ,SCL0 ,I2C_SEL_0_1 ),PINMUX_IPSR_MSEL (IP11_23_20 ,SD1_WP ,I2C_SEL_0_0 ), -PINMUX_IPSR_PHYS_MSEL (IP11_23_20 ,NFCE_N_A ,I2C_SEL_0_0 ,SEL_NDFC_0 ), +PINMUX_IPSR_PHYS_MSEL (IP11_23_20 ,NFCE_N_A ,I2C_SEL_0_0 ,SEL_NDF_0 ),PINMUX_IPSR_PHYS_MSEL (IP11_23_20 ,SIM0_D_B ,I2C_SEL_0_0 ,SEL_SIMCARD_1 ), PINMUX_IPSR_PHYS(IP11_23_20, SDA0, I2C_SEL_0_1),
@@ -1276,7 +1276,7 @@ static const u16 pinmux_data[] = {/* IPSR14 */ PINMUX_IPSR_GPSR (IP14_3_0 ,MSIOF0_SS1 ),PINMUX_IPSR_MSEL (IP14_3_0 ,RX5_A ,SEL_SCIF5_0 ), -PINMUX_IPSR_MSEL (IP14_3_0 ,NFWP_N_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP14_3_0 ,NFWP_N_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADGA_2 ),PINMUX_IPSR_MSEL (IP14_3_0 ,SSI_SCK2_A ,SEL_SSI2_0 ), PINMUX_IPSR_MSEL(IP14_3_0, STP_IVCXO27_0_C, SEL_SSP1_0_2),
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +11 -11
@@ -499,7 +499,7 @@ FM(IP16_31_28) IP16_31_28 FM(IP17_31_28) IP17_31_28#define MOD_SEL2_28_27 FM(SEL_FM_0) FM(SEL_FM_1) FM(SEL_FM_2) FM(SEL_FM_3)#define MOD_SEL2_26 FM(SEL_SCIF5_0) FM(SEL_SCIF5_1)#define MOD_SEL2_25_24_23 FM(SEL_I2C6_0) FM(SEL_I2C6_1) FM(SEL_I2C6_2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) -#define MOD_SEL2_22 FM(SEL_NDFC_0) FM(SEL_NDFC_1) +#define MOD_SEL2_22 FM(SEL_NDF_0) FM(SEL_NDF_1)#define MOD_SEL2_21 FM(SEL_SSI2_0) FM(SEL_SSI2_1)#define MOD_SEL2_20 FM(SEL_SSI9_0) FM(SEL_SSI9_1)#define MOD_SEL2_19 FM(SEL_TIMER_TMU2_0) FM(SEL_TIMER_TMU2_1)
@@ -1015,35 +1015,35 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP8_15_12 ,SD1_CMD ),PINMUX_IPSR_MSEL (IP8_15_12 ,MSIOF1_SYNC_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_15_12 ,NFCE_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_15_12 ,NFCE_N_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_15_12 ,SIM0_D_A ,SEL_SIMCARD_0 ),PINMUX_IPSR_MSEL (IP8_15_12 ,STP_IVCXO27_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_19_16 ,SD1_DAT0 ),PINMUX_IPSR_GPSR (IP8_19_16 ,SD2_DAT4 ),PINMUX_IPSR_MSEL (IP8_19_16 ,MSIOF1_RXD_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_19_16 ,NFWP_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_19_16 ,NFWP_N_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_19_16 ,TS_SCK1_B ,SEL_TSIF1_1 ),PINMUX_IPSR_MSEL (IP8_19_16 ,STP_ISCLK_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_23_20 ,SD1_DAT1 ),PINMUX_IPSR_GPSR (IP8_23_20 ,SD2_DAT5 ),PINMUX_IPSR_MSEL (IP8_23_20 ,MSIOF1_TXD_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_23_20 ,NFDATA14_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_23_20 ,NFDATA14_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_23_20 ,TS_SPSYNC1_B ,SEL_TSIF1_1 ),PINMUX_IPSR_MSEL (IP8_23_20 ,STP_ISSYNC_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_27_24 ,SD1_DAT2 ),PINMUX_IPSR_GPSR (IP8_27_24 ,SD2_DAT6 ),PINMUX_IPSR_MSEL (IP8_27_24 ,MSIOF1_SS1_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_27_24 ,NFDATA15_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_27_24 ,NFDATA15_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_27_24 ,TS_SDAT1_B ,SEL_TSIF1_1 ),PINMUX_IPSR_MSEL (IP8_27_24 ,STP_ISD_1_B ,SEL_SSP1_1_1 ),PINMUX_IPSR_GPSR (IP8_31_28 ,SD1_DAT3 ),PINMUX_IPSR_GPSR (IP8_31_28 ,SD2_DAT7 ),PINMUX_IPSR_MSEL (IP8_31_28 ,MSIOF1_SS2_G ,SEL_MSIOF1_6 ), -PINMUX_IPSR_MSEL (IP8_31_28 ,NFRB_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_31_28 ,NFRB_N_B ,SEL_NDF_1 ),PINMUX_IPSR_MSEL (IP8_31_28 ,TS_SDEN1_B ,SEL_TSIF1_1 ), PINMUX_IPSR_MSEL(IP8_31_28, STP_ISEN_1_B, SEL_SSP1_1_1),
@@ -1110,20 +1110,20 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP11_7_4 ,NFCLE ),PINMUX_IPSR_GPSR (IP11_11_8 ,SD0_CD ), -PINMUX_IPSR_MSEL (IP11_11_8 ,NFDATA14_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_11_8 ,NFDATA14_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP11_11_8 ,SCL2_B ,SEL_I2C2_1 ),PINMUX_IPSR_MSEL (IP11_11_8 ,SIM0_RST_A ,SEL_SIMCARD_0 ),PINMUX_IPSR_GPSR (IP11_15_12 ,SD0_WP ), -PINMUX_IPSR_MSEL (IP11_15_12 ,NFDATA15_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_15_12 ,NFDATA15_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP11_15_12 ,SDA2_B ,SEL_I2C2_1 ),PINMUX_IPSR_GPSR (IP11_19_16 ,SD1_CD ), -PINMUX_IPSR_MSEL (IP11_19_16 ,NFRB_N_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_19_16 ,NFRB_N_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP11_19_16 ,SIM0_CLK_B ,SEL_SIMCARD_1 ),PINMUX_IPSR_GPSR (IP11_23_20 ,SD1_WP ), -PINMUX_IPSR_MSEL (IP11_23_20 ,NFCE_N_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_23_20 ,NFCE_N_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP11_23_20 ,SIM0_D_B ,SEL_SIMCARD_1 ), PINMUX_IPSR_GPSR(IP11_27_24, SCK0),
@@ -1267,7 +1267,7 @@ static const u16 pinmux_data[] = {/* IPSR14 */ PINMUX_IPSR_GPSR (IP14_3_0 ,MSIOF0_SS1 ),PINMUX_IPSR_MSEL (IP14_3_0 ,RX5_A ,SEL_SCIF5_0 ), -PINMUX_IPSR_MSEL (IP14_3_0 ,NFWP_N_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP14_3_0 ,NFWP_N_A ,SEL_NDF_0 ),PINMUX_IPSR_MSEL (IP14_3_0 ,AUDIO_CLKA_C ,SEL_ADGA_2 ),PINMUX_IPSR_MSEL (IP14_3_0 ,SSI_SCK2_A ,SEL_SSI2_0 ), PINMUX_IPSR_MSEL(IP14_3_0, STP_IVCXO27_0_C, SEL_SSP1_0_2),
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +13 -13
@@ -414,7 +414,7 @@ FM(IP12_31_28) IP12_31_28 FM(IP13_31_28) IP13_31_28 FM(IP14_31_28) IP14_31_28 FM#define MOD_SEL0_22 FM(SEL_HSCIF2_0) FM(SEL_HSCIF2_1)#define MOD_SEL0_21_20 REV4(FM(SEL_I2C1_0), FM(SEL_I2C1_1), FM(SEL_I2C1_2), FM(SEL_I2C1_3))#define MOD_SEL0_19_18_17 REV8(FM(SEL_I2C2_0), FM(SEL_I2C2_1), FM(SEL_I2C2_2), FM(SEL_I2C2_3), FM(SEL_I2C2_4), F_(0, 0), F_(0, 0), F_(0, 0)) -#define MOD_SEL0_16 FM(SEL_NDFC_0) FM(SEL_NDFC_1) +#define MOD_SEL0_16 FM(SEL_NDF_0) FM(SEL_NDF_1)#define MOD_SEL0_15 FM(SEL_PWM0_0) FM(SEL_PWM0_1)#define MOD_SEL0_14 FM(SEL_PWM1_0) FM(SEL_PWM1_1)#define MOD_SEL0_13_12 REV4(FM(SEL_PWM2_0), FM(SEL_PWM2_1), FM(SEL_PWM2_2), F_(0, 0))
@@ -981,23 +981,23 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP8_19_16 ,REMOCON_C ,SEL_REMOCON_2 ),PINMUX_IPSR_GPSR (IP8_23_20 ,SD1_CLK ), -PINMUX_IPSR_MSEL (IP8_23_20 ,NFDATA14_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_23_20 ,NFDATA14_B ,SEL_NDF_1 ),PINMUX_IPSR_GPSR (IP8_27_24 ,SD1_CMD ), -PINMUX_IPSR_MSEL (IP8_27_24 ,NFDATA15_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_27_24 ,NFDATA15_B ,SEL_NDF_1 ),PINMUX_IPSR_GPSR (IP8_31_28 ,SD1_DAT0 ), -PINMUX_IPSR_MSEL (IP8_31_28 ,NFWP_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP8_31_28 ,NFWP_N_B ,SEL_NDF_1 ),/* IPSR9 */ PINMUX_IPSR_GPSR (IP9_3_0 ,SD1_DAT1 ), -PINMUX_IPSR_MSEL (IP9_3_0 ,NFCE_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP9_3_0 ,NFCE_N_B ,SEL_NDF_1 ),PINMUX_IPSR_GPSR (IP9_7_4 ,SD1_DAT2 ), -PINMUX_IPSR_MSEL (IP9_7_4 ,NFALE_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP9_7_4 ,NFALE_B ,SEL_NDF_1 ),PINMUX_IPSR_GPSR (IP9_11_8 ,SD1_DAT3 ), -PINMUX_IPSR_MSEL (IP9_11_8 ,NFRB_N_B ,SEL_NDFC_1 ), +PINMUX_IPSR_MSEL (IP9_11_8 ,NFRB_N_B ,SEL_NDF_1 ),PINMUX_IPSR_GPSR (IP9_15_12 ,SD3_CLK ), PINMUX_IPSR_GPSR(IP9_15_12, NFWE_N),
@@ -1034,7 +1034,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP10_23_20 ,NFCLE ),PINMUX_IPSR_GPSR (IP10_27_24 ,SD0_CD ), -PINMUX_IPSR_MSEL (IP10_27_24 ,NFALE_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP10_27_24 ,NFALE_A ,SEL_NDF_0 ),PINMUX_IPSR_GPSR (IP10_27_24 ,SD3_CD ),PINMUX_IPSR_MSEL (IP10_27_24 ,RIF0_CLK_B ,SEL_DRIF0_1 ), PINMUX_IPSR_MSEL(IP10_27_24, SCL2_B, SEL_I2C2_1),
@@ -1043,7 +1043,7 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP10_27_24 ,TS_SCK0 ),PINMUX_IPSR_GPSR (IP10_31_28 ,SD0_WP ), -PINMUX_IPSR_MSEL (IP10_31_28 ,NFRB_N_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP10_31_28 ,NFRB_N_A ,SEL_NDF_0 ),PINMUX_IPSR_GPSR (IP10_31_28 ,SD3_WP ),PINMUX_IPSR_MSEL (IP10_31_28 ,RIF0_D0_B ,SEL_DRIF0_1 ), PINMUX_IPSR_MSEL(IP10_31_28, SDA2_B, SEL_I2C2_1),
@@ -1053,13 +1053,13 @@ static const u16 pinmux_data[] = {/* IPSR11 */ PINMUX_IPSR_GPSR (IP11_3_0 ,SD1_CD ), -PINMUX_IPSR_MSEL (IP11_3_0 ,NFCE_N_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_3_0 ,NFCE_N_A ,SEL_NDF_0 ),PINMUX_IPSR_GPSR (IP11_3_0 ,SSI_SCK1 ),PINMUX_IPSR_MSEL (IP11_3_0 ,RIF0_D1_B ,SEL_DRIF0_1 ),PINMUX_IPSR_GPSR (IP11_3_0 ,TS_SDEN0 ),PINMUX_IPSR_GPSR (IP11_7_4 ,SD1_WP ), -PINMUX_IPSR_MSEL (IP11_7_4 ,NFWP_N_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_7_4 ,NFWP_N_A ,SEL_NDF_0 ),PINMUX_IPSR_GPSR (IP11_7_4 ,SSI_WS1 ),PINMUX_IPSR_MSEL (IP11_7_4 ,RIF0_SYNC_B ,SEL_DRIF0_1 ), PINMUX_IPSR_GPSR(IP11_7_4, TS_SPSYNC0),
@@ -1077,14 +1077,14 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_GPSR (IP11_15_12 ,TS_SDAT1 ),PINMUX_IPSR_MSEL (IP11_19_16 ,CTS0_N_A ,SEL_SCIF0_0 ), -PINMUX_IPSR_MSEL (IP11_19_16 ,NFDATA14_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_19_16 ,NFDATA14_A ,SEL_NDF_0 ),PINMUX_IPSR_GPSR (IP11_19_16 ,AUDIO_CLKOUT_A ),PINMUX_IPSR_GPSR (IP11_19_16 ,RIF1_D1 ),PINMUX_IPSR_MSEL (IP11_19_16 ,SCIF_CLK_A ,SEL_SCIF_0 ),PINMUX_IPSR_MSEL (IP11_19_16 ,FMCLK_A ,SEL_FM_0 ),PINMUX_IPSR_MSEL (IP11_23_20 ,RTS0_N_A ,SEL_SCIF0_0 ), -PINMUX_IPSR_MSEL (IP11_23_20 ,NFDATA15_A ,SEL_NDFC_0 ), +PINMUX_IPSR_MSEL (IP11_23_20 ,NFDATA15_A ,SEL_NDF_0 ),PINMUX_IPSR_GPSR (IP11_23_20 ,AUDIO_CLKOUT1_A ),PINMUX_IPSR_GPSR (IP11_23_20 ,RIF1_CLK ), PINMUX_IPSR_MSEL(IP11_23_20, SCL2_A, SEL_I2C2_0),
Signature · 1 line
2.7.4
PATCH v2 36/51 pinctrl: sh-pfc: Add PORT_GP_27 helper macro
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit fbc5108d93fff92e76c41a59fe07062be84dc720 upstream.
This follows the style of the existing PORT_GP_X macros, and will be used by a follow-up patch for the r8a7778 SoC.
--- drivers/pinctrl/sh-pfc/sh_pfc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/sh_pfc.h +6 -2
@@ -546,9 +546,13 @@ extern const struct sh_pfc_soc_info shx3_pinmux_info; PORT_GP_CFG_1(bank, 25, fn, sfx, cfg)#define PORT_GP_26 (bank, fn, sfx) PORT_GP_CFG_26(bank, fn, sfx, 0) -#define PORT_GP_CFG_28 (bank, fn, sfx, cfg) \ +#define PORT_GP_CFG_27 (bank, fn, sfx, cfg) \ PORT_GP_CFG_26(bank, fn, sfx, cfg), \ - PORT_GP_CFG_1(bank, 26, fn, sfx, cfg), \ + PORT_GP_CFG_1(bank, 26, fn, sfx, cfg) +#define PORT_GP_27 (bank, fn, sfx) PORT_GP_CFG_27(bank, fn, sfx, 0) + +#define PORT_GP_CFG_28 (bank, fn, sfx, cfg) \ + PORT_GP_CFG_27(bank, fn, sfx, cfg), \ PORT_GP_CFG_1(bank, 27, fn, sfx, cfg)#define PORT_GP_28 (bank, fn, sfx) PORT_GP_CFG_28(bank, fn, sfx, 0)
Signature · 1 line
2.7.4
PATCH v2 37/51 pinctrl: sh-pfc: Move PIN_NONE to shared header file
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 4d1816cd6724dccc8e918f7181d2bd6a6ffb31b5 upstream.
Several drivers have identical definitions for PIN_NONE. Provide a definition with a SH_PFC_ prefix for general use in sh_pfc.h, and convert all drivers over to use it.
--- drivers/pinctrl/sh-pfc/pfc-r8a7778.c | 76 +++++++++++++-------------- drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 53 ++++++++++--------- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 53 ++++++++++--------- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 55 ++++++++++---------- drivers/pinctrl/sh-pfc/pfc-r8a77965.c | 55 ++++++++++---------- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 89 ++++++++++++++++---------------- drivers/pinctrl/sh-pfc/sh_pfc.h | 2 + 7 files changed, 189 insertions(+), 194 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7778.c +37 -39
@@ -2929,8 +2929,6 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = { { }, }; -#define PIN_NONE U16_MAX - static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUPR0", 0x100, "N/A", 0) { [ 0] = RCAR_GP_PIN(0, 6), /* A0 */
@@ -2977,28 +2975,28 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [ 7] = RCAR_GP_PIN(1, 10), /* DACK0 */ [ 8] = RCAR_GP_PIN(1, 12), /* IRQ0 */ [ 9] = RCAR_GP_PIN(1, 13), /* IRQ1 */ - [10] = PIN_NONE, - [11] = PIN_NONE, - [12] = PIN_NONE, - [13] = PIN_NONE, - [14] = PIN_NONE, - [15] = PIN_NONE, - [16] = PIN_NONE, - [17] = PIN_NONE, - [18] = PIN_NONE, - [19] = PIN_NONE, - [20] = PIN_NONE, - [21] = PIN_NONE, - [22] = PIN_NONE, - [23] = PIN_NONE, - [24] = PIN_NONE, - [25] = PIN_NONE, - [26] = PIN_NONE, - [27] = PIN_NONE, - [28] = PIN_NONE, - [29] = PIN_NONE, - [30] = PIN_NONE, - [31 ] =PIN_NONE , + [10] = SH_PFC_PIN_NONE, + [11] = SH_PFC_PIN_NONE, + [12] = SH_PFC_PIN_NONE, + [13] = SH_PFC_PIN_NONE, + [14] = SH_PFC_PIN_NONE, + [15] = SH_PFC_PIN_NONE, + [16] = SH_PFC_PIN_NONE, + [17] = SH_PFC_PIN_NONE, + [18] = SH_PFC_PIN_NONE, + [19] = SH_PFC_PIN_NONE, + [20] = SH_PFC_PIN_NONE, + [21] = SH_PFC_PIN_NONE, + [22] = SH_PFC_PIN_NONE, + [23] = SH_PFC_PIN_NONE, + [24] = SH_PFC_PIN_NONE, + [25] = SH_PFC_PIN_NONE, + [26] = SH_PFC_PIN_NONE, + [27] = SH_PFC_PIN_NONE, + [28] = SH_PFC_PIN_NONE, + [29] = SH_PFC_PIN_NONE, + [30] = SH_PFC_PIN_NONE, + [31 ] =SH_PFC_PIN_NONE , } }, { PINMUX_BIAS_REG("PUPR2", 0x108, "N/A", 0) { [ 0] = RCAR_GP_PIN(1, 22), /* DU0_DR0 */
@@ -3120,21 +3118,21 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [14] = RCAR_GP_PIN(4, 20), /* ETH_MAGIC */ [15] = RCAR_GP_PIN(4, 25), /* AVS1 */ [16] = RCAR_GP_PIN(4, 26), /* AVS2 */ - [17] = PIN_NONE, - [18] = PIN_NONE, - [19] = PIN_NONE, - [20] = PIN_NONE, - [21] = PIN_NONE, - [22] = PIN_NONE, - [23] = PIN_NONE, - [24] = PIN_NONE, - [25] = PIN_NONE, - [26] = PIN_NONE, - [27] = PIN_NONE, - [28] = PIN_NONE, - [29] = PIN_NONE, - [30] = PIN_NONE, - [31] = PIN_NONE, + [17] = SH_PFC_PIN_NONE, + [18] = SH_PFC_PIN_NONE, + [19] = SH_PFC_PIN_NONE, + [20] = SH_PFC_PIN_NONE, + [21] = SH_PFC_PIN_NONE, + [22] = SH_PFC_PIN_NONE, + [23] = SH_PFC_PIN_NONE, + [24] = SH_PFC_PIN_NONE, + [25] = SH_PFC_PIN_NONE, + [26] = SH_PFC_PIN_NONE, + [27] = SH_PFC_PIN_NONE, + [28] = SH_PFC_PIN_NONE, + [29] = SH_PFC_PIN_NONE, + [30] = SH_PFC_PIN_NONE, + [31] = SH_PFC_PIN_NONE, } }, { /* sentinel */ }, };
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c +26 -27
71 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7795.c +26 -27
71 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +27 -28
79 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a77965.c +27 -28
79 lines not on this page · raw message
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +44 -45
126 lines not on this page · raw message
drivers/pinctrl/sh-pfc/sh_pfc.h +2 -0
@@ -24,6 +24,8 @@ enum { PINMUX_TYPE_INPUT, }; +#define SH_PFC_PIN_NONE U16_MAX +#define SH_PFC_PIN_CFG_INPUT (1 << 0)#define SH_PFC_PIN_CFG_OUTPUT (1 << 1)#define SH_PFC_PIN_CFG_PULL_UP (1 << 2)
Signature · 1 line
2.7.4
PATCH v2 38/51 pinctrl: sh-pfc: r8a77990: Use new macros for non-GPIO pins
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 7ad549ffcbd78f838441ee35fefe713b8a35daa7 upstream.
Update the R-Car E3 pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car E3 SoC (in 25x25 FCBGA package) by symbolic enum values, referring to signal names.
--- drivers/pinctrl/sh-pfc/pfc-r8a77990.c | 87 +++++++++++++++++------------------ 1 file changed, 41 insertions(+), 46 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77990.c +41 -46
@@ -40,6 +40,25 @@PORT_GP_CFG_1 (6 ,15 , fn, sfx,CFG_FLAGS ), \PORT_GP_CFG_1 (6 ,16 , fn, sfx,CFG_FLAGS ), \ PORT_GP_CFG_1(6, 17, fn, sfx, CFG_FLAGS) + +#define CPU_ALL_NOGP (fn) \ + PIN_NOGP_CFG(ASEBRK, "ASEBRK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_MDC, "AVB_MDC", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_MDIO, "AVB_MDIO", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD0, "AVB_TD0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD1, "AVB_TD1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD2, "AVB_TD2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD3, "AVB_TD3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TXC, "AVB_TXC", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TX_CTL, "AVB_TX_CTL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(FSCLKST_N, "FSCLKST_N", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(MLB_REF, "MLB_REF", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(PRESETOUT_N, "PRESETOUT_N", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TCK, "TCK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TDI, "TDI", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TMS, "TMS", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TRST_N, "TRST_N", fn, CFG_FLAGS) +/* * F_() : just information * FM() : macro for FN_xxx / xxx_MARK
@@ -1276,40 +1295,16 @@ static const u16 pinmux_data[] = { };/* -* R8A77990 has 7 banks with 32 GPIOs in each => 224 GPIOs. -* Physical layout rows: A - AE, cols: 1 - 25. +* Pins not associated with a GPIO port. */ -#define ROW_GROUP_A (r) ('Z' - 'A' + 1 + (r)) -#define PIN_NUMBER (r, c) (((r) - 'A') * 25 + (c) + 300) -#define PIN_A_NUMBER (r, c) PIN_NUMBER(ROW_GROUP_A(r), c) +enum { + GP_ASSIGN_LAST(), + NOGP_ALL(), +};static const struct sh_pfc_pin pinmux_pins[] = {PINMUX_GPIO_GP_ALL (), - -/* -* Pins not associated with a GPIO port. -* -* The pin positions are different between different R8A77990 -* packages, all that is needed for the pfc driver is a unique -* number for each pin. To this end use the pin layout from -* R8A77990 to calculate a unique number for each pin. -*/ -SH_PFC_PIN_NAMED_CFG ('F' ,1 ,TRST_N ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('F' ,3 ,TMS ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('F' ,4 ,TCK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('G' ,2 ,TDI ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('G' ,3 ,FSCLKST_N ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('H' ,1 ,ASEBRK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('N' ,1 ,AVB_TXC ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('N' ,2 ,AVB_TD0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('N' ,3 ,AVB_TD1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('N' ,5 ,AVB_TD2 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('N' ,6 ,AVB_TD3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('P' ,3 ,AVB_TX_CTL ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('P' ,4 ,AVB_MDIO ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('P' ,5 ,AVB_MDC ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('T' ,21 ,MLB_REF ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),3 ,PRESETOUT_N ,CFG_FLAGS ), +PINMUX_NOGP_ALL (), };/* - AUDIO CLOCK ------------------------------------------------------------ */
@@ -5024,15 +5019,15 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [0] = RCAR_GP_PIN(2, 23), /* RD# */ [1] = RCAR_GP_PIN(2, 22), /* BS# */ [2] = RCAR_GP_PIN(2, 21), /* AVB_PHY_INT */ - [3] = PIN_NUMBER('P', 5), /* AVB_MDC */ - [4] = PIN_NUMBER('P', 4), /* AVB_MDIO */ + [3] = PIN_AVB_MDC, /* AVB_MDC */ + [4] = PIN_AVB_MDIO, /* AVB_MDIO */ [5] = RCAR_GP_PIN(2, 20), /* AVB_TXCREFCLK */ - [6] = PIN_NUMBER('N', 6), /* AVB_TD3 */ - [7] = PIN_NUMBER('N', 5), /* AVB_TD2 */ - [8] = PIN_NUMBER('N', 3), /* AVB_TD1 */ - [9] = PIN_NUMBER('N', 2), /* AVB_TD0 */ - [10] = PIN_NUMBER('N', 1), /* AVB_TXC */ - [11] = PIN_NUMBER('P', 3), /* AVB_TX_CTL */ + [6] = PIN_AVB_TD3, /* AVB_TD3 */ + [7] = PIN_AVB_TD2, /* AVB_TD2 */ + [8] = PIN_AVB_TD1, /* AVB_TD1 */ + [9] = PIN_AVB_TD0, /* AVB_TD0 */ + [10] = PIN_AVB_TXC, /* AVB_TXC */ + [11] = PIN_AVB_TX_CTL, /* AVB_TX_CTL */ [12] = RCAR_GP_PIN(2, 19), /* AVB_RD3 */ [13] = RCAR_GP_PIN(2, 18), /* AVB_RD2 */ [14] = RCAR_GP_PIN(2, 17), /* AVB_RD1 */
@@ -5091,12 +5086,12 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN2", 0xe6060408, "PUD2", 0xe6060448) { [0] = RCAR_GP_PIN(3, 1), /* SD0_CMD */ [1] = RCAR_GP_PIN(3, 0), /* SD0_CLK */ - [2] = PIN_NUMBER('H', 1), /* ASEBRK */ + [2] = PIN_ASEBRK, /* ASEBRK */ [3] = SH_PFC_PIN_NONE, - [4] = PIN_NUMBER('G', 2), /* TDI */ - [5] = PIN_NUMBER('F', 3), /* TMS */ - [6] = PIN_NUMBER('F', 4), /* TCK */ - [7] = PIN_NUMBER('F', 1), /* TRST# */ + [4] = PIN_TDI, /* TDI */ + [5] = PIN_TMS, /* TMS */ + [6] = PIN_TCK, /* TCK */ + [7] = PIN_TRST_N, /* TRST# */ [8] = SH_PFC_PIN_NONE, [9] = SH_PFC_PIN_NONE, [10] = SH_PFC_PIN_NONE,
@@ -5104,12 +5099,12 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [12] = SH_PFC_PIN_NONE, [13] = SH_PFC_PIN_NONE, [14] = SH_PFC_PIN_NONE, - [15] = PIN_NUMBER('G', 3), /* FSCLKST# */ + [15] = PIN_FSCLKST_N, /* FSCLKST# */ [16] = RCAR_GP_PIN(0, 17), /* SDA4 */ [17] = RCAR_GP_PIN(0, 16), /* SCL4 */ [18] = SH_PFC_PIN_NONE, [19] = SH_PFC_PIN_NONE, - [20] = PIN_A_NUMBER('D', 3), /* PRESETOUT# */ + [20] = PIN_PRESETOUT_N, /* PRESETOUT# */ [21] = RCAR_GP_PIN(0, 15), /* D15 */ [22] = RCAR_GP_PIN(0, 14), /* D14 */ [23] = RCAR_GP_PIN(0, 13), /* D13 */
@@ -5173,7 +5168,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [13] = RCAR_GP_PIN(6, 2), /* SSI_SDATA0 */ [14] = RCAR_GP_PIN(6, 1), /* SSI_WS01239 */ [15] = RCAR_GP_PIN(6, 0), /* SSI_SCK01239 */ - [16] = PIN_NUMBER('T', 21), /* MLB_REF */ + [16] = PIN_MLB_REF, /* MLB_REF */ [17] = RCAR_GP_PIN(5, 19), /* MLB_DAT */ [18] = RCAR_GP_PIN(5, 18), /* MLB_SIG */ [19] = RCAR_GP_PIN(5, 17), /* MLB_CLK */
Signature · 1 line
2.7.4
PATCH v2 39/51 pinctrl: sh-pfc: r8a7796: Add TPU pins, groups and functions
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 32ba9f222edb92278ec8eadfc6100c7922dc2ad7 upstream.
Add pins, groups and functions for the 16-Bit Timer Pulse Unit outputs on the R-Car M3-W and RZ/G2M SoCs.
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 46 ++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +44 -2
@@ -3896,6 +3896,36 @@ static const unsigned int tmu_tclk2_b_mux[] = { TCLK2_B_MARK, }; +/* - TPU ------------------------------------------------------------------- */ +static const unsigned int tpu_to0_pins[] = { +/* TPU0TO0 */ +RCAR_GP_PIN (6 ,28 ), +}; +static const unsigned int tpu_to0_mux[] = { +TPU0TO0_MARK , +}; +static const unsigned int tpu_to1_pins[] = { +/* TPU0TO1 */ +RCAR_GP_PIN (6 ,29 ), +}; +static const unsigned int tpu_to1_mux[] = { +TPU0TO1_MARK , +}; +static const unsigned int tpu_to2_pins[] = { +/* TPU0TO2 */ +RCAR_GP_PIN (6 ,30 ), +}; +static const unsigned int tpu_to2_mux[] = { +TPU0TO2_MARK , +}; +static const unsigned int tpu_to3_pins[] = { +/* TPU0TO3 */ +RCAR_GP_PIN (6 ,31 ), +}; +static const unsigned int tpu_to3_mux[] = { +TPU0TO3_MARK , +}; +/* - USB0 ------------------------------------------------------------------- */ static const unsigned int usb0_pins[] = {/* PWEN, OVC */
@@ -4115,7 +4145,7 @@ static const unsigned int vin5_clk_mux[] = { };static const struct { -struct sh_pfc_pin_group common[312 ]; +struct sh_pfc_pin_group common[316 ];struct sh_pfc_pin_group automotive[30 ]; } pinmux_groups = { .common = {
@@ -4402,6 +4432,10 @@ static const struct {SH_PFC_PIN_GROUP (tmu_tclk1_b),SH_PFC_PIN_GROUP (tmu_tclk2_a),SH_PFC_PIN_GROUP (tmu_tclk2_b), +SH_PFC_PIN_GROUP (tpu_to0), +SH_PFC_PIN_GROUP (tpu_to1), +SH_PFC_PIN_GROUP (tpu_to2), +SH_PFC_PIN_GROUP (tpu_to3),SH_PFC_PIN_GROUP (usb0),SH_PFC_PIN_GROUP (usb1), SH_PFC_PIN_GROUP(usb30),
@@ -4923,6 +4957,13 @@ static const char * const tmu_groups[] = { "tmu_tclk2_b", }; +static const char *const tpu_groups[] = { +"tpu_to0" , +"tpu_to1" , +"tpu_to2" , +"tpu_to3" , +}; +static const char *const usb0_groups[] = {"usb0" , };
@@ -4968,7 +5009,7 @@ static const char * const vin5_groups[] = { };static const struct { -struct sh_pfc_function common[49 ]; +struct sh_pfc_function common[50 ];struct sh_pfc_function automotive[4 ]; } pinmux_functions = { .common = {
@@ -5016,6 +5057,7 @@ static const struct {SH_PFC_FUNCTION (sdhi3),SH_PFC_FUNCTION (ssi),SH_PFC_FUNCTION (tmu), +SH_PFC_FUNCTION (tpu),SH_PFC_FUNCTION (usb0),SH_PFC_FUNCTION (usb1), SH_PFC_FUNCTION(usb30),
Signature · 1 line
2.7.4
PATCH v2 40/51 pinctrl: sh-pfc: r8a7796: Use new macros for non-GPIO pins
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 168e18fd6cac03279ab728d78b1b2d04c8262973 upstream.
Update the R-Car M3-W pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the R-Car M3-W SiP (in 39x39 BGA package) by symbolic enum values, referring to signal names.
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 307 +++++++++++++++++------------------ 1 file changed, 151 insertions(+), 156 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +151 -156
@@ -35,6 +35,51 @@PORT_GP_CFG_26 (5 , fn, sfx,CFG_FLAGS ), \PORT_GP_CFG_32 (6 , fn, sfx,CFG_FLAGS ), \ PORT_GP_CFG_4(7, fn, sfx, CFG_FLAGS) + +#define CPU_ALL_NOGP (fn) \ + PIN_NOGP_CFG(ASEBRK, "ASEBRK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_MDIO, "AVB_MDIO", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD0, "AVB_RD0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD1, "AVB_RD1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD2, "AVB_RD2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RD3, "AVB_RD3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RXC, "AVB_RXC", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_RX_CTL, "AVB_RX_CTL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD0, "AVB_TD0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD1, "AVB_TD1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD2, "AVB_TD2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TD3, "AVB_TD3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TXC, "AVB_TXC", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TXCREFCLK, "AVB_TXCREFCLK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(AVB_TX_CTL, "AVB_TX_CTL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(DU_DOTCLKIN0, "DU_DOTCLKIN0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(DU_DOTCLKIN1, "DU_DOTCLKIN1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(DU_DOTCLKIN2, "DU_DOTCLKIN2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(EXTALR, "EXTALR", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN),\ + PIN_NOGP_CFG(FSCLKST, "FSCLKST", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(MLB_REF, "MLB_REF", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(PRESETOUT_N, "PRESETOUT#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_IO2, "QSPI0_IO2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_IO3, "QSPI0_IO3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_MISO_IO1, "QSPI0_MISO_IO1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_MOSI_IO0, "QSPI0_MOSI_IO0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_SPCLK, "QSPI0_SPCLK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI0_SSL, "QSPI0_SSL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_IO2, "QSPI1_IO2", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_IO3, "QSPI1_IO3", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_MISO_IO1, "QSPI1_MISO_IO1", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_MOSI_IO0, "QSPI1_MOSI_IO0", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_SPCLK, "QSPI1_SPCLK", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(QSPI1_SSL, "QSPI1_SSL", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(RPC_INT_N, "RPC_INT#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(RPC_RESET_N, "RPC_RESET#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(RPC_WP_N, "RPC_WP#", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TCK, "TCK", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ + PIN_NOGP_CFG(TDI, "TDI", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \ + PIN_NOGP_CFG(TDO, "TDO", fn, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \ + PIN_NOGP_CFG(TMS, "TMS", fn, CFG_FLAGS), \ + PIN_NOGP_CFG(TRST_N, "TRST#", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN) +/* * F_() : just information * FM() : macro for FN_xxx / xxx_MARK
@@ -1518,66 +1563,16 @@ static const u16 pinmux_data[] = { };/* -* R8A7796 has 8 banks with 32 GPIOs in each => 256 GPIOs. -* Physical layout rows: A - AW, cols: 1 - 39. +* Pins not associated with a GPIO port. */ -#define ROW_GROUP_A (r) ('Z' - 'A' + 1 + (r)) -#define PIN_NUMBER (r, c) (((r) - 'A') * 39 + (c) + 300) -#define PIN_A_NUMBER (r, c) PIN_NUMBER(ROW_GROUP_A(r), c) +enum { + GP_ASSIGN_LAST(), + NOGP_ALL(), +};static const struct sh_pfc_pin pinmux_pins[] = {PINMUX_GPIO_GP_ALL (), - -/* -* Pins not associated with a GPIO port. -* -* The pin positions are different between different r8a7796 -* packages, all that is needed for the pfc driver is a unique -* number for each pin. To this end use the pin layout from -* R-Car M3SiP to calculate a unique number for each pin. -*/ -SH_PFC_PIN_NAMED_CFG ('A' ,8 ,AVB_TX_CTL ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,9 ,AVB_MDIO ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,12 ,AVB_TXCREFCLK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,13 ,AVB_RD0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,14 ,AVB_RD2 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,16 ,AVB_RX_CTL ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,17 ,AVB_TD2 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,18 ,AVB_TD0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('A' ,19 ,AVB_TXC ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,13 ,AVB_RD1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,14 ,AVB_RD3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,17 ,AVB_TD3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,18 ,AVB_TD1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('B' ,19 ,AVB_RXC ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG('C', 1, PRESETOUT#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG ('H' ,37 ,MLB_REF ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('V' ,3 ,QSPI1_SPCLK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('V' ,5 ,QSPI1_SSL ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG('V', 6, RPC_WP#, CFG_FLAGS), - SH_PFC_PIN_NAMED_CFG('V', 7, RPC_RESET#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG ('W' ,3 ,QSPI0_SPCLK ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('Y' ,3 ,QSPI0_SSL ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG ('Y' ,6 ,QSPI0_IO2 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG('Y', 7, RPC_INT#, CFG_FLAGS), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('B' ),4 ,QSPI0_MISO_IO1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('B' ),6 ,QSPI0_IO3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),3 ,QSPI1_IO3 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),5 ,QSPI0_MOSI_IO0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('C' ),7 ,QSPI1_MOSI_IO0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),38 ,FSCLKST ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('D' ),39 ,EXTALR ,SH_PFC_PIN_CFG_PULL_UP_DOWN ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),4 ,QSPI1_IO2 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('E' ),5 ,QSPI1_MISO_IO1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),7 ,DU_DOTCLKIN0 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('P' ),8 ,DU_DOTCLKIN1 ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),8 ,DU_DOTCLKIN2 ,CFG_FLAGS ), - SH_PFC_PIN_NAMED_CFG(ROW_GROUP_A('R'), 26, TRST#, SH_PFC_PIN_CFG_PULL_UP_DOWN), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),29 ,TDI ,SH_PFC_PIN_CFG_PULL_UP_DOWN ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('R' ),30 ,TMS ,CFG_FLAGS ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),27 ,TCK ,SH_PFC_PIN_CFG_PULL_UP_DOWN ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),28 ,TDO ,SH_PFC_PIN_CFG_DRIVE_STRENGTH ), -SH_PFC_PIN_NAMED_CFG (ROW_GROUP_A ('T' ),30 ,ASEBRK ,CFG_FLAGS ), +PINMUX_NOGP_ALL (), };/* - AUDIO CLOCK ------------------------------------------------------------ */
@@ -1726,7 +1721,7 @@ static const unsigned int avb_phy_int_mux[] = { };static const unsigned int avb_mdio_pins[] = {/* AVB_MDC, AVB_MDIO */ -RCAR_GP_PIN (2 ,9 ),PIN_NUMBER ('A' ,9 ), +RCAR_GP_PIN (2 ,9 ),PIN_AVB_MDIO , };static const unsigned int avb_mdio_mux[] = {AVB_MDC_MARK ,AVB_MDIO_MARK ,
@@ -1739,11 +1734,11 @@ static const unsigned int avb_mii_pins[] = {* AVB_RD1, AVB_RD2, AVB_RD3, * AVB_TXCREFCLK */ -PIN_NUMBER ('A' ,8 ),PIN_NUMBER ('A' ,19 ),PIN_NUMBER ('A' ,18 ), -PIN_NUMBER ('B' ,18 ),PIN_NUMBER ('A' ,17 ),PIN_NUMBER ('B' ,17 ), -PIN_NUMBER ('A' ,16 ),PIN_NUMBER ('B' ,19 ),PIN_NUMBER ('A' ,13 ), -PIN_NUMBER ('B' ,13 ),PIN_NUMBER ('A' ,14 ),PIN_NUMBER ('B' ,14 ), - PIN_NUMBER('A', 12), +PIN_AVB_TX_CTL ,PIN_AVB_TXC ,PIN_AVB_TD0 , +PIN_AVB_TD1 ,PIN_AVB_TD2 ,PIN_AVB_TD3 , +PIN_AVB_RX_CTL ,PIN_AVB_RXC ,PIN_AVB_RD0 , +PIN_AVB_RD1 ,PIN_AVB_RD2 ,PIN_AVB_RD3 , + PIN_AVB_TXCREFCLK, }; static const unsigned int avb_mii_mux[] = {
@@ -5637,44 +5632,44 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {static const struct pinmux_drive_reg pinmux_drive_regs[] = { { PINMUX_DRIVE_REG("DRVCTRL0", 0xe6060300) { - {PIN_NUMBER ('W' ,3 ),28 ,2 },/* QSPI0_SPCLK */ - {PIN_A_NUMBER ('C' ,5 ),24 ,2 },/* QSPI0_MOSI_IO0 */ - {PIN_A_NUMBER ('B' ,4 ),20 ,2 },/* QSPI0_MISO_IO1 */ - {PIN_NUMBER ('Y' ,6 ),16 ,2 },/* QSPI0_IO2 */ - {PIN_A_NUMBER ('B' ,6 ),12 ,2 },/* QSPI0_IO3 */ - {PIN_NUMBER ('Y' ,3 ),8 ,2 },/* QSPI0_SSL */ - {PIN_NUMBER ('V' ,3 ),4 ,2 },/* QSPI1_SPCLK */ - {PIN_A_NUMBER ('C' ,7 ),0 ,2 },/* QSPI1_MOSI_IO0 */ + {PIN_QSPI0_SPCLK ,28 ,2 },/* QSPI0_SPCLK */ + {PIN_QSPI0_MOSI_IO0 ,24 ,2 },/* QSPI0_MOSI_IO0 */ + {PIN_QSPI0_MISO_IO1 ,20 ,2 },/* QSPI0_MISO_IO1 */ + {PIN_QSPI0_IO2 ,16 ,2 },/* QSPI0_IO2 */ + {PIN_QSPI0_IO3 ,12 ,2 },/* QSPI0_IO3 */ + {PIN_QSPI0_SSL ,8 ,2 },/* QSPI0_SSL */ + {PIN_QSPI1_SPCLK ,4 ,2 },/* QSPI1_SPCLK */ + {PIN_QSPI1_MOSI_IO0 ,0 ,2 },/* QSPI1_MOSI_IO0 */ } }, { PINMUX_DRIVE_REG("DRVCTRL1", 0xe6060304) { - {PIN_A_NUMBER ('E' ,5 ),28 ,2 },/* QSPI1_MISO_IO1 */ - {PIN_A_NUMBER ('E' ,4 ),24 ,2 },/* QSPI1_IO2 */ - {PIN_A_NUMBER ('C' ,3 ),20 ,2 },/* QSPI1_IO3 */ - {PIN_NUMBER ('V' ,5 ),16 ,2 },/* QSPI1_SSL */ - {PIN_NUMBER ('Y' ,7 ),12 ,2 },/* RPC_INT# */ - {PIN_NUMBER ('V' ,6 ),8 ,2 },/* RPC_WP# */ - {PIN_NUMBER ('V' ,7 ),4 ,2 },/* RPC_RESET# */ - {PIN_NUMBER ('A' ,16 ),0 ,3 },/* AVB_RX_CTL */ + {PIN_QSPI1_MISO_IO1 ,28 ,2 },/* QSPI1_MISO_IO1 */ + {PIN_QSPI1_IO2 ,24 ,2 },/* QSPI1_IO2 */ + {PIN_QSPI1_IO3 ,20 ,2 },/* QSPI1_IO3 */ + {PIN_QSPI1_SSL ,16 ,2 },/* QSPI1_SSL */ + {PIN_RPC_INT_N ,12 ,2 },/* RPC_INT# */ + {PIN_RPC_WP_N ,8 ,2 },/* RPC_WP# */ + {PIN_RPC_RESET_N ,4 ,2 },/* RPC_RESET# */ + {PIN_AVB_RX_CTL ,0 ,3 },/* AVB_RX_CTL */ } }, { PINMUX_DRIVE_REG("DRVCTRL2", 0xe6060308) { - {PIN_NUMBER ('B' ,19 ),28 ,3 },/* AVB_RXC */ - {PIN_NUMBER ('A' ,13 ),24 ,3 },/* AVB_RD0 */ - {PIN_NUMBER ('B' ,13 ),20 ,3 },/* AVB_RD1 */ - {PIN_NUMBER ('A' ,14 ),16 ,3 },/* AVB_RD2 */ - {PIN_NUMBER ('B' ,14 ),12 ,3 },/* AVB_RD3 */ - {PIN_NUMBER ('A' ,8 ),8 ,3 },/* AVB_TX_CTL */ - {PIN_NUMBER ('A' ,19 ),4 ,3 },/* AVB_TXC */ - {PIN_NUMBER ('A' ,18 ),0 ,3 },/* AVB_TD0 */ + {PIN_AVB_RXC ,28 ,3 },/* AVB_RXC */ + {PIN_AVB_RD0 ,24 ,3 },/* AVB_RD0 */ + {PIN_AVB_RD1 ,20 ,3 },/* AVB_RD1 */ + {PIN_AVB_RD2 ,16 ,3 },/* AVB_RD2 */ + {PIN_AVB_RD3 ,12 ,3 },/* AVB_RD3 */ + {PIN_AVB_TX_CTL ,8 ,3 },/* AVB_TX_CTL */ + {PIN_AVB_TXC ,4 ,3 },/* AVB_TXC */ + {PIN_AVB_TD0 ,0 ,3 },/* AVB_TD0 */ } }, { PINMUX_DRIVE_REG("DRVCTRL3", 0xe606030c) { - {PIN_NUMBER ('B' ,18 ),28 ,3 },/* AVB_TD1 */ - {PIN_NUMBER ('A' ,17 ),24 ,3 },/* AVB_TD2 */ - {PIN_NUMBER ('B' ,17 ),20 ,3 },/* AVB_TD3 */ - {PIN_NUMBER ('A' ,12 ),16 ,3 },/* AVB_TXCREFCLK */ - {PIN_NUMBER ('A' ,9 ),12 ,3 },/* AVB_MDIO */ - {RCAR_GP_PIN (2 ,9 ),8 ,3 },/* AVB_MDC */ - {RCAR_GP_PIN (2 ,10 ),4 ,3 },/* AVB_MAGIC */ - {RCAR_GP_PIN (2 ,11 ),0 ,3 },/* AVB_PHY_INT */ + {PIN_AVB_TD1 ,28 ,3 },/* AVB_TD1 */ + {PIN_AVB_TD2 ,24 ,3 },/* AVB_TD2 */ + {PIN_AVB_TD3 ,20 ,3 },/* AVB_TD3 */ + {PIN_AVB_TXCREFCLK ,16 ,3 },/* AVB_TXCREFCLK */ + {PIN_AVB_MDIO ,12 ,3 },/* AVB_MDIO */ + {RCAR_GP_PIN (2 ,9 ),8 ,3 },/* AVB_MDC */ + {RCAR_GP_PIN (2 ,10 ),4 ,3 },/* AVB_MAGIC */ + {RCAR_GP_PIN (2 ,11 ),0 ,3 },/* AVB_PHY_INT */ } }, { PINMUX_DRIVE_REG("DRVCTRL4", 0xe6060310) { {RCAR_GP_PIN (2 ,12 ),28 ,3 },/* AVB_LINK */
@@ -5728,7 +5723,7 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { } }, { PINMUX_DRIVE_REG("DRVCTRL9", 0xe6060324) { { RCAR_GP_PIN(1, 27), 28, 3 }, /* EX_WAIT0 */ - { PIN_NUMBER('C', 1), 24, 3 }, /* PRESETOUT# */ + { PIN_PRESETOUT_N, 24, 3 }, /* PRESETOUT# */ { RCAR_GP_PIN(0, 0), 20, 3 }, /* D0 */ { RCAR_GP_PIN(0, 1), 16, 3 }, /* D1 */ { RCAR_GP_PIN(0, 2), 12, 3 }, /* D2 */
@@ -5747,29 +5742,29 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(0, 13), 0, 3 }, /* D13 */ } }, { PINMUX_DRIVE_REG("DRVCTRL11", 0xe606032c) { - { RCAR_GP_PIN(0, 14), 28, 3 }, /* D14 */ - { RCAR_GP_PIN(0, 15), 24, 3 }, /* D15 */ - { RCAR_GP_PIN(7, 0), 20, 3 }, /* AVS1 */ - { RCAR_GP_PIN(7, 1), 16, 3 }, /* AVS2 */ - { RCAR_GP_PIN(7, 2), 12, 3 }, /* GP7_02 */ - { RCAR_GP_PIN(7, 3), 8, 3 }, /* GP7_03 */ - { PIN_A_NUMBER('P', 7), 4, 2 }, /* DU_DOTCLKIN0 */ - { PIN_A_NUMBER('P', 8), 0, 2 }, /* DU_DOTCLKIN1 */ + { RCAR_GP_PIN(0, 14), 28, 3 }, /* D14 */ + { RCAR_GP_PIN(0, 15), 24, 3 }, /* D15 */ + { RCAR_GP_PIN(7, 0), 20, 3 }, /* AVS1 */ + { RCAR_GP_PIN(7, 1), 16, 3 }, /* AVS2 */ + { RCAR_GP_PIN(7, 2), 12, 3 }, /* GP7_02 */ + { RCAR_GP_PIN(7, 3), 8, 3 }, /* GP7_03 */ + { PIN_DU_DOTCLKIN0, 4, 2 }, /* DU_DOTCLKIN0 */ + { PIN_DU_DOTCLKIN1, 0, 2 }, /* DU_DOTCLKIN1 */ } }, { PINMUX_DRIVE_REG("DRVCTRL12", 0xe6060330) { - { PIN_A_NUMBER('R', 8), 28, 2 }, /* DU_DOTCLKIN2 */ - { PIN_A_NUMBER('D', 38), 20, 2 }, /* FSCLKST */ - { PIN_A_NUMBER('R', 30), 4, 2 }, /* TMS */ + { PIN_DU_DOTCLKIN2, 28, 2 }, /* DU_DOTCLKIN2 */ + { PIN_FSCLKST, 20, 2 }, /* FSCLKST */ + { PIN_TMS, 4, 2 }, /* TMS */ } }, { PINMUX_DRIVE_REG("DRVCTRL13", 0xe6060334) { - { PIN_A_NUMBER('T', 28), 28, 2 }, /* TDO */ - { PIN_A_NUMBER('T', 30), 24, 2 }, /* ASEBRK */ - { RCAR_GP_PIN(3, 0), 20, 3 }, /* SD0_CLK */ - { RCAR_GP_PIN(3, 1), 16, 3 }, /* SD0_CMD */ - { RCAR_GP_PIN(3, 2), 12, 3 }, /* SD0_DAT0 */ - { RCAR_GP_PIN(3, 3), 8, 3 }, /* SD0_DAT1 */ - { RCAR_GP_PIN(3, 4), 4, 3 }, /* SD0_DAT2 */ - { RCAR_GP_PIN(3, 5), 0, 3 }, /* SD0_DAT3 */ + { PIN_TDO, 28, 2 }, /* TDO */ + { PIN_ASEBRK, 24, 2 }, /* ASEBRK */ + { RCAR_GP_PIN(3, 0), 20, 3 }, /* SD0_CLK */ + { RCAR_GP_PIN(3, 1), 16, 3 }, /* SD0_CMD */ + { RCAR_GP_PIN(3, 2), 12, 3 }, /* SD0_DAT0 */ + { RCAR_GP_PIN(3, 3), 8, 3 }, /* SD0_DAT1 */ + { RCAR_GP_PIN(3, 4), 4, 3 }, /* SD0_DAT2 */ + { RCAR_GP_PIN(3, 5), 0, 3 }, /* SD0_DAT3 */ } }, { PINMUX_DRIVE_REG("DRVCTRL14", 0xe6060338) { { RCAR_GP_PIN(3, 6), 28, 3 }, /* SD1_CLK */
@@ -5838,7 +5833,7 @@ static const struct pinmux_drive_reg pinmux_drive_regs[] = { { RCAR_GP_PIN(5, 23), 16, 3 }, /* MLB_CLK */ { RCAR_GP_PIN(5, 24), 12, 3 }, /* MLB_SIG */ { RCAR_GP_PIN(5, 25), 8, 3 }, /* MLB_DAT */ - { PIN_NUMBER('H', 37), 4, 3 }, /* MLB_REF */ + { PIN_MLB_REF, 4, 3 }, /* MLB_REF */ { RCAR_GP_PIN(6, 0), 0, 3 }, /* SSI_SCK01239 */ } }, { PINMUX_DRIVE_REG("DRVCTRL21", 0xe6060354) {
@@ -5911,35 +5906,35 @@ static int r8a7796_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin, u32 *poc static const struct pinmux_bias_reg pinmux_bias_regs[] = { { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) { - [ 0] = PIN_NUMBER('W', 3), /* QSPI0_SPCLK */ - [ 1] = PIN_A_NUMBER('C', 5), /* QSPI0_MOSI_IO0 */ - [ 2] = PIN_A_NUMBER('B', 4), /* QSPI0_MISO_IO1 */ - [ 3] = PIN_NUMBER('Y', 6), /* QSPI0_IO2 */ - [ 4] = PIN_A_NUMBER('B', 6), /* QSPI0_IO3 */ - [ 5] = PIN_NUMBER('Y', 3), /* QSPI0_SSL */ - [ 6] = PIN_NUMBER('V', 3), /* QSPI1_SPCLK */ - [ 7] = PIN_A_NUMBER('C', 7), /* QSPI1_MOSI_IO0 */ - [ 8] = PIN_A_NUMBER('E', 5), /* QSPI1_MISO_IO1 */ - [ 9] = PIN_A_NUMBER('E', 4), /* QSPI1_IO2 */ - [10] = PIN_A_NUMBER('C', 3), /* QSPI1_IO3 */ - [11] = PIN_NUMBER('V', 5), /* QSPI1_SSL */ - [12] = PIN_NUMBER('Y', 7), /* RPC_INT# */ - [13] = PIN_NUMBER('V', 6), /* RPC_WP# */ - [14] = PIN_NUMBER('V', 7), /* RPC_RESET# */ - [15] = PIN_NUMBER('A', 16), /* AVB_RX_CTL */ - [16] = PIN_NUMBER('B', 19), /* AVB_RXC */ - [17] = PIN_NUMBER('A', 13), /* AVB_RD0 */ - [18] = PIN_NUMBER('B', 13), /* AVB_RD1 */ - [19] = PIN_NUMBER('A', 14), /* AVB_RD2 */ - [20] = PIN_NUMBER('B', 14), /* AVB_RD3 */ - [21] = PIN_NUMBER('A', 8), /* AVB_TX_CTL */ - [22] = PIN_NUMBER('A', 19), /* AVB_TXC */ - [23] = PIN_NUMBER('A', 18), /* AVB_TD0 */ - [24] = PIN_NUMBER('B', 18), /* AVB_TD1 */ - [25] = PIN_NUMBER('A', 17), /* AVB_TD2 */ - [26] = PIN_NUMBER('B', 17), /* AVB_TD3 */ - [27] = PIN_NUMBER('A', 12), /* AVB_TXCREFCLK */ - [28] = PIN_NUMBER('A', 9), /* AVB_MDIO */ + [ 0] = PIN_QSPI0_SPCLK, /* QSPI0_SPCLK */ + [ 1] = PIN_QSPI0_MOSI_IO0, /* QSPI0_MOSI_IO0 */ + [ 2] = PIN_QSPI0_MISO_IO1, /* QSPI0_MISO_IO1 */ + [ 3] = PIN_QSPI0_IO2, /* QSPI0_IO2 */ + [ 4] = PIN_QSPI0_IO3, /* QSPI0_IO3 */ + [ 5] = PIN_QSPI0_SSL, /* QSPI0_SSL */ + [ 6] = PIN_QSPI1_SPCLK, /* QSPI1_SPCLK */ + [ 7] = PIN_QSPI1_MOSI_IO0, /* QSPI1_MOSI_IO0 */ + [ 8] = PIN_QSPI1_MISO_IO1, /* QSPI1_MISO_IO1 */ + [ 9] = PIN_QSPI1_IO2, /* QSPI1_IO2 */ + [10] = PIN_QSPI1_IO3, /* QSPI1_IO3 */ + [11] = PIN_QSPI1_SSL, /* QSPI1_SSL */ + [12] = PIN_RPC_INT_N, /* RPC_INT# */ + [13] = PIN_RPC_WP_N, /* RPC_WP# */ + [14] = PIN_RPC_RESET_N, /* RPC_RESET# */ + [15] = PIN_AVB_RX_CTL, /* AVB_RX_CTL */ + [16] = PIN_AVB_RXC, /* AVB_RXC */ + [17] = PIN_AVB_RD0, /* AVB_RD0 */ + [18] = PIN_AVB_RD1, /* AVB_RD1 */ + [19] = PIN_AVB_RD2, /* AVB_RD2 */ + [20] = PIN_AVB_RD3, /* AVB_RD3 */ + [21] = PIN_AVB_TX_CTL, /* AVB_TX_CTL */ + [22] = PIN_AVB_TXC, /* AVB_TXC */ + [23] = PIN_AVB_TD0, /* AVB_TD0 */ + [24] = PIN_AVB_TD1, /* AVB_TD1 */ + [25] = PIN_AVB_TD2, /* AVB_TD2 */ + [26] = PIN_AVB_TD3, /* AVB_TD3 */ + [27] = PIN_AVB_TXCREFCLK, /* AVB_TXCREFCLK */ + [28] = PIN_AVB_MDIO, /* AVB_MDIO */ [29] = RCAR_GP_PIN(2, 9), /* AVB_MDC */ [30] = RCAR_GP_PIN(2, 10), /* AVB_MAGIC */ [31] = RCAR_GP_PIN(2, 11), /* AVB_PHY_INT */
@@ -5988,7 +5983,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [ 6] = RCAR_GP_PIN(1, 25), /* WE0_N */ [ 7] = RCAR_GP_PIN(1, 26), /* WE1_N */ [ 8] = RCAR_GP_PIN(1, 27), /* EX_WAIT0_A */ - [ 9] = PIN_NUMBER('C', 1), /* PRESETOUT# */ + [ 9] = PIN_PRESETOUT_N, /* PRESETOUT# */ [10] = RCAR_GP_PIN(0, 0), /* D0 */ [11] = RCAR_GP_PIN(0, 1), /* D1 */ [12] = RCAR_GP_PIN(0, 2), /* D2 */
@@ -6009,20 +6004,20 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [27] = RCAR_GP_PIN(7, 1), /* AVS2 */ [28] = RCAR_GP_PIN(7, 2), /* GP7_02 */ [29] = RCAR_GP_PIN(7, 3), /* GP7_03 */ - [30] = PIN_A_NUMBER('P', 7), /* DU_DOTCLKIN0 */ - [31 ] =PIN_A_NUMBER ('P' ,8 ),/* DU_DOTCLKIN1 */ + [30] = PIN_DU_DOTCLKIN0, /* DU_DOTCLKIN0 */ + [31 ] =PIN_DU_DOTCLKIN1 ,/* DU_DOTCLKIN1 */ } }, { PINMUX_BIAS_REG("PUEN3", 0xe606040c, "PUD3", 0xe606044c) { - [ 0] = PIN_A_NUMBER('R', 8), /* DU_DOTCLKIN2 */ + [ 0] = PIN_DU_DOTCLKIN2, /* DU_DOTCLKIN2 */ [ 1] = SH_PFC_PIN_NONE, - [ 2] = PIN_A_NUMBER('D', 38), /* FSCLKST */ - [ 3] = PIN_A_NUMBER('D', 39), /* EXTALR*/ - [ 4] = PIN_A_NUMBER('R', 26), /* TRST# */ - [ 5] = PIN_A_NUMBER('T', 27), /* TCK */ - [ 6] = PIN_A_NUMBER('R', 30), /* TMS */ - [ 7] = PIN_A_NUMBER('R', 29), /* TDI */ + [ 2] = PIN_FSCLKST, /* FSCLKST */ + [ 3] = PIN_EXTALR, /* EXTALR*/ + [ 4] = PIN_TRST_N, /* TRST# */ + [ 5] = PIN_TCK, /* TCK */ + [ 6] = PIN_TMS, /* TMS */ + [ 7] = PIN_TDI, /* TDI */ [ 8] = SH_PFC_PIN_NONE, - [ 9] = PIN_A_NUMBER('T', 30), /* ASEBRK */ + [ 9] = PIN_ASEBRK, /* ASEBRK */ [10] = RCAR_GP_PIN(3, 0), /* SD0_CLK */ [11] = RCAR_GP_PIN(3, 1), /* SD0_CMD */ [12] = RCAR_GP_PIN(3, 2), /* SD0_DAT0 */
@@ -6087,7 +6082,7 @@ static const struct pinmux_bias_reg pinmux_bias_regs[] = { [ 3] = RCAR_GP_PIN(5, 23), /* MLB_CLK */ [ 4] = RCAR_GP_PIN(5, 24), /* MLB_SIG */ [ 5] = RCAR_GP_PIN(5, 25), /* MLB_DAT */ - [ 6] = PIN_NUMBER('H', 37), /* MLB_REF */ + [ 6] = PIN_MLB_REF, /* MLB_REF */ [ 7] = RCAR_GP_PIN(6, 0), /* SSI_SCK01239 */ [ 8] = RCAR_GP_PIN(6, 1), /* SSI_WS01239 */ [ 9] = RCAR_GP_PIN(6, 2), /* SSI_SDATA0 */
Signature · 1 line
2.7.4
PATCH v2 41/51 pinctrl: sh-pfc: r8a7796: Remove placeholder I2C pin data
In reply to Fabrizio CastroFrom: Ulrich Hecht <[email protected]>
commit f05603fa6aa30430f444620344a2f75adeeddbd2 upstream.
Pin data for I2C controllers 0, 3 and 5 is properly defined already.
--- drivers/pinctrl/sh-pfc/pfc-r8a7796.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7796.c +0 -5
@@ -1545,11 +1545,6 @@ static const u16 pinmux_data[] = {PINMUX_IPSR_MSEL (IP18_7_4 ,FMIN_C ,SEL_FM_2 ), PINMUX_IPSR_MSEL(IP18_7_4, FMIN_D, SEL_FM_3), -/* I2C */ -PINMUX_IPSR_NOGP (0 ,I2C_SEL_0_1 ), -PINMUX_IPSR_NOGP (0 ,I2C_SEL_3_1 ), -PINMUX_IPSR_NOGP (0 ,I2C_SEL_5_1 ), -/* * Static pins can not be muxed between different functions but * still need mark entries in the pinmux list. Add each static
Signature · 1 line
2.7.4
PATCH v2 42/51 pinctrl: sh-pfc: r8a77995: Remove unused PINMUX_IPSR_{MSEL2, PHYS}()
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 341fe38975211e73c4b1e9b44d5ccbdf7960466b upstream.
The PINMUX_IPSR_MSEL2() and PINMUX_IPSR_PHYS() macros are unused, and will conflict with generic macros that are to be added.
--- drivers/pinctrl/sh-pfc/pfc-r8a77995.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a77995.c +0 -6
@@ -472,12 +472,6 @@ enum {#undef FM }; -#define PINMUX_IPSR_MSEL2 (ipsr, fn, msel1, msel2) \ - PINMUX_DATA(fn##_MARK, FN_##msel1, FN_##msel2, FN_##fn, FN_##ipsr) - -#define PINMUX_IPSR_PHYS (ipsr, fn, msel) \ - PINMUX_DATA(fn##_MARK, FN_##msel) -static const u16 pinmux_data[] = {PINMUX_DATA_GP_ALL (),
Signature · 1 line
2.7.4
PATCH v2 43/51 pinctrl: sh-pfc: r8a7740: Add missing REF125CK pin to gether_gmii group
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 1ebc589a7786f17f97b9e87b44e0fb4d0290d8f8 upstream.
The gether_gmii_mux[] array contains the REF125CK pin mark, but the gether_gmii_pins[] array lacks the corresponding pin number.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -1
@@ -1982,7 +1982,7 @@ static const unsigned int gether_gmii_pins[] = {*/ 185 ,186 ,187 ,188 ,189 ,190 ,191 ,192 ,174 ,161 ,204 ,171 ,170 ,169 ,168 ,167 ,166 ,173 ,172 ,176 ,184 ,183 ,203 , - 205, 163, 206, 207, + 205, 163, 206, 207, 158, };static const unsigned int gether_gmii_mux[] = { ET_ERXD0_MARK, ET_ERXD1_MARK, ET_ERXD2_MARK, ET_ERXD3_MARK,
Signature · 1 line
2.7.4
PATCH v2 44/51 pinctrl: sh-pfc: r8a7740: Add missing LCD0 marks to lcd0_data24_1 group
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 96bb2a6ab4eca10e5b6490b3f0738e9f7ec22c2b upstream.
The lcd0_data24_1_pins[] array contains the LCD0 D1[2-5] pin numbers, but the lcd0_data24_1_mux[] array lacks the corresponding pin marks.
--- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-r8a7740.c +1 -0
@@ -2154,6 +2154,7 @@ static const unsigned int lcd0_data24_1_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 ,LCD0_D18_PORT163_MARK ,LCD0_D19_PORT162_MARK ,LCD0_D20_PORT161_MARK ,LCD0_D21_PORT158_MARK , LCD0_D22_PORT160_MARK, LCD0_D23_PORT159_MARK,
Signature · 1 line
2.7.4
PATCH v2 45/51 pinctrl: sh-pfc: r8a7791: Remove bogus ctrl marks from qspi_data4_b group
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 884fa25fb6e5e63ab970d612a628313bb68f37cc upstream.
The qspi_data4_b_mux[] array contains pin marks for the clock and chip select pins. The qspi_data4_b_pins[] array rightfully does not contain the corresponding pin numbers, as the control pins are provided by a separate group (qspi_ctrl_b).
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -2
@@ -3221,8 +3221,7 @@ static const unsigned int qspi_data4_b_pins[] = { RCAR_GP_PIN(6, 4), };static const unsigned int qspi_data4_b_mux[] = { -SPCLK_B_MARK ,MOSI_IO0_B_MARK ,MISO_IO1_B_MARK , -IO2_B_MARK ,IO3_B_MARK ,SSL_B_MARK , +MOSI_IO0_B_MARK ,MISO_IO1_B_MARK ,IO2_B_MARK ,IO3_B_MARK , };/* - SCIF0 ------------------------------------------------------------------ */ static const unsigned int scif0_data_pins[] = {
Signature · 1 line
2.7.4
PATCH v2 46/51 pinctrl: sh-pfc: r8a7791: Remove bogus marks from vin1_b_data18 group
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 0d6256cb880166a4111bebce35790019e56b6e1b upstream.
The vin1_b_data18_mux[] arrays contains pin marks for the 2 LSB bits of the color components. The vin1_b_data18_pins[] array rightfully does not include the corresponding pin numbers, as RGB18 is subset of RGB24, containing only the 6 MSB bits of each component.
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 3 --- 1 file changed, 3 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +0 -3
@@ -4375,17 +4375,14 @@ static const unsigned int vin1_b_data18_pins[] = { };static const unsigned int vin1_b_data18_mux[] = {/* B */ -VI1_DATA0_B_MARK ,VI1_DATA1_B_MARK ,VI1_DATA2_B_MARK ,VI1_DATA3_B_MARK ,VI1_DATA4_B_MARK ,VI1_DATA5_B_MARK ,VI1_DATA6_B_MARK ,VI1_DATA7_B_MARK ,/* G */ -VI1_G0_B_MARK ,VI1_G1_B_MARK ,VI1_G2_B_MARK ,VI1_G3_B_MARK ,VI1_G4_B_MARK ,VI1_G5_B_MARK ,VI1_G6_B_MARK ,VI1_G7_B_MARK ,/* R */ -VI1_R0_B_MARK ,VI1_R1_B_MARK ,VI1_R2_B_MARK ,VI1_R3_B_MARK ,VI1_R4_B_MARK ,VI1_R5_B_MARK ,VI1_R6_B_MARK ,VI1_R7_B_MARK ,
Signature · 1 line
2.7.4
PATCH v2 47/51 pinctrl: sh-pfc: r8a7791: Fix VIN1 versioned groups
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit b8ba194ca5f4ca238b05e1d1579404d4ff3de522 upstream.
The naming of the "b" versions of the VIN1 pin groups is a bit odd, in that the "_b" appears in the middle of the names, instead of as a suffix.
Increase consistency with other SoCs by making R-Car M2-W and M2-N, and RZ/G1M and RZ/G1N, use the recently added optional "version" argument of the VIN_DATA_PIN_GROUP() macro.
Note that this breaks backwards compatibility with existing DTBs, but there are no upstream users of the "vin1_b_*" names.
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 68 ++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 34 deletions(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +34 -34
@@ -4321,7 +4321,7 @@ static const unsigned int vin1_clk_pins[] = {static const unsigned int vin1_clk_mux[] = {VI1_CLK_MARK , }; -static const union vin_data vin1_b_data_pins = { +static const union vin_data vin1_data_b_pins = { .data24 = {/* B */ RCAR_GP_PIN (3 ,0 ),RCAR_GP_PIN (3 ,1 ),
@@ -4340,7 +4340,7 @@ static const union vin_data vin1_b_data_pins = { RCAR_GP_PIN(2, 19), RCAR_GP_PIN(2, 20), }, }; -static const union vin_data vin1_b_data_mux = { +static const union vin_data vin1_data_b_mux = { .data24 = {/* B */ VI1_DATA0_B_MARK ,VI1_DATA1_B_MARK ,
@@ -4359,7 +4359,7 @@ static const union vin_data vin1_b_data_mux = { VI1_R6_B_MARK, VI1_R7_B_MARK, }, }; -static const unsigned int vin1_b_data18_pins[] = { +static const unsigned int vin1_data18_b_pins[] = {/* B */ RCAR_GP_PIN (3 ,8 ),RCAR_GP_PIN (3 ,9 ),RCAR_GP_PIN (3 ,10 ),RCAR_GP_PIN (3 ,11 ),
@@ -4373,7 +4373,7 @@ static const unsigned int vin1_b_data18_pins[] = {RCAR_GP_PIN (2 ,17 ),RCAR_GP_PIN (2 ,18 ), RCAR_GP_PIN(2, 19), RCAR_GP_PIN(2, 20), }; -static const unsigned int vin1_b_data18_mux[] = { +static const unsigned int vin1_data18_b_mux[] = {/* B */ VI1_DATA2_B_MARK ,VI1_DATA3_B_MARK , VI1_DATA4_B_MARK, VI1_DATA5_B_MARK,
@@ -4387,30 +4387,30 @@ static const unsigned int vin1_b_data18_mux[] = {VI1_R4_B_MARK ,VI1_R5_B_MARK , VI1_R6_B_MARK, VI1_R7_B_MARK, }; -static const unsigned int vin1_b_sync_pins[] = { +static const unsigned int vin1_sync_b_pins[] = {RCAR_GP_PIN (3 ,17 ),/* HSYNC */ RCAR_GP_PIN (3 ,18 ),/* VSYNC */ }; -static const unsigned int vin1_b_sync_mux[] = { +static const unsigned int vin1_sync_b_mux[] = {VI1_HSYNC_N_B_MARK ,VI1_VSYNC_N_B_MARK , }; -static const unsigned int vin1_b_field_pins[] = { +static const unsigned int vin1_field_b_pins[] = {RCAR_GP_PIN (3 ,20 ), }; -static const unsigned int vin1_b_field_mux[] = { +static const unsigned int vin1_field_b_mux[] = {VI1_FIELD_B_MARK , }; -static const unsigned int vin1_b_clkenb_pins[] = { +static const unsigned int vin1_clkenb_b_pins[] = {RCAR_GP_PIN (3 ,19 ), }; -static const unsigned int vin1_b_clkenb_mux[] = { +static const unsigned int vin1_clkenb_b_mux[] = {VI1_CLKENB_B_MARK , }; -static const unsigned int vin1_b_clk_pins[] = { +static const unsigned int vin1_clk_b_pins[] = {RCAR_GP_PIN (3 ,16 ), }; -static const unsigned int vin1_b_clk_mux[] = { +static const unsigned int vin1_clk_b_mux[] = {VI1_CLK_B_MARK , };/* - VIN2 ----------------------------------------------------------------- */
@@ -4788,17 +4788,17 @@ static const struct {SH_PFC_PIN_GROUP (vin1_field),SH_PFC_PIN_GROUP (vin1_clkenb),SH_PFC_PIN_GROUP (vin1_clk), -VIN_DATA_PIN_GROUP (vin1_b_data,24 ), -VIN_DATA_PIN_GROUP (vin1_b_data,20 ), -SH_PFC_PIN_GROUP (vin1_b_data18), -VIN_DATA_PIN_GROUP (vin1_b_data,16 ), -VIN_DATA_PIN_GROUP (vin1_b_data,12 ), -VIN_DATA_PIN_GROUP (vin1_b_data,10 ), -VIN_DATA_PIN_GROUP (vin1_b_data,8 ), -SH_PFC_PIN_GROUP (vin1_b_sync), -SH_PFC_PIN_GROUP (vin1_b_field), -SH_PFC_PIN_GROUP (vin1_b_clkenb), -SH_PFC_PIN_GROUP (vin1_b_clk), +VIN_DATA_PIN_GROUP (vin1_data,24 , _b), +VIN_DATA_PIN_GROUP (vin1_data,20 , _b), +SH_PFC_PIN_GROUP (vin1_data18_b), +VIN_DATA_PIN_GROUP (vin1_data,16 , _b), +VIN_DATA_PIN_GROUP (vin1_data,12 , _b), +VIN_DATA_PIN_GROUP (vin1_data,10 , _b), +VIN_DATA_PIN_GROUP (vin1_data,8 , _b), +SH_PFC_PIN_GROUP (vin1_sync_b), +SH_PFC_PIN_GROUP (vin1_field_b), +SH_PFC_PIN_GROUP (vin1_clkenb_b), +SH_PFC_PIN_GROUP (vin1_clk_b),SH_PFC_PIN_GROUP (vin2_data8),SH_PFC_PIN_GROUP (vin2_sync), SH_PFC_PIN_GROUP(vin2_field),
@@ -5339,17 +5339,17 @@ static const char * const vin1_groups[] = {"vin1_field" ,"vin1_clkenb" ,"vin1_clk" , -"vin1_b_data24" , -"vin1_b_data20" , -"vin1_b_data18" , -"vin1_b_data16" , -"vin1_b_data12" , -"vin1_b_data10" , -"vin1_b_data8" , -"vin1_b_sync" , -"vin1_b_field" , -"vin1_b_clkenb" , - "vin1_b_clk", +"vin1_data24_b" , +"vin1_data20_b" , +"vin1_data18_b" , +"vin1_data16_b" , +"vin1_data12_b" , +"vin1_data10_b" , +"vin1_data8_b" , +"vin1_sync_b" , +"vin1_field_b" , +"vin1_clkenb_b" , + "vin1_clk_b", }; static const char * const vin2_groups[] = {
Signature · 1 line
2.7.4
PATCH v2 48/51 pinctrl: sh-pfc: r8a7791: Fix scifb2_data_c pin group
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit a4b0350047f1b10207e25e72d7cd3f7826e93769 upstream.
The entry for "scifb2_data_c" in the SCIFB2 pin group array contains a typo, thus the group cannot be selected.
--- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-r8a7791.c +1 -1
@@ -5240,7 +5240,7 @@ static const char * const scifb2_groups[] = {"scifb2_data_b" ,"scifb2_clk_b" ,"scifb2_ctrl_b" , -"scifb0_data_c" , +"scifb2_data_c" ,"scifb2_clk_c" , "scifb2_data_d", };
Signature · 1 line
2.7.4
PATCH v2 49/51 pinctrl: sh-pfc: sh73a0: Fix fsic_spdif pin groups
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 0e6e448bdcf896d001a289a6112a704542d51516 upstream.
There are two pin groups for the FSIC SPDIF signal, but the FSIC pin group array lists only one, and it refers to a nonexistent group.
--- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +2 -1
@@ -3366,7 +3366,8 @@ static const char * const fsic_groups[] = {"fsic_sclk_out" ,"fsic_data_in" ,"fsic_data_out" , - "fsic_spdif", +"fsic_spdif_0" , + "fsic_spdif_1", }; static const char * const fsid_groups[] = {
Signature · 1 line
2.7.4
PATCH v2 50/51 pinctrl: sh-pfc: sh73a0: Add missing TO pin to tpu4_to3 group
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 124cde98f856b6206b804acbdec3b7c80f8c3427 upstream.
The tpu4_to3_mux[] array contains the TPU4TO3 pin mark, but the tpu4_to3_pins[] array lacks the corresponding pin number.
Add the missing pin number, for non-GPIO pin F26.
--- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 1 + 1 file changed, 1 insertion(+)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +1 -0
@@ -3086,6 +3086,7 @@ static const unsigned int tpu4_to2_mux[] = { };static const unsigned int tpu4_to3_pins[] = {/* TO */ +PIN_NUMBER (6 ,26 ), };static const unsigned int tpu4_to3_mux[] = {TPU4TO3_MARK ,
Signature · 1 line
2.7.4
PATCH v2 51/51 pinctrl: sh-pfc: sh73a0: Use new macros for non-GPIO pins
In reply to Fabrizio CastroFrom: Geert Uytterhoeven <[email protected]>
commit 25491559322e435c47731fd65f0dd9fb88a0b213 upstream.
Update the SH-Mobile AG5 pin control driver to use the new macros for describing pins without GPIO functionality. This replaces the use of physical pin numbers on the SH-Mobile AG5 SoC (in 34x34 BGA package) by symbolic enum values, referring to signal names.
Note that the user-visible names of these pins are still based on pin numbers instead of signal names, to preserve DT backwards compatibility.
--- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
drivers/pinctrl/sh-pfc/pfc-sh73a0.c +12 -7
@@ -56,6 +56,9 @@ PORT_1(288, fn, pfx##288, sfx), PORT_1(289, fn, pfx##289, sfx), \ PORT_10(290, fn, pfx##29, sfx), PORT_10(300, fn, pfx##30, sfx) +#define CPU_ALL_NOGP (fn) \ + PIN_NOGP(A11, "F26", fn) +enum {PINMUX_RESERVED =0 ,
@@ -1171,11 +1174,13 @@ static const u16 pinmux_data[] = {#define SH73A0_PIN_IO_PU_PD (pin) SH_PFC_PIN_CFG(pin, __IO | __PUD)#define SH73A0_PIN_O (pin) SH_PFC_PIN_CFG(pin, __O) -/* Pin numbers for pins without a corresponding GPIO port number are computed -* from the row and column numbers with a 1000 offset to avoid collisions with -* GPIO port numbers. +/* +* Pins not associated with a GPIO port. */ -#define PIN_NUMBER (row, col) (1000+((row)-1)*34+(col)-1) +enum { + PORT_ASSIGN_LAST(), + NOGP_ALL(), +};static const struct sh_pfc_pin pinmux_pins[] = {/* Table 25-1 (I/O and Pull U/D) */
@@ -1450,7 +1455,7 @@ static const struct sh_pfc_pin pinmux_pins[] = {SH73A0_PIN_O (309 ),/* Pins not associated with a GPIO port */ - SH_PFC_PIN_NAMED(6, 26, F26), + PINMUX_NOGP_ALL(), };/* - BSC -------------------------------------------------------------------- */
@@ -1876,7 +1881,7 @@ static const unsigned int keysc_out7_2_mux[] = { };static const unsigned int keysc_out8_0_pins[] = {/* KEYOUT8 */ -PIN_NUMBER (6 ,26 ), +PIN_A11 , };static const unsigned int keysc_out8_0_mux[] = {KEYOUT8_MARK ,
@@ -3086,7 +3091,7 @@ static const unsigned int tpu4_to2_mux[] = { };static const unsigned int tpu4_to3_pins[] = {/* TO */ -PIN_NUMBER (6 ,26 ), +PIN_A11 , };static const unsigned int tpu4_to3_mux[] = {TPU4TO3_MARK ,
Signature · 1 line
2.7.4
v2 cover Fast forward sh-pfc
In reply to Fabrizio CastroHi!
Quoted 10 lines
v1 had build time issues on ARM with
shmobile_defconfig, this series includes the patches to fix those issues (and some cosmetic improvements while at it).
The troublesome SoC specific pinctrl drivers are not related to the SoCs looked after by CIP, therefore we would not be testing those fixes on real HW.
I am not sure this series is worth applying due to the amount of untested changes, and yet on the other hand it would facilitate future development. I would like to hear your thoughts about this, Pavel? Chris? Biju? Ben?
Ok, so 1-41 is already applied. I applied 43 and 44, as that should fix the build. ...it did not.
I reviewed the rest of patches, and do not see anything obviously wrong. They would affect dts, and I see value in keeping that compatible between 4.19 and mainline.
And ... it is "just" 8 patches now, and they won't do damage outside of shmobile. I applied them, and it fixed the build problem on the gitlab.
Please take a look and let me know if something is still broken. (We can still revert whole series).
Best regards,
Pavel
Signature · 9 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <http://lists.cip-project.org/pipermail/cip-dev/attachments/20190830/350c4eb2/attachment-0001.sig>