________________________________________
From: devel [devel-boun...@rtems.org] on behalf of Hesham Almatary 
[heshamelmat...@gmail.com]
Sent: Saturday, February 27, 2016 19:57
To: Jakob Viketoft
Cc: rtems-de...@rtems.org
Subject: Re: [PATCH 5/8] generic_or1k BSP clock driver correction

>On Sat, Feb 20, 2016 at 11:01 PM,  <jakob.viket...@gmail.com> wrote:
>> From: Jakob Viketoft <jakob.viket...@aacmicrotec.com>
>>
>>  - Improve the clock driver to use RTEMS default tick period
>>    or the on the one supplied by the application
>>  - Avoid rewriting the timer settings, since all we need is to clear the 
>> interrupt
>>  - Remove any mention of or1ksim in favour of generic_or1k
>>
>> Close #2600
>> ---
>>  .../lib/libbsp/or1k/generic_or1k/clock/clockdrv.c  | 109 
>> ++++++++++-----------
>>  1 file changed, 51 insertions(+), 58 deletions(-)
>>
>> diff --git a/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c 
>> b/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c
>> index e01d2e5..60eec98 100644
>> --- a/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c
>> +++ b/c/src/lib/libbsp/or1k/generic_or1k/clock/clockdrv.c
>> @@ -3,13 +3,15 @@
>>   *
>>   * @ingroup bsp_clock
>>   *
>> - * @brief or1k clock support.
>> + * @brief generic_or1k clock support.
>>   */
>>
>>  /*
>>   * generic_or1k Clock driver
>>   *
>>   * COPYRIGHT (c) 2014-2015 Hesham ALMatary <heshamelmat...@gmail.com>
>> + * Copyright (c) 2014-2016 ÅAC Microtec AB <www.aacmicrotec.com>
>> + *                         Jakob Viketoft <jakob.viket...@aacmicrotec.com>
>>   *
>>   * The license and distribution terms for this file may be
>>   * found in the file LICENSE in this distribution or at
>> @@ -25,35 +27,30 @@
>>  #include <rtems/timecounter.h>
>>
>>  /* The number of clock cycles before generating a tick timer interrupt. */
>> -#define TTMR_NUM_OF_CLOCK_TICKS_INTERRUPT     0x09ED9
>> -#define OR1K_CLOCK_CYCLE_TIME_NANOSECONDS     10
>> +#define OR1K_CLOCK_CYCLE_TIME_NANOSECONDS     (1000000000 / 
>> OR1K_BSP_CLOCK_FREQ)
>clockdrv.c:30:61: error: 'OR1K_BSP_CLOCK_FREQ' undeclared (first use
>in this function)

Sorry for the delay in responding, it took me a while to figure this one out 
since I had to build a new toolchain and stuff to make sure I was using same as 
you. I had rather quickly transfered the change from what we were doing in our 
own BSP.

Basically, there is a copy-paste error between the generic_or1k/include/bsp.h 
and generic_or1k/include/generic_or1k.h include guards which both define the 
same thing. Change the one in bsp.h and everything compiles as it should. This 
is somewhat outside this patch's intentions, but should this patch address this 
as well?

Jakob Viketoft
Senior Engineer in RTL and embedded software

ÅAC Microtec AB
Dag Hammarskjölds väg 48
SE-751 83 Uppsala, Sweden

T: +46 702 80 95 97
http://www.aacmicrotec.com
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to