Re: [Qemu-devel] [PATCH v3 10/12] i.MX: Add the Freescale SPI Controller

2016-03-10 Thread Peter Maydell
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

Re: [Qemu-devel] [PATCH v3 10/12] i.MX: Add the Freescale SPI Controller

2016-03-10 Thread Jean-Christophe DUBOIS
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

Re: [Qemu-devel] [PATCH v3 10/12] i.MX: Add the Freescale SPI Controller

2016-03-10 Thread Peter Maydell
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)); > + > +

[Qemu-devel] [PATCH v3 10/12] i.MX: Add the Freescale SPI Controller

2016-03-01 Thread Jean-Christophe Dubois
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