aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pinctrl/sh-pfc/core.c19
-rw-r--r--drivers/pinctrl/sh-pfc/core.h34
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c2
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7740.c12
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a7779.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7203.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7264.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7269.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7372.c12
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh73a0.c14
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7720.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7722.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7723.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7724.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7734.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7757.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7785.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-sh7786.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-shx3.c10
-rw-r--r--drivers/pinctrl/sh-pfc/pinctrl.c5
-rw-r--r--drivers/pinctrl/sh-pfc/sh_pfc.h20
21 files changed, 125 insertions, 123 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c
index e2864ec900f4..3a949465e88e 100644
--- a/drivers/pinctrl/sh-pfc/core.c
+++ b/drivers/pinctrl/sh-pfc/core.c
@@ -96,7 +96,8 @@ int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin)
96 return -1; 96 return -1;
97} 97}
98 98
99static int sh_pfc_enum_in_range(pinmux_enum_t enum_id, struct pinmux_range *r) 99static int sh_pfc_enum_in_range(pinmux_enum_t enum_id,
100 const struct pinmux_range *r)
100{ 101{
101 if (enum_id < r->begin) 102 if (enum_id < r->begin)
102 return 0; 103 return 0;
@@ -142,7 +143,7 @@ void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned long reg_width,
142} 143}
143 144
144static void sh_pfc_config_reg_helper(struct sh_pfc *pfc, 145static void sh_pfc_config_reg_helper(struct sh_pfc *pfc,
145 struct pinmux_cfg_reg *crp, 146 const struct pinmux_cfg_reg *crp,
146 unsigned long in_pos, 147 unsigned long in_pos,
147 void __iomem **mapped_regp, 148 void __iomem **mapped_regp,
148 unsigned long *maskp, 149 unsigned long *maskp,
@@ -164,7 +165,7 @@ static void sh_pfc_config_reg_helper(struct sh_pfc *pfc,
164} 165}
165 166
166static void sh_pfc_write_config_reg(struct sh_pfc *pfc, 167static void sh_pfc_write_config_reg(struct sh_pfc *pfc,
167 struct pinmux_cfg_reg *crp, 168 const struct pinmux_cfg_reg *crp,
168 unsigned long field, unsigned long value) 169 unsigned long field, unsigned long value)
169{ 170{
170 void __iomem *mapped_reg; 171 void __iomem *mapped_reg;
@@ -192,10 +193,10 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc,
192} 193}
193 194
194static int sh_pfc_get_config_reg(struct sh_pfc *pfc, pinmux_enum_t enum_id, 195static int sh_pfc_get_config_reg(struct sh_pfc *pfc, pinmux_enum_t enum_id,
195 struct pinmux_cfg_reg **crp, int *fieldp, 196 const struct pinmux_cfg_reg **crp, int *fieldp,
196 int *valuep) 197 int *valuep)
197{ 198{
198 struct pinmux_cfg_reg *config_reg; 199 const struct pinmux_cfg_reg *config_reg;
199 unsigned long r_width, f_width, curr_width, ncomb; 200 unsigned long r_width, f_width, curr_width, ncomb;
200 int k, m, n, pos, bit_pos; 201 int k, m, n, pos, bit_pos;
201 202
@@ -238,7 +239,7 @@ static int sh_pfc_get_config_reg(struct sh_pfc *pfc, pinmux_enum_t enum_id,
238static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, pinmux_enum_t mark, int pos, 239static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, pinmux_enum_t mark, int pos,
239 pinmux_enum_t *enum_idp) 240 pinmux_enum_t *enum_idp)
240{ 241{
241 pinmux_enum_t *data = pfc->info->gpio_data; 242 const pinmux_enum_t *data = pfc->info->gpio_data;
242 int k; 243 int k;
243 244
244 if (pos) { 245 if (pos) {
@@ -259,9 +260,9 @@ static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, pinmux_enum_t mark, int pos,
259 260
260int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type) 261int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type)
261{ 262{
262 struct pinmux_cfg_reg *cr = NULL; 263 const struct pinmux_cfg_reg *cr = NULL;
263 pinmux_enum_t enum_id; 264 pinmux_enum_t enum_id;
264 struct pinmux_range *range; 265 const struct pinmux_range *range;
265 int in_range, pos, field, value; 266 int in_range, pos, field, value;
266 267
267 switch (pinmux_type) { 268 switch (pinmux_type) {
@@ -352,7 +353,7 @@ int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type)
352 353
353static int sh_pfc_probe(struct platform_device *pdev) 354static int sh_pfc_probe(struct platform_device *pdev)
354{ 355{
355 struct sh_pfc_soc_info *info; 356 const struct sh_pfc_soc_info *info;
356 struct sh_pfc *pfc; 357 struct sh_pfc *pfc;
357 int ret; 358 int ret;
358 359
diff --git a/drivers/pinctrl/sh-pfc/core.h b/drivers/pinctrl/sh-pfc/core.h
index 7b2b4f0accfc..763d717ca979 100644
--- a/drivers/pinctrl/sh-pfc/core.h
+++ b/drivers/pinctrl/sh-pfc/core.h
@@ -26,7 +26,7 @@ struct sh_pfc_pinctrl;
26 26
27struct sh_pfc { 27struct sh_pfc {
28 struct device *dev; 28 struct device *dev;
29 struct sh_pfc_soc_info *info; 29 const struct sh_pfc_soc_info *info;
30 spinlock_t lock; 30 spinlock_t lock;
31 31
32 unsigned int num_windows; 32 unsigned int num_windows;
@@ -54,21 +54,21 @@ void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned long reg_width,
54int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin); 54int sh_pfc_get_pin_index(struct sh_pfc *pfc, unsigned int pin);
55int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type); 55int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned mark, int pinmux_type);
56 56
57extern struct sh_pfc_soc_info r8a7740_pinmux_info; 57extern const struct sh_pfc_soc_info r8a7740_pinmux_info;
58extern struct sh_pfc_soc_info r8a7779_pinmux_info; 58extern const struct sh_pfc_soc_info r8a7779_pinmux_info;
59extern struct sh_pfc_soc_info sh7203_pinmux_info; 59extern const struct sh_pfc_soc_info sh7203_pinmux_info;
60extern struct sh_pfc_soc_info sh7264_pinmux_info; 60extern const struct sh_pfc_soc_info sh7264_pinmux_info;
61extern struct sh_pfc_soc_info sh7269_pinmux_info; 61extern const struct sh_pfc_soc_info sh7269_pinmux_info;
62extern struct sh_pfc_soc_info sh7372_pinmux_info; 62extern const struct sh_pfc_soc_info sh7372_pinmux_info;
63extern struct sh_pfc_soc_info sh73a0_pinmux_info; 63extern const struct sh_pfc_soc_info sh73a0_pinmux_info;
64extern struct sh_pfc_soc_info sh7720_pinmux_info; 64extern const struct sh_pfc_soc_info sh7720_pinmux_info;
65extern struct sh_pfc_soc_info sh7722_pinmux_info; 65extern const struct sh_pfc_soc_info sh7722_pinmux_info;
66extern struct sh_pfc_soc_info sh7723_pinmux_info; 66extern const struct sh_pfc_soc_info sh7723_pinmux_info;
67extern struct sh_pfc_soc_info sh7724_pinmux_info; 67extern const struct sh_pfc_soc_info sh7724_pinmux_info;
68extern struct sh_pfc_soc_info sh7734_pinmux_info; 68extern const struct sh_pfc_soc_info sh7734_pinmux_info;
69extern struct sh_pfc_soc_info sh7757_pinmux_info; 69extern const struct sh_pfc_soc_info sh7757_pinmux_info;
70extern struct sh_pfc_soc_info sh7785_pinmux_info; 70extern const struct sh_pfc_soc_info sh7785_pinmux_info;
71extern struct sh_pfc_soc_info sh7786_pinmux_info; 71extern const struct sh_pfc_soc_info sh7786_pinmux_info;
72extern struct sh_pfc_soc_info shx3_pinmux_info; 72extern const struct sh_pfc_soc_info shx3_pinmux_info;
73 73
74#endif /* __SH_PFC_CORE_H__ */ 74#endif /* __SH_PFC_CORE_H__ */
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 761a0dad0450..480beae2ee67 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -82,7 +82,7 @@ static void gpio_setup_data_reg(struct sh_pfc_chip *chip, unsigned gpio)
82{ 82{
83 struct sh_pfc *pfc = chip->pfc; 83 struct sh_pfc *pfc = chip->pfc;
84 struct sh_pfc_gpio_pin *gpio_pin = &chip->pins[gpio]; 84 struct sh_pfc_gpio_pin *gpio_pin = &chip->pins[gpio];
85 struct sh_pfc_pin *pin = &pfc->info->pins[gpio]; 85 const struct sh_pfc_pin *pin = &pfc->info->pins[gpio];
86 const struct pinmux_data_reg *dreg; 86 const struct pinmux_data_reg *dreg;
87 unsigned int bit; 87 unsigned int bit;
88 unsigned int i; 88 unsigned int i;
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
index fd91381aaaf3..de13348be5c0 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
@@ -577,7 +577,7 @@ enum {
577 PINMUX_MARK_END, 577 PINMUX_MARK_END,
578}; 578};
579 579
580static pinmux_enum_t pinmux_data[] = { 580static const pinmux_enum_t pinmux_data[] = {
581 /* specify valid pin states for each pin in GPIO mode */ 581 /* specify valid pin states for each pin in GPIO mode */
582 582
583 /* I/O and Pull U/D */ 583 /* I/O and Pull U/D */
@@ -1660,7 +1660,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1660 1660
1661#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1661#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1662 1662
1663static struct pinmux_func pinmux_func_gpios[] = { 1663static const struct pinmux_func pinmux_func_gpios[] = {
1664 /* IRQ */ 1664 /* IRQ */
1665 GPIO_FN(IRQ0_PORT2), GPIO_FN(IRQ0_PORT13), 1665 GPIO_FN(IRQ0_PORT2), GPIO_FN(IRQ0_PORT13),
1666 GPIO_FN(IRQ1), 1666 GPIO_FN(IRQ1),
@@ -2128,7 +2128,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
2128 GPIO_FN(TRACEAUD_FROM_MEMC), 2128 GPIO_FN(TRACEAUD_FROM_MEMC),
2129}; 2129};
2130 2130
2131static struct pinmux_cfg_reg pinmux_config_regs[] = { 2131static const struct pinmux_cfg_reg pinmux_config_regs[] = {
2132 PORTCR(0, 0xe6050000), /* PORT0CR */ 2132 PORTCR(0, 0xe6050000), /* PORT0CR */
2133 PORTCR(1, 0xe6050001), /* PORT1CR */ 2133 PORTCR(1, 0xe6050001), /* PORT1CR */
2134 PORTCR(2, 0xe6050002), /* PORT2CR */ 2134 PORTCR(2, 0xe6050002), /* PORT2CR */
@@ -2442,7 +2442,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2442 { }, 2442 { },
2443}; 2443};
2444 2444
2445static struct pinmux_data_reg pinmux_data_regs[] = { 2445static const struct pinmux_data_reg pinmux_data_regs[] = {
2446 { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054800, 32) { 2446 { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054800, 32) {
2447 PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, 2447 PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA,
2448 PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, 2448 PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA,
@@ -2546,7 +2546,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2546 { }, 2546 { },
2547}; 2547};
2548 2548
2549static struct pinmux_irq pinmux_irqs[] = { 2549static const struct pinmux_irq pinmux_irqs[] = {
2550 PINMUX_IRQ(evt2irq(0x0200), GPIO_PORT2, GPIO_PORT13), /* IRQ0A */ 2550 PINMUX_IRQ(evt2irq(0x0200), GPIO_PORT2, GPIO_PORT13), /* IRQ0A */
2551 PINMUX_IRQ(evt2irq(0x0220), GPIO_PORT20), /* IRQ1A */ 2551 PINMUX_IRQ(evt2irq(0x0220), GPIO_PORT20), /* IRQ1A */
2552 PINMUX_IRQ(evt2irq(0x0240), GPIO_PORT11, GPIO_PORT12), /* IRQ2A */ 2552 PINMUX_IRQ(evt2irq(0x0240), GPIO_PORT11, GPIO_PORT12), /* IRQ2A */
@@ -2581,7 +2581,7 @@ static struct pinmux_irq pinmux_irqs[] = {
2581 PINMUX_IRQ(evt2irq(0x33E0), GPIO_PORT41, GPIO_PORT167),/* IRQ31A */ 2581 PINMUX_IRQ(evt2irq(0x33E0), GPIO_PORT41, GPIO_PORT167),/* IRQ31A */
2582}; 2582};
2583 2583
2584struct sh_pfc_soc_info r8a7740_pinmux_info = { 2584const struct sh_pfc_soc_info r8a7740_pinmux_info = {
2585 .name = "r8a7740_pfc", 2585 .name = "r8a7740_pfc",
2586 .input = { PINMUX_INPUT_BEGIN, 2586 .input = { PINMUX_INPUT_BEGIN,
2587 PINMUX_INPUT_END }, 2587 PINMUX_INPUT_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7779.c b/drivers/pinctrl/sh-pfc/pfc-r8a7779.c
index e9a7ead139fa..eb5685848b68 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a7779.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7779.c
@@ -631,7 +631,7 @@ enum {
631 PINMUX_MARK_END, 631 PINMUX_MARK_END,
632}; 632};
633 633
634static pinmux_enum_t pinmux_data[] = { 634static const pinmux_enum_t pinmux_data[] = {
635 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */ 635 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */
636 636
637 PINMUX_DATA(AVS1_MARK, FN_AVS1), 637 PINMUX_DATA(AVS1_MARK, FN_AVS1),
@@ -1438,7 +1438,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1438 1438
1439#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1439#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1440 1440
1441static struct pinmux_func pinmux_func_gpios[] = { 1441static const struct pinmux_func pinmux_func_gpios[] = {
1442 GPIO_FN(AVS1), GPIO_FN(AVS2), GPIO_FN(A17), GPIO_FN(A18), 1442 GPIO_FN(AVS1), GPIO_FN(AVS2), GPIO_FN(A17), GPIO_FN(A18),
1443 GPIO_FN(A19), 1443 GPIO_FN(A19),
1444 1444
@@ -1710,7 +1710,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1710 GPIO_FN(VI3_DATA7), GPIO_FN(GPS_MAG), GPIO_FN(FCE), GPIO_FN(SCK4_B), 1710 GPIO_FN(VI3_DATA7), GPIO_FN(GPS_MAG), GPIO_FN(FCE), GPIO_FN(SCK4_B),
1711}; 1711};
1712 1712
1713static struct pinmux_cfg_reg pinmux_config_regs[] = { 1713static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1714 { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1) { 1714 { PINMUX_CFG_REG("GPSR0", 0xfffc0004, 32, 1) {
1715 GP_0_31_FN, FN_IP3_31_29, 1715 GP_0_31_FN, FN_IP3_31_29,
1716 GP_0_30_FN, FN_IP3_26_24, 1716 GP_0_30_FN, FN_IP3_26_24,
@@ -2571,7 +2571,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2571 { }, 2571 { },
2572}; 2572};
2573 2573
2574static struct pinmux_data_reg pinmux_data_regs[] = { 2574static const struct pinmux_data_reg pinmux_data_regs[] = {
2575 { PINMUX_DATA_REG("INDT0", 0xffc40008, 32) { GP_INDT(0) } }, 2575 { PINMUX_DATA_REG("INDT0", 0xffc40008, 32) { GP_INDT(0) } },
2576 { PINMUX_DATA_REG("INDT1", 0xffc41008, 32) { GP_INDT(1) } }, 2576 { PINMUX_DATA_REG("INDT1", 0xffc41008, 32) { GP_INDT(1) } },
2577 { PINMUX_DATA_REG("INDT2", 0xffc42008, 32) { GP_INDT(2) } }, 2577 { PINMUX_DATA_REG("INDT2", 0xffc42008, 32) { GP_INDT(2) } },
@@ -2587,7 +2587,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2587 { }, 2587 { },
2588}; 2588};
2589 2589
2590struct sh_pfc_soc_info r8a7779_pinmux_info = { 2590const struct sh_pfc_soc_info r8a7779_pinmux_info = {
2591 .name = "r8a7779_pfc", 2591 .name = "r8a7779_pfc",
2592 2592
2593 .unlock_reg = 0xfffc0000, /* PMMR */ 2593 .unlock_reg = 0xfffc0000, /* PMMR */
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7203.c b/drivers/pinctrl/sh-pfc/pfc-sh7203.c
index fc4a1280accb..f63d51dc3f4c 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7203.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7203.c
@@ -272,7 +272,7 @@ enum {
272 PINMUX_MARK_END, 272 PINMUX_MARK_END,
273}; 273};
274 274
275static pinmux_enum_t pinmux_data[] = { 275static const pinmux_enum_t pinmux_data[] = {
276 276
277 /* PA */ 277 /* PA */
278 PINMUX_DATA(PA7_DATA, PA7_IN), 278 PINMUX_DATA(PA7_DATA, PA7_IN),
@@ -819,7 +819,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
819 819
820#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 820#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
821 821
822static struct pinmux_func pinmux_func_gpios[] = { 822static const struct pinmux_func pinmux_func_gpios[] = {
823 /* INTC */ 823 /* INTC */
824 GPIO_FN(PINT7_PB), 824 GPIO_FN(PINT7_PB),
825 GPIO_FN(PINT6_PB), 825 GPIO_FN(PINT6_PB),
@@ -1077,7 +1077,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1077 GPIO_FN(LCD_DATA0), 1077 GPIO_FN(LCD_DATA0),
1078}; 1078};
1079 1079
1080static struct pinmux_cfg_reg pinmux_config_regs[] = { 1080static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1081 { PINMUX_CFG_REG("PBIORL", 0xfffe3886, 16, 1) { 1081 { PINMUX_CFG_REG("PBIORL", 0xfffe3886, 16, 1) {
1082 0, 0, 1082 0, 0,
1083 0, 0, 1083 0, 0,
@@ -1529,7 +1529,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
1529 {} 1529 {}
1530}; 1530};
1531 1531
1532static struct pinmux_data_reg pinmux_data_regs[] = { 1532static const struct pinmux_data_reg pinmux_data_regs[] = {
1533 { PINMUX_DATA_REG("PADRL", 0xfffe3802, 16) { 1533 { PINMUX_DATA_REG("PADRL", 0xfffe3802, 16) {
1534 0, 0, 0, 0, 1534 0, 0, 0, 0,
1535 0, 0, 0, 0, 1535 0, 0, 0, 0,
@@ -1575,7 +1575,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
1575 { }, 1575 { },
1576}; 1576};
1577 1577
1578struct sh_pfc_soc_info sh7203_pinmux_info = { 1578const struct sh_pfc_soc_info sh7203_pinmux_info = {
1579 .name = "sh7203_pfc", 1579 .name = "sh7203_pfc",
1580 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END, FORCE_IN }, 1580 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END, FORCE_IN },
1581 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END, FORCE_OUT }, 1581 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END, FORCE_OUT },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7264.c b/drivers/pinctrl/sh-pfc/pfc-sh7264.c
index c03365cd945d..284675249ed9 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7264.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7264.c
@@ -604,7 +604,7 @@ enum {
604 PINMUX_MARK_END, 604 PINMUX_MARK_END,
605}; 605};
606 606
607static pinmux_enum_t pinmux_data[] = { 607static const pinmux_enum_t pinmux_data[] = {
608 608
609 /* Port A */ 609 /* Port A */
610 PINMUX_DATA(PA3_DATA, PA3_IN), 610 PINMUX_DATA(PA3_DATA, PA3_IN),
@@ -1220,7 +1220,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1220 1220
1221#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1221#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1222 1222
1223static struct pinmux_func pinmux_func_gpios[] = { 1223static const struct pinmux_func pinmux_func_gpios[] = {
1224 /* INTC */ 1224 /* INTC */
1225 GPIO_FN(PINT7_PG), 1225 GPIO_FN(PINT7_PG),
1226 GPIO_FN(PINT6_PG), 1226 GPIO_FN(PINT6_PG),
@@ -1470,7 +1470,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1470 GPIO_FN(LCD_M_DISP), 1470 GPIO_FN(LCD_M_DISP),
1471}; 1471};
1472 1472
1473static struct pinmux_cfg_reg pinmux_config_regs[] = { 1473static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1474 { PINMUX_CFG_REG("PAIOR0", 0xfffe3812, 16, 1) { 1474 { PINMUX_CFG_REG("PAIOR0", 0xfffe3812, 16, 1) {
1475 0, 0, 0, 0, 0, 0, 0, 0, 1475 0, 0, 0, 0, 0, 0, 0, 0,
1476 0, 0, 0, 0, 0, 0, 0, 0, 1476 0, 0, 0, 0, 0, 0, 0, 0,
@@ -2036,7 +2036,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2036 {} 2036 {}
2037}; 2037};
2038 2038
2039static struct pinmux_data_reg pinmux_data_regs[] = { 2039static const struct pinmux_data_reg pinmux_data_regs[] = {
2040 { PINMUX_DATA_REG("PADR1", 0xfffe3814, 16) { 2040 { PINMUX_DATA_REG("PADR1", 0xfffe3814, 16) {
2041 0, 0, 0, 0, 0, 0, 0, PA3_DATA, 2041 0, 0, 0, 0, 0, 0, 0, PA3_DATA,
2042 0, 0, 0, 0, 0, 0, 0, PA2_DATA } 2042 0, 0, 0, 0, 0, 0, 0, PA2_DATA }
@@ -2114,7 +2114,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2114 { } 2114 { }
2115}; 2115};
2116 2116
2117struct sh_pfc_soc_info sh7264_pinmux_info = { 2117const struct sh_pfc_soc_info sh7264_pinmux_info = {
2118 .name = "sh7264_pfc", 2118 .name = "sh7264_pfc",
2119 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END, FORCE_IN }, 2119 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END, FORCE_IN },
2120 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END, FORCE_OUT }, 2120 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END, FORCE_OUT },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7269.c b/drivers/pinctrl/sh-pfc/pfc-sh7269.c
index 1fa0950519e4..4c401a74acd5 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7269.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7269.c
@@ -781,7 +781,7 @@ enum {
781 PINMUX_MARK_END, 781 PINMUX_MARK_END,
782}; 782};
783 783
784static pinmux_enum_t pinmux_data[] = { 784static const pinmux_enum_t pinmux_data[] = {
785 785
786 /* Port A */ 786 /* Port A */
787 PINMUX_DATA(PA1_DATA, PA1_IN), 787 PINMUX_DATA(PA1_DATA, PA1_IN),
@@ -1617,7 +1617,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1617 1617
1618#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1618#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1619 1619
1620static struct pinmux_func pinmux_func_gpios[] = { 1620static const struct pinmux_func pinmux_func_gpios[] = {
1621 /* INTC */ 1621 /* INTC */
1622 GPIO_FN(IRQ7_PG), 1622 GPIO_FN(IRQ7_PG),
1623 GPIO_FN(IRQ6_PG), 1623 GPIO_FN(IRQ6_PG),
@@ -1949,7 +1949,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1949 GPIO_FN(LCD_M_DISP), 1949 GPIO_FN(LCD_M_DISP),
1950}; 1950};
1951 1951
1952static struct pinmux_cfg_reg pinmux_config_regs[] = { 1952static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1953 /* "name" addr register_size Field_Width */ 1953 /* "name" addr register_size Field_Width */
1954 1954
1955 /* where Field_Width is 1 for single mode registers or 4 for upto 16 1955 /* where Field_Width is 1 for single mode registers or 4 for upto 16
@@ -2738,7 +2738,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2738 {} 2738 {}
2739}; 2739};
2740 2740
2741static struct pinmux_data_reg pinmux_data_regs[] = { 2741static const struct pinmux_data_reg pinmux_data_regs[] = {
2742 { PINMUX_DATA_REG("PADR0", 0xfffe3816, 16) { 2742 { PINMUX_DATA_REG("PADR0", 0xfffe3816, 16) {
2743 0, 0, 0, 0, 0, 0, 0, PA1_DATA, 2743 0, 0, 0, 0, 0, 0, 0, PA1_DATA,
2744 0, 0, 0, 0, 0, 0, 0, PA0_DATA } 2744 0, 0, 0, 0, 0, 0, 0, PA0_DATA }
@@ -2817,7 +2817,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2817 { } 2817 { }
2818}; 2818};
2819 2819
2820struct sh_pfc_soc_info sh7269_pinmux_info = { 2820const struct sh_pfc_soc_info sh7269_pinmux_info = {
2821 .name = "sh7269_pfc", 2821 .name = "sh7269_pfc",
2822 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END, FORCE_IN }, 2822 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END, FORCE_IN },
2823 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END, FORCE_OUT }, 2823 .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END, FORCE_OUT },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
index 847e0cd1b748..6b5634454956 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c
@@ -368,7 +368,7 @@ enum {
368 PINMUX_MARK_END, 368 PINMUX_MARK_END,
369}; 369};
370 370
371static pinmux_enum_t pinmux_data[] = { 371static const pinmux_enum_t pinmux_data[] = {
372 372
373 /* specify valid pin states for each pin in GPIO mode */ 373 /* specify valid pin states for each pin in GPIO mode */
374 PORT_DATA_IO_PD(0), PORT_DATA_IO_PD(1), 374 PORT_DATA_IO_PD(0), PORT_DATA_IO_PD(1),
@@ -935,7 +935,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
935 935
936#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 936#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
937 937
938static struct pinmux_func pinmux_func_gpios[] = { 938static const struct pinmux_func pinmux_func_gpios[] = {
939 /* IRQ */ 939 /* IRQ */
940 GPIO_FN(IRQ0_6), GPIO_FN(IRQ0_162), GPIO_FN(IRQ1), 940 GPIO_FN(IRQ0_6), GPIO_FN(IRQ0_162), GPIO_FN(IRQ1),
941 GPIO_FN(IRQ2_4), GPIO_FN(IRQ2_5), GPIO_FN(IRQ3_8), 941 GPIO_FN(IRQ2_4), GPIO_FN(IRQ2_5), GPIO_FN(IRQ3_8),
@@ -1202,7 +1202,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1202 GPIO_FN(SDENC_DV_CLKI), 1202 GPIO_FN(SDENC_DV_CLKI),
1203}; 1203};
1204 1204
1205static struct pinmux_cfg_reg pinmux_config_regs[] = { 1205static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1206 PORTCR(0, 0xE6051000), /* PORT0CR */ 1206 PORTCR(0, 0xE6051000), /* PORT0CR */
1207 PORTCR(1, 0xE6051001), /* PORT1CR */ 1207 PORTCR(1, 0xE6051001), /* PORT1CR */
1208 PORTCR(2, 0xE6051002), /* PORT2CR */ 1208 PORTCR(2, 0xE6051002), /* PORT2CR */
@@ -1474,7 +1474,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
1474 { }, 1474 { },
1475}; 1475};
1476 1476
1477static struct pinmux_data_reg pinmux_data_regs[] = { 1477static const struct pinmux_data_reg pinmux_data_regs[] = {
1478 { PINMUX_DATA_REG("PORTL095_064DR", 0xE6054008, 32) { 1478 { PINMUX_DATA_REG("PORTL095_064DR", 0xE6054008, 32) {
1479 PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA, 1479 PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA,
1480 PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA, 1480 PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA,
@@ -1599,7 +1599,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
1599 1599
1600#define EXT_IRQ16L(n) evt2irq(0x200 + ((n) << 5)) 1600#define EXT_IRQ16L(n) evt2irq(0x200 + ((n) << 5))
1601#define EXT_IRQ16H(n) evt2irq(0x3200 + (((n) - 16) << 5)) 1601#define EXT_IRQ16H(n) evt2irq(0x3200 + (((n) - 16) << 5))
1602static struct pinmux_irq pinmux_irqs[] = { 1602static const struct pinmux_irq pinmux_irqs[] = {
1603 PINMUX_IRQ(EXT_IRQ16L(0), GPIO_PORT6, GPIO_PORT162), 1603 PINMUX_IRQ(EXT_IRQ16L(0), GPIO_PORT6, GPIO_PORT162),
1604 PINMUX_IRQ(EXT_IRQ16L(1), GPIO_PORT12), 1604 PINMUX_IRQ(EXT_IRQ16L(1), GPIO_PORT12),
1605 PINMUX_IRQ(EXT_IRQ16L(2), GPIO_PORT4, GPIO_PORT5), 1605 PINMUX_IRQ(EXT_IRQ16L(2), GPIO_PORT4, GPIO_PORT5),
@@ -1634,7 +1634,7 @@ static struct pinmux_irq pinmux_irqs[] = {
1634 PINMUX_IRQ(EXT_IRQ16H(31), GPIO_PORT138, GPIO_PORT184), 1634 PINMUX_IRQ(EXT_IRQ16H(31), GPIO_PORT138, GPIO_PORT184),
1635}; 1635};
1636 1636
1637struct sh_pfc_soc_info sh7372_pinmux_info = { 1637const struct sh_pfc_soc_info sh7372_pinmux_info = {
1638 .name = "sh7372_pfc", 1638 .name = "sh7372_pfc",
1639 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 1639 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1640 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 1640 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
index 9cef0d8b8ccd..3200fc2f34b1 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
@@ -509,7 +509,7 @@ enum {
509 PINMUX_MARK_END, 509 PINMUX_MARK_END,
510}; 510};
511 511
512static pinmux_enum_t pinmux_data[] = { 512static const pinmux_enum_t pinmux_data[] = {
513 /* specify valid pin states for each pin in GPIO mode */ 513 /* specify valid pin states for each pin in GPIO mode */
514 514
515 /* Table 25-1 (I/O and Pull U/D) */ 515 /* Table 25-1 (I/O and Pull U/D) */
@@ -1543,7 +1543,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1543 GPIO_PORT_ALL(), 1543 GPIO_PORT_ALL(),
1544}; 1544};
1545 1545
1546static struct pinmux_range pinmux_ranges[] = { 1546static const struct pinmux_range pinmux_ranges[] = {
1547 {.begin = 0, .end = 118,}, 1547 {.begin = 0, .end = 118,},
1548 {.begin = 128, .end = 164,}, 1548 {.begin = 128, .end = 164,},
1549 {.begin = 192, .end = 282,}, 1549 {.begin = 192, .end = 282,},
@@ -1552,7 +1552,7 @@ static struct pinmux_range pinmux_ranges[] = {
1552 1552
1553#define PINMUX_FN_BASE GPIO_FN_VBUS_0 1553#define PINMUX_FN_BASE GPIO_FN_VBUS_0
1554 1554
1555static struct pinmux_func pinmux_func_gpios[] = { 1555static const struct pinmux_func pinmux_func_gpios[] = {
1556 /* Table 25-1 (Functions 0-7) */ 1556 /* Table 25-1 (Functions 0-7) */
1557 GPIO_FN(VBUS_0), 1557 GPIO_FN(VBUS_0),
1558 GPIO_FN(GPI0), 1558 GPIO_FN(GPI0),
@@ -2228,7 +2228,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
2228 GPIO_FN(FSIAISLD_PU), 2228 GPIO_FN(FSIAISLD_PU),
2229}; 2229};
2230 2230
2231static struct pinmux_cfg_reg pinmux_config_regs[] = { 2231static const struct pinmux_cfg_reg pinmux_config_regs[] = {
2232 PORTCR(0, 0xe6050000), /* PORT0CR */ 2232 PORTCR(0, 0xe6050000), /* PORT0CR */
2233 PORTCR(1, 0xe6050001), /* PORT1CR */ 2233 PORTCR(1, 0xe6050001), /* PORT1CR */
2234 PORTCR(2, 0xe6050002), /* PORT2CR */ 2234 PORTCR(2, 0xe6050002), /* PORT2CR */
@@ -2636,7 +2636,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2636 { }, 2636 { },
2637}; 2637};
2638 2638
2639static struct pinmux_data_reg pinmux_data_regs[] = { 2639static const struct pinmux_data_reg pinmux_data_regs[] = {
2640 { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) { 2640 { PINMUX_DATA_REG("PORTL031_000DR", 0xe6054000, 32) {
2641 PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA, 2641 PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA,
2642 PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA, 2642 PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA,
@@ -2744,7 +2744,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2744#define EXT_IRQ16L(n) intcs_evt2irq(0x200 + ((n) << 5)) 2744#define EXT_IRQ16L(n) intcs_evt2irq(0x200 + ((n) << 5))
2745#define EXT_IRQ16H(n) intcs_evt2irq(0x3200 + ((n - 16) << 5)) 2745#define EXT_IRQ16H(n) intcs_evt2irq(0x3200 + ((n - 16) << 5))
2746 2746
2747static struct pinmux_irq pinmux_irqs[] = { 2747static const struct pinmux_irq pinmux_irqs[] = {
2748 PINMUX_IRQ(EXT_IRQ16H(19), 9), 2748 PINMUX_IRQ(EXT_IRQ16H(19), 9),
2749 PINMUX_IRQ(EXT_IRQ16L(1), 10), 2749 PINMUX_IRQ(EXT_IRQ16L(1), 10),
2750 PINMUX_IRQ(EXT_IRQ16L(0), 11), 2750 PINMUX_IRQ(EXT_IRQ16L(0), 11),
@@ -2779,7 +2779,7 @@ static struct pinmux_irq pinmux_irqs[] = {
2779 PINMUX_IRQ(EXT_IRQ16L(9), 308), 2779 PINMUX_IRQ(EXT_IRQ16L(9), 308),
2780}; 2780};
2781 2781
2782struct sh_pfc_soc_info sh73a0_pinmux_info = { 2782const struct sh_pfc_soc_info sh73a0_pinmux_info = {
2783 .name = "sh73a0_pfc", 2783 .name = "sh73a0_pfc",
2784 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 2784 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
2785 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 2785 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7720.c b/drivers/pinctrl/sh-pfc/pfc-sh7720.c
index 0b3078b6acdf..52e9f6be665f 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7720.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7720.c
@@ -262,7 +262,7 @@ enum {
262 PINMUX_MARK_END, 262 PINMUX_MARK_END,
263}; 263};
264 264
265static pinmux_enum_t pinmux_data[] = { 265static const pinmux_enum_t pinmux_data[] = {
266 /* PTA GPIO */ 266 /* PTA GPIO */
267 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT, PTA7_IN_PU), 267 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT, PTA7_IN_PU),
268 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT, PTA6_IN_PU), 268 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT, PTA6_IN_PU),
@@ -763,7 +763,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
763 763
764#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 764#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
765 765
766static struct pinmux_func pinmux_func_gpios[] = { 766static const struct pinmux_func pinmux_func_gpios[] = {
767 /* BSC */ 767 /* BSC */
768 GPIO_FN(D31), 768 GPIO_FN(D31),
769 GPIO_FN(D30), 769 GPIO_FN(D30),
@@ -957,7 +957,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
957 GPIO_FN(STATUS1), 957 GPIO_FN(STATUS1),
958}; 958};
959 959
960static struct pinmux_cfg_reg pinmux_config_regs[] = { 960static const struct pinmux_cfg_reg pinmux_config_regs[] = {
961 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) { 961 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) {
962 PTA7_FN, PTA7_OUT, PTA7_IN_PU, PTA7_IN, 962 PTA7_FN, PTA7_OUT, PTA7_IN_PU, PTA7_IN,
963 PTA6_FN, PTA6_OUT, PTA6_IN_PU, PTA6_IN, 963 PTA6_FN, PTA6_OUT, PTA6_IN_PU, PTA6_IN,
@@ -1141,7 +1141,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
1141 {} 1141 {}
1142}; 1142};
1143 1143
1144static struct pinmux_data_reg pinmux_data_regs[] = { 1144static const struct pinmux_data_reg pinmux_data_regs[] = {
1145 { PINMUX_DATA_REG("PADR", 0xa4050140, 8) { 1145 { PINMUX_DATA_REG("PADR", 0xa4050140, 8) {
1146 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA, 1146 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
1147 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA } 1147 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
@@ -1217,7 +1217,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
1217 { }, 1217 { },
1218}; 1218};
1219 1219
1220struct sh_pfc_soc_info sh7720_pinmux_info = { 1220const struct sh_pfc_soc_info sh7720_pinmux_info = {
1221 .name = "sh7720_pfc", 1221 .name = "sh7720_pfc",
1222 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 1222 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1223 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 1223 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7722.c b/drivers/pinctrl/sh-pfc/pfc-sh7722.c
index 3a8d95fd3ed3..32034387477b 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7722.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7722.c
@@ -296,7 +296,7 @@ enum {
296 PINMUX_FUNCTION_END, 296 PINMUX_FUNCTION_END,
297}; 297};
298 298
299static pinmux_enum_t pinmux_data[] = { 299static const pinmux_enum_t pinmux_data[] = {
300 /* PTA */ 300 /* PTA */
301 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_IN_PD, PTA7_OUT), 301 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_IN_PD, PTA7_OUT),
302 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_IN_PD), 302 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_IN_PD),
@@ -986,7 +986,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
986 986
987#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 987#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
988 988
989static struct pinmux_func pinmux_func_gpios[] = { 989static const struct pinmux_func pinmux_func_gpios[] = {
990 /* SCIF0 */ 990 /* SCIF0 */
991 GPIO_FN(SCIF0_TXD), 991 GPIO_FN(SCIF0_TXD),
992 GPIO_FN(SCIF0_RXD), 992 GPIO_FN(SCIF0_RXD),
@@ -1268,7 +1268,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1268 GPIO_FN(KEYOUT5_IN5), 1268 GPIO_FN(KEYOUT5_IN5),
1269}; 1269};
1270 1270
1271static struct pinmux_cfg_reg pinmux_config_regs[] = { 1271static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1272 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) { 1272 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) {
1273 VIO_D7_SCIF1_SCK, PTA7_OUT, PTA7_IN_PD, PTA7_IN, 1273 VIO_D7_SCIF1_SCK, PTA7_OUT, PTA7_IN_PD, PTA7_IN,
1274 VIO_D6_SCIF1_RXD, 0, PTA6_IN_PD, PTA6_IN, 1274 VIO_D6_SCIF1_RXD, 0, PTA6_IN_PD, PTA6_IN,
@@ -1664,7 +1664,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
1664 {} 1664 {}
1665}; 1665};
1666 1666
1667static struct pinmux_data_reg pinmux_data_regs[] = { 1667static const struct pinmux_data_reg pinmux_data_regs[] = {
1668 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) { 1668 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) {
1669 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA, 1669 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
1670 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA } 1670 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
@@ -1760,7 +1760,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
1760 { }, 1760 { },
1761}; 1761};
1762 1762
1763struct sh_pfc_soc_info sh7722_pinmux_info = { 1763const struct sh_pfc_soc_info sh7722_pinmux_info = {
1764 .name = "sh7722_pfc", 1764 .name = "sh7722_pfc",
1765 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 1765 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1766 .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END }, 1766 .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7723.c b/drivers/pinctrl/sh-pfc/pfc-sh7723.c
index d8797ff4339b..07ad1d8d6c8b 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7723.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7723.c
@@ -350,7 +350,7 @@ enum {
350 PINMUX_MARK_END, 350 PINMUX_MARK_END,
351}; 351};
352 352
353static pinmux_enum_t pinmux_data[] = { 353static const pinmux_enum_t pinmux_data[] = {
354 /* PTA GPIO */ 354 /* PTA GPIO */
355 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT), 355 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
356 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT), 356 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
@@ -1143,7 +1143,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1143 1143
1144#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1144#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1145 1145
1146static struct pinmux_func pinmux_func_gpios[] = { 1146static const struct pinmux_func pinmux_func_gpios[] = {
1147 /* SCIF0 */ 1147 /* SCIF0 */
1148 GPIO_FN(SCIF0_PTT_TXD), 1148 GPIO_FN(SCIF0_PTT_TXD),
1149 GPIO_FN(SCIF0_PTT_RXD), 1149 GPIO_FN(SCIF0_PTT_RXD),
@@ -1515,7 +1515,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1515 GPIO_FN(IDEA0), 1515 GPIO_FN(IDEA0),
1516}; 1516};
1517 1517
1518static struct pinmux_cfg_reg pinmux_config_regs[] = { 1518static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1519 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) { 1519 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) {
1520 PTA7_FN, PTA7_OUT, 0, PTA7_IN, 1520 PTA7_FN, PTA7_OUT, 0, PTA7_IN,
1521 PTA6_FN, PTA6_OUT, 0, PTA6_IN, 1521 PTA6_FN, PTA6_OUT, 0, PTA6_IN,
@@ -1789,7 +1789,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
1789 {} 1789 {}
1790}; 1790};
1791 1791
1792static struct pinmux_data_reg pinmux_data_regs[] = { 1792static const struct pinmux_data_reg pinmux_data_regs[] = {
1793 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) { 1793 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) {
1794 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA, 1794 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
1795 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA } 1795 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
@@ -1885,7 +1885,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
1885 { }, 1885 { },
1886}; 1886};
1887 1887
1888struct sh_pfc_soc_info sh7723_pinmux_info = { 1888const struct sh_pfc_soc_info sh7723_pinmux_info = {
1889 .name = "sh7723_pfc", 1889 .name = "sh7723_pfc",
1890 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 1890 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1891 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 1891 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7724.c b/drivers/pinctrl/sh-pfc/pfc-sh7724.c
index 40f430be71a8..35e551609805 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7724.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7724.c
@@ -572,7 +572,7 @@ enum {
572 PINMUX_MARK_END, 572 PINMUX_MARK_END,
573}; 573};
574 574
575static pinmux_enum_t pinmux_data[] = { 575static const pinmux_enum_t pinmux_data[] = {
576 /* PTA GPIO */ 576 /* PTA GPIO */
577 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT, PTA7_IN_PU), 577 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT, PTA7_IN_PU),
578 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT, PTA6_IN_PU), 578 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT, PTA6_IN_PU),
@@ -1422,7 +1422,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1422 1422
1423#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1423#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1424 1424
1425static struct pinmux_func pinmux_func_gpios[] = { 1425static const struct pinmux_func pinmux_func_gpios[] = {
1426 /* BSC */ 1426 /* BSC */
1427 GPIO_FN(D31), 1427 GPIO_FN(D31),
1428 GPIO_FN(D30), 1428 GPIO_FN(D30),
@@ -1787,7 +1787,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1787 GPIO_FN(INTC_IRQ0), 1787 GPIO_FN(INTC_IRQ0),
1788}; 1788};
1789 1789
1790static struct pinmux_cfg_reg pinmux_config_regs[] = { 1790static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1791 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) { 1791 { PINMUX_CFG_REG("PACR", 0xa4050100, 16, 2) {
1792 PTA7_FN, PTA7_OUT, PTA7_IN_PU, PTA7_IN, 1792 PTA7_FN, PTA7_OUT, PTA7_IN_PU, PTA7_IN,
1793 PTA6_FN, PTA6_OUT, PTA6_IN_PU, PTA6_IN, 1793 PTA6_FN, PTA6_OUT, PTA6_IN_PU, PTA6_IN,
@@ -2111,7 +2111,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2111 {} 2111 {}
2112}; 2112};
2113 2113
2114static struct pinmux_data_reg pinmux_data_regs[] = { 2114static const struct pinmux_data_reg pinmux_data_regs[] = {
2115 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) { 2115 { PINMUX_DATA_REG("PADR", 0xa4050120, 8) {
2116 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA, 2116 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
2117 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA } 2117 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
@@ -2207,7 +2207,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2207 { }, 2207 { },
2208}; 2208};
2209 2209
2210struct sh_pfc_soc_info sh7724_pinmux_info = { 2210const struct sh_pfc_soc_info sh7724_pinmux_info = {
2211 .name = "sh7724_pfc", 2211 .name = "sh7724_pfc",
2212 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 2212 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
2213 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 2213 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7734.c b/drivers/pinctrl/sh-pfc/pfc-sh7734.c
index 99ea220269ff..2fd5b7d4cb94 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7734.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7734.c
@@ -592,7 +592,7 @@ enum {
592 PINMUX_MARK_END, 592 PINMUX_MARK_END,
593}; 593};
594 594
595static pinmux_enum_t pinmux_data[] = { 595static const pinmux_enum_t pinmux_data[] = {
596 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */ 596 PINMUX_DATA_GP_ALL(), /* PINMUX_DATA(GP_M_N_DATA, GP_M_N_FN...), */
597 597
598 PINMUX_DATA(CLKOUT_MARK, FN_CLKOUT), 598 PINMUX_DATA(CLKOUT_MARK, FN_CLKOUT),
@@ -1373,7 +1373,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1373 1373
1374#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1374#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1375 1375
1376static struct pinmux_func pinmux_func_gpios[] = { 1376static const struct pinmux_func pinmux_func_gpios[] = {
1377 GPIO_FN(CLKOUT), GPIO_FN(BS), GPIO_FN(CS0), GPIO_FN(EX_CS0), 1377 GPIO_FN(CLKOUT), GPIO_FN(BS), GPIO_FN(CS0), GPIO_FN(EX_CS0),
1378 GPIO_FN(RD), GPIO_FN(WE0), GPIO_FN(WE1), 1378 GPIO_FN(RD), GPIO_FN(WE0), GPIO_FN(WE1),
1379 GPIO_FN(SCL0), GPIO_FN(PENC0), GPIO_FN(USB_OVC0), 1379 GPIO_FN(SCL0), GPIO_FN(PENC0), GPIO_FN(USB_OVC0),
@@ -1652,7 +1652,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1652 GPIO_FN(SCL1), GPIO_FN(SCIF_CLK_C), 1652 GPIO_FN(SCL1), GPIO_FN(SCIF_CLK_C),
1653}; 1653};
1654 1654
1655static struct pinmux_cfg_reg pinmux_config_regs[] = { 1655static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1656 { PINMUX_CFG_REG("GPSR0", 0xFFFC0004, 32, 1) { 1656 { PINMUX_CFG_REG("GPSR0", 0xFFFC0004, 32, 1) {
1657 GP_0_31_FN, FN_IP2_2_0, 1657 GP_0_31_FN, FN_IP2_2_0,
1658 GP_0_30_FN, FN_IP1_31_29, 1658 GP_0_30_FN, FN_IP1_31_29,
@@ -2421,7 +2421,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2421 { }, 2421 { },
2422}; 2422};
2423 2423
2424static struct pinmux_data_reg pinmux_data_regs[] = { 2424static const struct pinmux_data_reg pinmux_data_regs[] = {
2425 /* GPIO 0 - 5*/ 2425 /* GPIO 0 - 5*/
2426 { PINMUX_DATA_REG("INDT0", 0xFFC4000C, 32) { GP_INDT(0) } }, 2426 { PINMUX_DATA_REG("INDT0", 0xFFC4000C, 32) { GP_INDT(0) } },
2427 { PINMUX_DATA_REG("INDT1", 0xFFC4100C, 32) { GP_INDT(1) } }, 2427 { PINMUX_DATA_REG("INDT1", 0xFFC4100C, 32) { GP_INDT(1) } },
@@ -2438,7 +2438,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2438 { }, 2438 { },
2439}; 2439};
2440 2440
2441struct sh_pfc_soc_info sh7734_pinmux_info = { 2441const struct sh_pfc_soc_info sh7734_pinmux_info = {
2442 .name = "sh7734_pfc", 2442 .name = "sh7734_pfc",
2443 2443
2444 .unlock_reg = 0xFFFC0000, 2444 .unlock_reg = 0xFFFC0000,
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7757.c b/drivers/pinctrl/sh-pfc/pfc-sh7757.c
index e81ab0ecea8c..e074230e6243 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7757.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7757.c
@@ -526,7 +526,7 @@ enum {
526 PINMUX_MARK_END, 526 PINMUX_MARK_END,
527}; 527};
528 528
529static pinmux_enum_t pinmux_data[] = { 529static const pinmux_enum_t pinmux_data[] = {
530 /* PTA GPIO */ 530 /* PTA GPIO */
531 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT), 531 PINMUX_DATA(PTA7_DATA, PTA7_IN, PTA7_OUT),
532 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT), 532 PINMUX_DATA(PTA6_DATA, PTA6_IN, PTA6_OUT),
@@ -1374,7 +1374,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
1374 1374
1375#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 1375#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
1376 1376
1377static struct pinmux_func pinmux_func_gpios[] = { 1377static const struct pinmux_func pinmux_func_gpios[] = {
1378 /* PTA (mobule: LBSC, RGMII) */ 1378 /* PTA (mobule: LBSC, RGMII) */
1379 GPIO_FN(BS), 1379 GPIO_FN(BS),
1380 GPIO_FN(RDWR), 1380 GPIO_FN(RDWR),
@@ -1726,7 +1726,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1726 GPIO_FN(ON_DQ0), 1726 GPIO_FN(ON_DQ0),
1727}; 1727};
1728 1728
1729static struct pinmux_cfg_reg pinmux_config_regs[] = { 1729static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1730 { PINMUX_CFG_REG("PACR", 0xffec0000, 16, 2) { 1730 { PINMUX_CFG_REG("PACR", 0xffec0000, 16, 2) {
1731 PTA7_FN, PTA7_OUT, PTA7_IN, PTA7_IN_PU, 1731 PTA7_FN, PTA7_OUT, PTA7_IN, PTA7_IN_PU,
1732 PTA6_FN, PTA6_OUT, PTA6_IN, PTA6_IN_PU, 1732 PTA6_FN, PTA6_OUT, PTA6_IN, PTA6_IN_PU,
@@ -2156,7 +2156,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
2156 {} 2156 {}
2157}; 2157};
2158 2158
2159static struct pinmux_data_reg pinmux_data_regs[] = { 2159static const struct pinmux_data_reg pinmux_data_regs[] = {
2160 { PINMUX_DATA_REG("PADR", 0xffec0034, 8) { 2160 { PINMUX_DATA_REG("PADR", 0xffec0034, 8) {
2161 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA, 2161 PTA7_DATA, PTA6_DATA, PTA5_DATA, PTA4_DATA,
2162 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA } 2162 PTA3_DATA, PTA2_DATA, PTA1_DATA, PTA0_DATA }
@@ -2264,7 +2264,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2264 { }, 2264 { },
2265}; 2265};
2266 2266
2267struct sh_pfc_soc_info sh7757_pinmux_info = { 2267const struct sh_pfc_soc_info sh7757_pinmux_info = {
2268 .name = "sh7757_pfc", 2268 .name = "sh7757_pfc",
2269 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 2269 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
2270 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 2270 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7785.c b/drivers/pinctrl/sh-pfc/pfc-sh7785.c
index 6049f594d37e..c176b794f240 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7785.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7785.c
@@ -355,7 +355,7 @@ enum {
355 PINMUX_MARK_END, 355 PINMUX_MARK_END,
356}; 356};
357 357
358static pinmux_enum_t pinmux_data[] = { 358static const pinmux_enum_t pinmux_data[] = {
359 359
360 /* PA GPIO */ 360 /* PA GPIO */
361 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT, PA7_IN_PU), 361 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT, PA7_IN_PU),
@@ -849,7 +849,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
849 849
850#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 850#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
851 851
852static struct pinmux_func pinmux_func_gpios[] = { 852static const struct pinmux_func pinmux_func_gpios[] = {
853 /* FN */ 853 /* FN */
854 GPIO_FN(D63_AD31), 854 GPIO_FN(D63_AD31),
855 GPIO_FN(D62_AD30), 855 GPIO_FN(D62_AD30),
@@ -1018,7 +1018,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
1018 GPIO_FN(IRQOUT), 1018 GPIO_FN(IRQOUT),
1019}; 1019};
1020 1020
1021static struct pinmux_cfg_reg pinmux_config_regs[] = { 1021static const struct pinmux_cfg_reg pinmux_config_regs[] = {
1022 { PINMUX_CFG_REG("PACR", 0xffe70000, 16, 2) { 1022 { PINMUX_CFG_REG("PACR", 0xffe70000, 16, 2) {
1023 PA7_FN, PA7_OUT, PA7_IN, PA7_IN_PU, 1023 PA7_FN, PA7_OUT, PA7_IN, PA7_IN_PU,
1024 PA6_FN, PA6_OUT, PA6_IN, PA6_IN_PU, 1024 PA6_FN, PA6_OUT, PA6_IN, PA6_IN_PU,
@@ -1218,7 +1218,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
1218 {} 1218 {}
1219}; 1219};
1220 1220
1221static struct pinmux_data_reg pinmux_data_regs[] = { 1221static const struct pinmux_data_reg pinmux_data_regs[] = {
1222 { PINMUX_DATA_REG("PADR", 0xffe70020, 8) { 1222 { PINMUX_DATA_REG("PADR", 0xffe70020, 8) {
1223 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA, 1223 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA,
1224 PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA } 1224 PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA }
@@ -1286,7 +1286,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
1286 { }, 1286 { },
1287}; 1287};
1288 1288
1289struct sh_pfc_soc_info sh7785_pinmux_info = { 1289const struct sh_pfc_soc_info sh7785_pinmux_info = {
1290 .name = "sh7785_pfc", 1290 .name = "sh7785_pfc",
1291 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 1291 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
1292 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 1292 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7786.c b/drivers/pinctrl/sh-pfc/pfc-sh7786.c
index 526e78482d5b..8ae0e32844e9 100644
--- a/drivers/pinctrl/sh-pfc/pfc-sh7786.c
+++ b/drivers/pinctrl/sh-pfc/pfc-sh7786.c
@@ -191,7 +191,7 @@ enum {
191 PINMUX_MARK_END, 191 PINMUX_MARK_END,
192}; 192};
193 193
194static pinmux_enum_t pinmux_data[] = { 194static const pinmux_enum_t pinmux_data[] = {
195 195
196 /* PA GPIO */ 196 /* PA GPIO */
197 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT, PA7_IN_PU), 197 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT, PA7_IN_PU),
@@ -509,7 +509,7 @@ static struct sh_pfc_pin pinmux_pins[] = {
509 509
510#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins) 510#define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
511 511
512static struct pinmux_func pinmux_func_gpios[] = { 512static const struct pinmux_func pinmux_func_gpios[] = {
513 /* FN */ 513 /* FN */
514 GPIO_FN(CDE), 514 GPIO_FN(CDE),
515 GPIO_FN(ETH_MAGIC), 515 GPIO_FN(ETH_MAGIC),
@@ -649,7 +649,7 @@ static struct pinmux_func pinmux_func_gpios[] = {
649 GPIO_FN(FSE), 649 GPIO_FN(FSE),
650}; 650};
651 651
652static struct pinmux_cfg_reg pinmux_config_regs[] = { 652static const struct pinmux_cfg_reg pinmux_config_regs[] = {
653 { PINMUX_CFG_REG("PACR", 0xffcc0000, 16, 2) { 653 { PINMUX_CFG_REG("PACR", 0xffcc0000, 16, 2) {
654 PA7_FN, PA7_OUT, PA7_IN, PA7_IN_PU, 654 PA7_FN, PA7_OUT, PA7_IN, PA7_IN_PU,
655 PA6_FN, PA6_OUT, PA6_IN, PA6_IN_PU, 655 PA6_FN, PA6_OUT, PA6_IN, PA6_IN_PU,
@@ -779,7 +779,7 @@ static struct pinmux_cfg_reg pinmux_config_regs[] = {
779 {} 779 {}
780}; 780};
781 781
782static struct pinmux_data_reg pinmux_data_regs[] = { 782static const struct pinmux_data_reg pinmux_data_regs[] = {
783 { PINMUX_DATA_REG("PADR", 0xffcc0020, 8) { 783 { PINMUX_DATA_REG("PADR", 0xffcc0020, 8) {
784 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA, 784 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA,
785 PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA } 785 PA3_DATA, PA2_DATA, PA1_DATA, PA0_DATA }
@@ -819,7 +819,7 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
819 { }, 819 { },
820}; 820};
821 821
822struct sh_pfc_soc_info sh7786_pinmux_info = { 822const struct sh_pfc_soc_info sh7786_pinmux_info = {
823 .name = "sh7786_pfc", 823 .name = "sh7786_pfc",
824 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 824 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
825 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END }, 825 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
diff --git a/drivers/pinctrl/sh-pfc/pfc-shx3.c b/drivers/pinctrl/sh-pfc/pfc-shx3.c
index 93d60cd4c437..6594c8c48747 100644
--- a/drivers/pinctrl/sh-pfc/pfc-shx3.c
+++ b/drivers/pinctrl/sh-pfc/pfc-shx3.c
@@ -147,7 +147,7 @@ enum {
147 PINMUX_MARK_END, 147 PINMUX_MARK_END,
148}; 148};
149 149
150static pinmux_enum_t shx3_pinmux_data[] = { 150static const pinmux_enum_t shx3_pinmux_data[] = {
151 151
152 /* PA GPIO */ 152 /* PA GPIO */
153 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT, PA7_IN_PU), 153 PINMUX_DATA(PA7_DATA, PA7_IN, PA7_OUT, PA7_IN_PU),
@@ -388,7 +388,7 @@ static struct sh_pfc_pin shx3_pinmux_pins[] = {
388 388
389#define PINMUX_FN_BASE ARRAY_SIZE(shx3_pinmux_pins) 389#define PINMUX_FN_BASE ARRAY_SIZE(shx3_pinmux_pins)
390 390
391static struct pinmux_func shx3_pinmux_func_gpios[] = { 391static const struct pinmux_func shx3_pinmux_func_gpios[] = {
392 /* FN */ 392 /* FN */
393 GPIO_FN(D31), 393 GPIO_FN(D31),
394 GPIO_FN(D30), 394 GPIO_FN(D30),
@@ -454,7 +454,7 @@ static struct pinmux_func shx3_pinmux_func_gpios[] = {
454 GPIO_FN(IRQOUT), 454 GPIO_FN(IRQOUT),
455}; 455};
456 456
457static struct pinmux_cfg_reg shx3_pinmux_config_regs[] = { 457static const struct pinmux_cfg_reg shx3_pinmux_config_regs[] = {
458 { PINMUX_CFG_REG("PABCR", 0xffc70000, 32, 2) { 458 { PINMUX_CFG_REG("PABCR", 0xffc70000, 32, 2) {
459 PA7_FN, PA7_OUT, PA7_IN, PA7_IN_PU, 459 PA7_FN, PA7_OUT, PA7_IN, PA7_IN_PU,
460 PA6_FN, PA6_OUT, PA6_IN, PA6_IN_PU, 460 PA6_FN, PA6_OUT, PA6_IN, PA6_IN_PU,
@@ -530,7 +530,7 @@ static struct pinmux_cfg_reg shx3_pinmux_config_regs[] = {
530 { }, 530 { },
531}; 531};
532 532
533static struct pinmux_data_reg shx3_pinmux_data_regs[] = { 533static const struct pinmux_data_reg shx3_pinmux_data_regs[] = {
534 { PINMUX_DATA_REG("PABDR", 0xffc70010, 32) { 534 { PINMUX_DATA_REG("PABDR", 0xffc70010, 32) {
535 0, 0, 0, 0, 0, 0, 0, 0, 535 0, 0, 0, 0, 0, 0, 0, 0,
536 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA, 536 PA7_DATA, PA6_DATA, PA5_DATA, PA4_DATA,
@@ -566,7 +566,7 @@ static struct pinmux_data_reg shx3_pinmux_data_regs[] = {
566 { }, 566 { },
567}; 567};
568 568
569struct sh_pfc_soc_info shx3_pinmux_info = { 569const struct sh_pfc_soc_info shx3_pinmux_info = {
570 .name = "shx3_pfc", 570 .name = "shx3_pfc",
571 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END }, 571 .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
572 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, 572 .input_pu = { PINMUX_INPUT_PULLUP_BEGIN,
diff --git a/drivers/pinctrl/sh-pfc/pinctrl.c b/drivers/pinctrl/sh-pfc/pinctrl.c
index 9978ad1818fd..b4960df6aa2d 100644
--- a/drivers/pinctrl/sh-pfc/pinctrl.c
+++ b/drivers/pinctrl/sh-pfc/pinctrl.c
@@ -141,7 +141,7 @@ static int sh_pfc_reconfig_pin(struct sh_pfc_pinctrl *pmx, unsigned offset,
141 struct sh_pfc *pfc = pmx->pfc; 141 struct sh_pfc *pfc = pmx->pfc;
142 int idx = sh_pfc_get_pin_index(pfc, offset); 142 int idx = sh_pfc_get_pin_index(pfc, offset);
143 struct sh_pfc_pin_config *cfg = &pmx->configs[idx]; 143 struct sh_pfc_pin_config *cfg = &pmx->configs[idx];
144 struct sh_pfc_pin *pin = &pfc->info->pins[idx]; 144 const struct sh_pfc_pin *pin = &pfc->info->pins[idx];
145 unsigned int mark = pin->enum_id; 145 unsigned int mark = pin->enum_id;
146 unsigned long flags; 146 unsigned long flags;
147 int ret = -EINVAL; 147 int ret = -EINVAL;
@@ -324,7 +324,8 @@ static int sh_pfc_map_pins(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx)
324 number++, nr_pins++) { 324 number++, nr_pins++) {
325 struct sh_pfc_pin_config *cfg = &pmx->configs[nr_pins]; 325 struct sh_pfc_pin_config *cfg = &pmx->configs[nr_pins];
326 struct pinctrl_pin_desc *pin = &pmx->pins[nr_pins]; 326 struct pinctrl_pin_desc *pin = &pmx->pins[nr_pins];
327 struct sh_pfc_pin *info = &pfc->info->pins[nr_pins]; 327 const struct sh_pfc_pin *info =
328 &pfc->info->pins[nr_pins];
328 329
329 pin->number = number; 330 pin->number = number;
330 pin->name = info->name; 331 pin->name = info->name;
diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
index 19da3b7c57f1..b250dacaf8dd 100644
--- a/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
@@ -84,8 +84,8 @@ struct pinmux_func {
84 84
85struct pinmux_cfg_reg { 85struct pinmux_cfg_reg {
86 unsigned long reg, reg_width, field_width; 86 unsigned long reg, reg_width, field_width;
87 pinmux_enum_t *enum_ids; 87 const pinmux_enum_t *enum_ids;
88 unsigned long *var_field_width; 88 const unsigned long *var_field_width;
89}; 89};
90 90
91#define PINMUX_CFG_REG(name, r, r_width, f_width) \ 91#define PINMUX_CFG_REG(name, r, r_width, f_width) \
@@ -99,7 +99,7 @@ struct pinmux_cfg_reg {
99 99
100struct pinmux_data_reg { 100struct pinmux_data_reg {
101 unsigned long reg, reg_width; 101 unsigned long reg, reg_width;
102 pinmux_enum_t *enum_ids; 102 const pinmux_enum_t *enum_ids;
103}; 103};
104 104
105#define PINMUX_DATA_REG(name, r, r_width) \ 105#define PINMUX_DATA_REG(name, r, r_width) \
@@ -121,14 +121,14 @@ struct pinmux_range {
121}; 121};
122 122
123struct sh_pfc_soc_info { 123struct sh_pfc_soc_info {
124 char *name; 124 const char *name;
125 struct pinmux_range input; 125 struct pinmux_range input;
126 struct pinmux_range input_pd; 126 struct pinmux_range input_pd;
127 struct pinmux_range input_pu; 127 struct pinmux_range input_pu;
128 struct pinmux_range output; 128 struct pinmux_range output;
129 struct pinmux_range function; 129 struct pinmux_range function;
130 130
131 struct sh_pfc_pin *pins; 131 const struct sh_pfc_pin *pins;
132 unsigned int nr_pins; 132 unsigned int nr_pins;
133 const struct pinmux_range *ranges; 133 const struct pinmux_range *ranges;
134 unsigned int nr_ranges; 134 unsigned int nr_ranges;
@@ -137,16 +137,16 @@ struct sh_pfc_soc_info {
137 const struct sh_pfc_function *functions; 137 const struct sh_pfc_function *functions;
138 unsigned int nr_functions; 138 unsigned int nr_functions;
139 139
140 struct pinmux_func *func_gpios; 140 const struct pinmux_func *func_gpios;
141 unsigned int nr_func_gpios; 141 unsigned int nr_func_gpios;
142 142
143 struct pinmux_cfg_reg *cfg_regs; 143 const struct pinmux_cfg_reg *cfg_regs;
144 struct pinmux_data_reg *data_regs; 144 const struct pinmux_data_reg *data_regs;
145 145
146 pinmux_enum_t *gpio_data; 146 const pinmux_enum_t *gpio_data;
147 unsigned int gpio_data_size; 147 unsigned int gpio_data_size;
148 148
149 struct pinmux_irq *gpio_irq; 149 const struct pinmux_irq *gpio_irq;
150 unsigned int gpio_irq_size; 150 unsigned int gpio_irq_size;
151 151
152 unsigned long unlock_reg; 152 unsigned long unlock_reg;