Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-28 Thread sundeep subbaraya
Hi Alistair, On Fri, Apr 28, 2017 at 12:23 AM, Alistair Francis wrote: > On Tue, Apr 25, 2017 at 3:36 AM, sundeep subbaraya > wrote: >> Hi Alistair, >> >> On Mon, Apr 24, 2017 at 11:14 PM, Alistair Francis >> wrote: >> + >> +isr = !!(st->regs[R_RIS] & TIMER_RIS_ACK); >> +ie

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-27 Thread Alistair Francis
On Tue, Apr 25, 2017 at 3:36 AM, sundeep subbaraya wrote: > Hi Alistair, > > On Mon, Apr 24, 2017 at 11:14 PM, Alistair Francis > wrote: > + > +isr = !!(st->regs[R_RIS] & TIMER_RIS_ACK); > +ier = !!(st->regs[R_CTRL] & TIMER_CTRL_INTR); > + > +qemu_set_irq(st->irq,

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-25 Thread sundeep subbaraya
Hi Alistair, On Mon, Apr 24, 2017 at 11:14 PM, Alistair Francis wrote: + +isr = !!(st->regs[R_RIS] & TIMER_RIS_ACK); +ier = !!(st->regs[R_CTRL] & TIMER_CTRL_INTR); + +qemu_set_irq(st->irq, (ier && isr)); +} + +static uint64_t +timer_read(vo

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-25 Thread sundeep subbaraya
Hi Alistair and Peter, On Mon, Apr 24, 2017 at 11:28 PM, Peter Maydell wrote: > On 24 April 2017 at 18:44, Alistair Francis wrote: >> Basically the simple explanation is that init is called when the >> object is created and realize is called when the object is realized. >> >> Generally for devic

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-24 Thread Peter Maydell
On 24 April 2017 at 18:44, Alistair Francis wrote: > Basically the simple explanation is that init is called when the > object is created and realize is called when the object is realized. > > Generally for devices it will go something like this: > 1. init > 2. Set properties > 3. Connect thing

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-24 Thread Alistair Francis
>>> + >>> +isr = !!(st->regs[R_RIS] & TIMER_RIS_ACK); >>> +ier = !!(st->regs[R_CTRL] & TIMER_CTRL_INTR); >>> + >>> +qemu_set_irq(st->irq, (ier && isr)); >>> +} >>> + >>> +static uint64_t >>> +timer_read(void *opaque, hwaddr addr, unsigned int size) >>> +{ >>> +struct timerblock *t =

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-17 Thread sundeep subbaraya
Hii Alistair, On Sat, Apr 15, 2017 at 2:58 AM, Alistair Francis wrote: > On Sun, Apr 9, 2017 at 4:19 AM, Subbaraya Sundeep > wrote: >> Modelled System Timer in Microsemi's Smartfusion2 Soc. >> Timer has two 32bit down counters and two interrupts. >> >> Signed-off-by: Subbaraya Sundeep > > Hey S

Re: [Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-14 Thread Alistair Francis
On Sun, Apr 9, 2017 at 4:19 AM, Subbaraya Sundeep wrote: > Modelled System Timer in Microsemi's Smartfusion2 Soc. > Timer has two 32bit down counters and two interrupts. > > Signed-off-by: Subbaraya Sundeep Hey Sundeep, I have some comments inline below. > --- > hw/timer/Makefile.objs | 1 +

[Qemu-devel] [Qemu-devel RFC v2 1/4] msf2: Add Smartfusion2 System timer

2017-04-09 Thread Subbaraya Sundeep
Modelled System Timer in Microsemi's Smartfusion2 Soc. Timer has two 32bit down counters and two interrupts. Signed-off-by: Subbaraya Sundeep --- hw/timer/Makefile.objs | 1 + hw/timer/msf2_timer.c | 273 + 2 files changed, 274 insertions(+) cr