Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels
QEMU allows qemu_irq lines to transfer arbitrary integers.  However
the convention is that for a simple IRQ line the values transferred
are always 0 and 1.  The A10 SD controller device instead assumes a
0-vs-non-0 convention, which happens to work with the interrupt
controller it is wired up to.

Coerce the value to boolean to follow our usual convention.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Message-id: 20230606104609.3692557-3-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Jun 19, 2023
1 parent f837b46 commit 22c8178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/sd/allwinner-sdhost.c
Expand Up @@ -193,7 +193,7 @@ static void allwinner_sdhost_update_irq(AwSdHostState *s)
}

trace_allwinner_sdhost_update_irq(irq);
qemu_set_irq(s->irq, irq);
qemu_set_irq(s->irq, !!irq);
}

static void allwinner_sdhost_update_transfer_cnt(AwSdHostState *s,
Expand Down

0 comments on commit 22c8178

Please sign in to comment.