Re: [Qemu-devel] Modeling a device controlled by combination of GPIO and UART

2018-08-22 Thread Peter Maydell
On 22 August 2018 at 08:36, Martin Schroeder wrote: > Thanks Peter. > > I have set it up such that master device has qemu_irq array which it > initializes using qdev_init_gpio_out with number of gpio lines going > out and slave device calls qdev_init_gpio_in with a callback that > should be called

Re: [Qemu-devel] Modeling a device controlled by combination of GPIO and UART

2018-08-22 Thread Martin Schroeder via Qemu-devel
Thanks Peter. I have set it up such that master device has qemu_irq array which it initializes using qdev_init_gpio_out with number of gpio lines going out and slave device calls qdev_init_gpio_in with a callback that should be called when irq is raised. Then I connect them together at higher leve

Re: [Qemu-devel] Modeling a device controlled by combination of GPIO and UART

2018-08-21 Thread Peter Maydell
On 21 August 2018 at 14:29, Martin Schroeder via Qemu-devel wrote: > I'd like to add a virtual device that is controlled by a couple of > GPIO pins on my controller (cortex-m4) and a serial port. I suppose I > can derive it from SSISlaveClass to make the new device a serial > slave. > > But how do

[Qemu-devel] Modeling a device controlled by combination of GPIO and UART

2018-08-21 Thread Martin Schroeder via Qemu-devel
I'd like to add a virtual device that is controlled by a couple of GPIO pins on my controller (cortex-m4) and a serial port. I suppose I can derive it from SSISlaveClass to make the new device a serial slave. But how do I connect GPIOs? I want the slave device to be notified when guest firmware t