RE: [PATCH v4 10/12] irqchip/renesas-rzv2h: Drop macros ICU_TSSR_TSSEL_{MASK,PREP}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sergey,

Thanks for the feedback.

> -----Original Message-----
> From: Sergey Shtylyov <s.shtylyov@xxxxxx>
> Sent: 07 February 2025 13:53
> Subject: Re: [PATCH v4 10/12] irqchip/renesas-rzv2h: Drop macros ICU_TSSR_TSSEL_{MASK,PREP}
> 
> On 2/7/25 2:36 PM, Biju Das wrote:
> 
> > On RZ/G3E, TSSEL register field is 8 bits wide compared to 7 on RZ/V2H.
> > Also bits 8..14 is reserved on RZ/G3E and any writes on these reserved
> > bits is ignored. Use the bitmask GENMASK(field_width - 2, 0) on both
> > SoCs for extracting TSSEL and we can drop the macros
> > ICU_TSSR_TSSEL_PREP and ICU_TSSR_TSSEL_MASK.
> >
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> [...]
> 
> > diff --git a/drivers/irqchip/irq-renesas-rzv2h.c
> > b/drivers/irqchip/irq-renesas-rzv2h.c
> > index 6d1de9277c7d..71d06820e598 100644
> > --- a/drivers/irqchip/irq-renesas-rzv2h.c
> > +++ b/drivers/irqchip/irq-renesas-rzv2h.c
> [...]
> > @@ -321,8 +318,9 @@ static int rzv2h_tint_set_type(struct irq_data *d, unsigned int type)
> >  	guard(raw_spinlock)(&priv->lock);
> >
> >  	tssr = readl_relaxed(priv->base + priv->info->t_offs + ICU_TSSR(tssr_k));
> > -	tssr &= ~(ICU_TSSR_TSSEL_MASK(tssel_n) | tien);
> > -	tssr |= ICU_TSSR_TSSEL_PREP(tint, tssel_n);
> > +	tssr &= ~((GENMASK(priv->info->field_width - 2, 0) <<
> > +		   (tssel_n * priv->info->field_width)) | tien);
> > +	tssr |= (tint << (tssel_n * priv->info->field_width));
> 
>    Don't need () around the |='s rvalue.

Agree. Will fix this in next version.

Cheers,
Biju




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux