mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
hw/net/can/xlnx-versal-canfd: Fix interrupt level
The interrupt level should be 0 or 1. The existing code was using the interrupt flags to determine the level. In the only machine currently supported (xlnx-versal-virt), the GICv3 was masking off all bits except bit 0 when applying it, resulting in the IRQ never being delivered. Signed-off-by: Doug Brown <doug@schmorgal.com> Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com> Reviewed-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Message-id: 20240827034927.66659-2-doug@schmorgal.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
676624d757
commit
2215e297b9
1 changed files with 2 additions and 2 deletions
|
@ -682,8 +682,8 @@ static uint8_t canfd_dlc_array[8] = {8, 12, 16, 20, 24, 32, 48, 64};
|
||||||
|
|
||||||
static void canfd_update_irq(XlnxVersalCANFDState *s)
|
static void canfd_update_irq(XlnxVersalCANFDState *s)
|
||||||
{
|
{
|
||||||
unsigned int irq = s->regs[R_INTERRUPT_STATUS_REGISTER] &
|
const bool irq = (s->regs[R_INTERRUPT_STATUS_REGISTER] &
|
||||||
s->regs[R_INTERRUPT_ENABLE_REGISTER];
|
s->regs[R_INTERRUPT_ENABLE_REGISTER]) != 0;
|
||||||
g_autofree char *path = object_get_canonical_path(OBJECT(s));
|
g_autofree char *path = object_get_canonical_path(OBJECT(s));
|
||||||
|
|
||||||
/* RX watermark interrupts. */
|
/* RX watermark interrupts. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue