[PATCH 5/8] generic_or1k BSP clock driver correction

Jakob Viketoft jakob.viketoft at aacmicrotec.com
Tue Mar 1 14:09:51 UTC 2016


________________________________________
From: devel [devel-bounces at rtems.org] on behalf of Jakob Viketoft [jakob.viketoft at aacmicrotec.com]
Sent: Tuesday, March 01, 2016 15:03
To: Hesham Almatary
Cc: rtems-devel at rtems.org
Subject: RE: [PATCH 5/8] generic_or1k BSP clock driver correction

>>>  /* 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?

Btw, do you really need both header files? It looks like you're including both of them anyway at each place and then it might be neater to skip the generic_or1k.h and push this info into the bsp.h instead.

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


More information about the devel mailing list