Skip to content

Commit 0a5e40f

Browse files
prabhakarladgeertu
authored andcommitted
pinctrl: renesas: rzg2l: Update PIN_CFG_MASK() macro to be 32-bit wide
Modify the `PIN_CFG_MASK()` macro to be 32-bit wide. The current maximum value for `PIN_CFG_*` is `BIT(21)`, which fits within a 32-bit mask. Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Tested-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 9bd95ac commit 0a5e40f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(62, 55)
9191
#define PIN_CFG_PIN_REG_MASK GENMASK_ULL(54, 47)
92-
#define PIN_CFG_MASK GENMASK_ULL(46, 0)
92+
#define PIN_CFG_MASK GENMASK_ULL(31, 0)
9393

9494
/*
9595
* m indicates the bitmap of supported pins, a is the register index
@@ -1187,7 +1187,7 @@ static int rzg2l_pinctrl_pinconf_get(struct pinctrl_dev *pctldev,
11871187
u64 *pin_data = pin->drv_data;
11881188
unsigned int arg = 0;
11891189
u32 off;
1190-
u64 cfg;
1190+
u32 cfg;
11911191
int ret;
11921192
u8 bit;
11931193

@@ -1322,7 +1322,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev,
13221322
u64 *pin_data = pin->drv_data;
13231323
unsigned int i, arg, index;
13241324
u32 off, param;
1325-
u64 cfg;
1325+
u32 cfg;
13261326
int ret;
13271327
u8 bit;
13281328

@@ -2755,9 +2755,9 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen
27552755

27562756
for (u32 port = 0; port < nports; port++) {
27572757
bool has_iolh, has_ien;
2758-
u64 cfg, caps;
2758+
u32 off, caps;
27592759
u8 pincnt;
2760-
u32 off;
2760+
u64 cfg;
27612761

27622762
cfg = pctrl->data->port_pin_configs[port];
27632763
off = RZG2L_PIN_CFG_TO_PORT_OFFSET(cfg);
@@ -2801,7 +2801,7 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen
28012801
static void rzg2l_pinctrl_pm_setup_dedicated_regs(struct rzg2l_pinctrl *pctrl, bool suspend)
28022802
{
28032803
struct rzg2l_pinctrl_reg_cache *cache = pctrl->dedicated_cache;
2804-
u64 caps;
2804+
u32 caps;
28052805
u32 i;
28062806

28072807
/*

0 commit comments

Comments
 (0)