On 11 March 2016 at 02:26, Jean-Christophe DUBOIS wrote:
> Le 10/03/2016 11:31, Peter Maydell a écrit :
>> Calling qemu_set_irq() from a reset function is generally
>> a bad idea.
>
>
> Could I assume that all irq lines are set automatically to 0 on reset?
The way this works is that an irq line h
Le 10/03/2016 11:31, Peter Maydell a écrit :
On 2 March 2016 at 05:27, Jean-Christophe Dubois wrote:
Signed-off-by: Jean-Christophe Dubois
---
+
+static void imx_spi_reset(DeviceState *dev)
+{
+IMXSPIState *s = IMX_SPI(dev);
+int i;
+
+DPRINTF("\n");
+
+memset(s->regs, 0, size
On 2 March 2016 at 05:27, Jean-Christophe Dubois wrote:
> Signed-off-by: Jean-Christophe Dubois
> ---
>
> +
> +static void imx_spi_reset(DeviceState *dev)
> +{
> +IMXSPIState *s = IMX_SPI(dev);
> +int i;
> +
> +DPRINTF("\n");
> +
> +memset(s->regs, 0, sizeof(s->regs));
> +
> +
Signed-off-by: Jean-Christophe Dubois
---
Changes since v1:
* Access SPI slave only at a byte level.
* rework the CS activation to avoid to reset access to SPI slaves.
Changes since v2:
* Added #include "qemu/osdep.h"
* remove previous_level from state struct
* save burst_length in VMSTATE