Re: [PATCH v2 7/8] irqchip/al-fic: add support for FIC v3
From: Radu Rendec
Date: Sun Oct 04 2026 - 21:04:14 EST
On Sun, 2026-09-27 at 08:06 +0000, Eliav Farber wrote:
> FIC v3 reports version id 2 in the control register version field. It
> exposes the same info/error/fatal groups as v2, so add the version to
> enum al_fic_version; the existing "version_id > V1" handling masks the
> error and fatal groups at init as for v2.
>
> Unlike v2, the v3 error and fatal mask registers read back correctly, so
> v3 does not need the v2 mask_cache workaround: the workaround is gated on
> AL_FIC_VERSION_V2 and v3 keeps the register-seeded mask_cache.
>
> Signed-off-by: Eliav Farber <farbere@xxxxxxxxxx>
> ---
> v2: the "erratum fixed from v3 onwards" code comment moved here (where
> AL_FIC_VERSION_V3 is introduced) from the FIC v2 patch, so the claim
> that v3 keeps the register-seeded mask_cache has its code in the same
> commit.
>
> drivers/irqchip/irq-al-fic.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-al-fic.c b/drivers/irqchip/irq-al-fic.c
> index 35e366b4da30..322e41ffa2fa 100644
> --- a/drivers/irqchip/irq-al-fic.c
> +++ b/drivers/irqchip/irq-al-fic.c
> @@ -44,6 +44,7 @@ enum al_fic_state {
> enum al_fic_version {
> AL_FIC_VERSION_V1,
> AL_FIC_VERSION_V2,
> + AL_FIC_VERSION_V3,
> };
>
> enum al_fic_id {
> @@ -177,8 +178,8 @@ static int al_fic_register(struct device_node *node,
> * register. Suppress the seeding there and set mask_cache below to
> * match what al_fic_wire_init() programmed.
> *
> - * The info mask register is not affected, so the info output keeps the
> - * register-seeded mask_cache.
> + * The info mask register is not affected, and the erratum is fixed
> + * from v3 onwards, so those paths keep the register-seeded mask_cache.
> */
> if (version == AL_FIC_VERSION_V2 &&
> (fic_id == AL_FIC_ID_ERROR || fic_id == AL_FIC_ID_FATAL))
Reviewed-by: Radu Rendec <radu@xxxxxxxxxx>