On 10 May 2014 13:33, Peter Crosthwaite <peter.crosthwa...@xilinx.com> wrote:
> On Fri, May 9, 2014 at 4:46 AM, Peter Maydell <peter.mayd...@linaro.org> 
> wrote:
>> We don't implement very much of the GPTM TAR register, and what we
>> do is wrong. The "are we in RT mode?" field is in s->config, not
>> s->control. Correct this, use LOG_UNIMP rather than hw_error()
>> for the cases we don't support, and avoid an unlabelled fallthrough
>> that makes Coverity complain.
>>
>> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
>> ---
>>  hw/arm/stellaris.c | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
>> index d6cc77b..487ee72 100644
>> --- a/hw/arm/stellaris.c
>> +++ b/hw/arm/stellaris.c
>> @@ -185,12 +185,19 @@ static uint64_t gptm_read(void *opaque, hwaddr offset,
>>      case 0x44: /* TBPMR */
>>          return s->match_prescale[1];
>>      case 0x48: /* TAR */
>> -        if (s->control == 1)
>> +        if (s->config == 1) {
>>              return s->rtc;
>> +        }
>> +        qemu_log_mask(LOG_UNIMP,
>> +                      "gptm_read of TAR but timer read not supported");
>
> Should it perhaps be "GPTM read" to be more human?

Good idea.

thanks
-- PMM

Reply via email to