All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Dmitry Osipenko <digetx@gmail.com>, qemu-devel@nongnu.org
Cc: Jeff Da Silva <jdasilva@altera.com>,
	Chris Wulff <crwulff@gmail.com>,
	Sandra Loosemore <sandra@codesourcery.com>,
	Yves Vandervennet <yvanderv@altera.com>,
	Ley Foon Tan <lftan@altera.com>,
	Juro Bystricky <juro.bystricky@intel.com>
Subject: Re: [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation
Date: Wed, 17 Aug 2016 22:19:47 +0200	[thread overview]
Message-ID: <0f952ce0-e9f3-5335-4fcc-899cb6f70ad0@denx.de> (raw)
In-Reply-To: <4123941b-73a0-fec3-4af8-ada701832f48@gmail.com>

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 (Hz) , that should make it
>> slow enough to signalize that something is broken while providing valid
>> number.
>>
> 
> I'm not sure about it. Explicitly showing that something is wrong would be better.
> 
>> +static void altera_timer_realize(DeviceState *dev, Error **errp)
>> +{
>> +    AlteraTimer *t = ALTERA_TIMER(dev);
>> +    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
>> +
>> +    assert(t->freq_hz != 0);
> 
> 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-frequency\" property " \
>                      "must be provided");
>     return;
> }

That's better, thanks.

btw breaking strings is frowned upon in linux/u-boot as it makes it
impossible to git grep for error message. Does the same apply to qemu?

>>>>>> For the IIC, I wonder what that'd look like -- probably
>>>>>> qemu_set_irq(parent, 0); ?
>>>>>>
>>>>>
>>>>> No, IRQ's would be "deasserted" by resetting CPUClass state, of which QEMU takes
>>>>> care itself. No action needed by the IIC.
>>>>
>>>> I see, thanks :)
>>>>
>>>> btw any chance someone can look at the other patches too ?
>>>>
>>>>
>>>
>>>
>>
>>
> 
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-08-17 20:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28 12:27 [Qemu-devel] [PATCH V2 1/7] nios2: Add disas entries Marek Vasut
2016-07-28 12:27 ` [Qemu-devel] [PATCH 2/7] nios2: Add architecture emulation support Marek Vasut
2016-07-28 12:27 ` [Qemu-devel] [PATCH 3/7] nios2: Add usermode binaries emulation Marek Vasut
2016-07-28 12:27 ` [Qemu-devel] [PATCH 4/7] nios2: Add IIC interrupt controller emulation Marek Vasut
2016-07-28 12:27 ` [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation Marek Vasut
2016-07-30 21:42   ` Dmitry Osipenko
2016-08-07 20:27     ` Marek Vasut
2016-08-10 10:30       ` Dmitry Osipenko
2016-08-10 12:45         ` Dmitry Osipenko
2016-08-12  8:52           ` Marek Vasut
2016-08-12  8:51         ` Marek Vasut
2016-08-15 11:39           ` Dmitry Osipenko
2016-08-16 16:48             ` Marek Vasut
2016-08-16 18:40               ` Dmitry Osipenko
2016-08-16 19:46                 ` Marek Vasut
2016-08-16 21:38                   ` Dmitry Osipenko
2016-08-17 20:19                     ` Marek Vasut [this message]
2016-08-17 20:26                       ` Peter Maydell
2016-08-17 20:54                         ` Marek Vasut
2016-08-18  9:49                       ` Dmitry Osipenko
2016-08-18 23:24                         ` Marek Vasut
2016-08-19 20:53                           ` Dmitry Osipenko
2016-08-19 20:55                             ` Marek Vasut
2016-07-28 12:27 ` [Qemu-devel] [PATCH 6/7] nios2: Add Altera 10M50 GHRD emulation Marek Vasut
2016-08-16 19:00   ` Dmitry Osipenko
2016-08-16 19:59     ` Marek Vasut
2016-07-28 12:27 ` [Qemu-devel] [PATCH 7/7] nios2: Add support for Nios-II R1 Marek Vasut
  -- strict thread matches above, loose matches on Subject: below --
2016-09-27 23:30 [Qemu-devel] [PATCH V2 1/7] nios2: Add disas entries Marek Vasut
2016-09-27 23:30 ` [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation Marek Vasut
2016-06-13 19:05 [Qemu-devel] [PATCH 1/7] nios2: Add disas entries Marek Vasut
2016-06-13 19:05 ` [Qemu-devel] [PATCH 5/7] nios2: Add periodic timer emulation Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f952ce0-e9f3-5335-4fcc-899cb6f70ad0@denx.de \
    --to=marex@denx.de \
    --cc=crwulff@gmail.com \
    --cc=digetx@gmail.com \
    --cc=jdasilva@altera.com \
    --cc=juro.bystricky@intel.com \
    --cc=lftan@altera.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sandra@codesourcery.com \
    --cc=yvanderv@altera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.