From 45ff833caa762db62dc69d81bcdf444b54a427a2 Mon Sep 17 00:00:00 2001 From: Matteo Concas Date: Tue, 23 Jun 2026 18:49:57 +0200 Subject: [PATCH] grlib/ambapp: Add support for >31 IRQ PnP info The second piece of the IRQ number is contained in bits 10 and 11 of the Identification Register --- bsps/include/grlib/ambapp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bsps/include/grlib/ambapp.h b/bsps/include/grlib/ambapp.h index a8e196a9f0..e4984eb7be 100644 --- a/bsps/include/grlib/ambapp.h +++ b/bsps/include/grlib/ambapp.h @@ -184,7 +184,8 @@ struct ambapp_pnp_apb { #define ambapp_pnp_vendor( id ) ( ( ( id ) >> 24 ) & 0xff ) #define ambapp_pnp_device( id ) ( ( ( id ) >> 12 ) & 0xfff ) #define ambapp_pnp_ver( id ) ( ( ( id ) >> 5 ) & 0x1f ) -#define ambapp_pnp_irq( id ) ( ( id ) & 0x1f ) +#define ambapp_pnp_irq( id ) \ + ( ( ( ( id ) >> 5 ) & ( 0x3 << 5 ) ) | ( ( id ) & 0x1f ) ) #define ambapp_pnp_start( mbar ) \ ( ( ( mbar ) & 0xfff00000 ) & ( ( ( mbar ) & 0xfff0 ) << 16 ) )