[Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-09-27 Thread Marek Vasut
From: Chris Wulff Add the Altera timer model. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves Vandervennet --- hw/timer/Makefile.objs | 1 + hw/timer/altera_timer.c | 236 2 fil

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-19 Thread Marek Vasut
On 08/19/2016 10:53 PM, Dmitry Osipenko wrote: > On 19.08.2016 02:24, Marek Vasut wrote: >> On 08/18/2016 11:49 AM, Dmitry Osipenko wrote: >>> On 17.08.2016 23:19, Marek Vasut wrote: On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: [...] Well what is sane clock frequency

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-19 Thread Dmitry Osipenko
On 19.08.2016 02:24, Marek Vasut wrote: > On 08/18/2016 11:49 AM, Dmitry Osipenko wrote: >> On 17.08.2016 23:19, Marek Vasut wrote: >>> On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: >>> >>> [...] >>> >>> Well what is sane clock frequency for hardware which can have arbitrary >>> frequency

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-18 Thread Marek Vasut
On 08/18/2016 11:49 AM, Dmitry Osipenko wrote: > On 17.08.2016 23:19, Marek Vasut wrote: >> On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: >> >> [...] >> >> Well what is sane clock frequency for hardware which can have arbitrary >> frequency configured in ? >> > > You could set

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-18 Thread Dmitry Osipenko
On 17.08.2016 23:19, Marek Vasut wrote: > On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: > > [...] > > Well what is sane clock frequency for hardware which can have arbitrary > frequency configured in ? > You could set to the one that is used by "10M50 GHRD" patch for exampl

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-17 Thread Marek Vasut
On 08/17/2016 10:26 PM, Peter Maydell wrote: > On 17 August 2016 at 21:19, Marek Vasut wrote: >> On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: >>> If you would prefer to keep error'ing out, then I can suggest to add some >>> verbose message instead of the assertion, like: >>> >>> if (!t->freq_hz)

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-17 Thread Peter Maydell
On 17 August 2016 at 21:19, Marek Vasut wrote: > On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: >> If you would prefer to keep error'ing out, then I can suggest to add some >> verbose message instead of the assertion, like: >> >> if (!t->freq_hz) { >> error_setg(errp, "altera_timer: \"clock-fr

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-17 Thread Marek Vasut
On 08/16/2016 11:38 PM, Dmitry Osipenko wrote: [...] Well what is sane clock frequency for hardware which can have arbitrary frequency configured in ? >>> >>> You could set to the one that is used by "10M50 GHRD" patch for example. >> >> That doesn't sound right . I can set it to 1

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-16 Thread Dmitry Osipenko
On 16.08.2016 22:46, Marek Vasut wrote: > On 08/16/2016 08:40 PM, Dmitry Osipenko wrote: >> On 16.08.2016 19:48, Marek Vasut wrote: >>> On 08/15/2016 01:39 PM, Dmitry Osipenko wrote: >>> >>> [...] >>> >> Also, ptimer now supports "on the fly mode switch": >> >> https://github.com/qemu/q

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-16 Thread Marek Vasut
On 08/16/2016 08:40 PM, Dmitry Osipenko wrote: > On 16.08.2016 19:48, Marek Vasut wrote: >> On 08/15/2016 01:39 PM, Dmitry Osipenko wrote: >> >> [...] >> > Also, ptimer now supports "on the fly mode switch": > > https://github.com/qemu/qemu/commit/869e92b5c392eb6b2c7b398b878c435442b8e9d

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-16 Thread Dmitry Osipenko
On 16.08.2016 19:48, Marek Vasut wrote: > On 08/15/2016 01:39 PM, Dmitry Osipenko wrote: > > [...] > Also, ptimer now supports "on the fly mode switch": https://github.com/qemu/qemu/commit/869e92b5c392eb6b2c7b398b878c435442b8e9dd ptimer_run(t->ptimer, !(value & CONTROL_CO

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-16 Thread Marek Vasut
On 08/15/2016 01:39 PM, Dmitry Osipenko wrote: [...] >>> Also, ptimer now supports "on the fly mode switch": >>> >>> https://github.com/qemu/qemu/commit/869e92b5c392eb6b2c7b398b878c435442b8e9dd >>> >>> ptimer_run(t->ptimer, !(value & CONTROL_CONT)) could be used here and >>> "manual" >>> re-run

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-15 Thread Dmitry Osipenko
On 12.08.2016 11:51, Marek Vasut wrote: > On 08/10/2016 12:30 PM, Dmitry Osipenko wrote: >> On 07.08.2016 23:27, Marek Vasut wrote: >>> On 07/30/2016 11:42 PM, Dmitry Osipenko wrote: Hello Marek, >>> >>> Hi! >>> >>> Sorry for the late reply, I got back from vacation only recently. >>> >>> I no

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-12 Thread Marek Vasut
On 08/10/2016 12:30 PM, Dmitry Osipenko wrote: > On 07.08.2016 23:27, Marek Vasut wrote: >> On 07/30/2016 11:42 PM, Dmitry Osipenko wrote: >>> Hello Marek, >> >> Hi! >> >> Sorry for the late reply, I got back from vacation only recently. >> >> I noticed that a lot of files in this patchset are unde

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-12 Thread Marek Vasut
On 08/10/2016 02:45 PM, Dmitry Osipenko wrote: > On 10.08.2016 13:30, Dmitry Osipenko wrote: > > [snip] > >> I suggest to provide "reset" function, otherwise it's likely that you would >> get >> unexpected result or crash on QEMU reset. This also applies to the "interrupt >> controller" patch. >

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-10 Thread Dmitry Osipenko
On 10.08.2016 13:30, Dmitry Osipenko wrote: [snip] > I suggest to provide "reset" function, otherwise it's likely that you would > get > unexpected result or crash on QEMU reset. This also applies to the "interrupt > controller" patch. > Correction: I didn't notice that "interrupt controller"

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-10 Thread Dmitry Osipenko
On 07.08.2016 23:27, Marek Vasut wrote: > On 07/30/2016 11:42 PM, Dmitry Osipenko wrote: >> Hello Marek, > > Hi! > > Sorry for the late reply, I got back from vacation only recently. > > I noticed that a lot of files in this patchset are under LGPLv2.1 , I > believe that needs fixing too, right

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-08-07 Thread Marek Vasut
On 07/30/2016 11:42 PM, Dmitry Osipenko wrote: > Hello Marek, Hi! Sorry for the late reply, I got back from vacation only recently. I noticed that a lot of files in this patchset are under LGPLv2.1 , I believe that needs fixing too, right ? I will talk to Chris about this as he is the original a

Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-07-30 Thread Dmitry Osipenko
Hello Marek, On 28.07.2016 15:27, Marek Vasut wrote: > From: Chris Wulff > > Add the Altera timer model. > [snip] > +static void timer_write(void *opaque, hwaddr addr, > +uint64_t val64, unsigned int size) > +{ > +AlteraTimer *t = opaque; > +uint64_t tvalue; >

[Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-07-28 Thread Marek Vasut
From: Chris Wulff Add the Altera timer model. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves Vandervennet --- hw/timer/Makefile.objs | 1 + hw/timer/altera_timer.c | 225 2 fil

[Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation

2016-06-13 Thread Marek Vasut
From: Chris Wulff Add the Altera timer model. Signed-off-by: Marek Vasut Cc: Chris Wulff Cc: Jeff Da Silva Cc: Ley Foon Tan Cc: Sandra Loosemore Cc: Yves Vandervennet --- hw/timer/Makefile.objs | 1 + hw/timer/altera_timer.c | 225 2 fil