[PATCH 33.1 2/5] LEON3: clock driver use new AMBAPP layer
Gedare Bloom
gedare at rtems.org
Tue Apr 17 17:33:04 UTC 2012
On Tue, Apr 17, 2012 at 12:37 PM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
> On 04/17/2012 07:42 AM, Daniel Hellstrom wrote:
>>
>> On 04/16/2012 12:54 AM, Joel Sherrill wrote:
>>>
>>> On 04/15/2012 01:39 PM, Gedare Bloom wrote:
>>>>
>>>> Looks ok.
>>>
>>> Minor style issue. Arguments are supposed to be "(arg1, arg2)"
>>
>> But I am removing "(arg1,arg2)" and replacing with "(arg1, arg2)"? Do you
>> want me to change coding-style on locations I'm not modifying in the patch?
>
> if it isn't too much trouble.
>
I believe we could also have the accepted GSOC students do some of
this work during the "bonding" period.
Note that Joel also had concerns with places where && were not spaced
properly like
a&& b should be a && b.
-Gedare
> My ever growing todo list now has style rules on it and
> trying to find settings in indent and/or astyle that get us
> close.
>
>>
>> Daniel
>>
>>
>>> But OK to me if that is fixed and all required patches are OK.
>>>>
>>>> On Tue, Apr 10, 2012 at 7:33 AM, Daniel Hellstrom<daniel at gaisler.com>
>>>> wrote:
>>>>>
>>>>> Signed-off-by: Daniel Hellstrom<daniel at gaisler.com>
>>>>> ---
>>>>> c/src/lib/libbsp/sparc/leon3/clock/ckinit.c | 14 ++++++++------
>>>>> 1 files changed, 8 insertions(+), 6 deletions(-)
>>>>>
>>>>> diff --git a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
>>>>> b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
>>>>> index 3cdbb20..dacfd2e 100644
>>>>> --- a/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
>>>>> +++ b/c/src/lib/libbsp/sparc/leon3/clock/ckinit.c
>>>>> @@ -22,6 +22,7 @@
>>>>>
>>>>> #include<bsp.h>
>>>>> #include<bspopts.h>
>>>>> +#include<ambapp.h>
>>>>>
>>>>> #if SIMSPARC_FAST_IDLE==1
>>>>> #define CLOCK_DRIVER_USE_FAST_IDLE
>>>>> @@ -59,14 +60,15 @@ static int clkirq;
>>>>>
>>>>> #define Clock_driver_support_find_timer() \
>>>>> do { \
>>>>> - int cnt; \
>>>>> - amba_apb_device dev; \
>>>>> + struct ambapp_dev *adev; \
>>>>> \
>>>>> - /* Find LEON3 GP Timer */ \
>>>>> - cnt =
>>>>> amba_find_apbslv(&amba_conf,VENDOR_GAISLER,GAISLER_GPTIMER,&dev); \
>>>>> - if ( cnt> 0 ) { \
>>>>> + /* Find first LEON3 GP Timer */ \
>>>>> + adev = (void *)ambapp_for_each(&ambapp_plb,
>>>>> (OPTIONS_ALL|OPTIONS_APB_SLVS),\
>>>>> + VENDOR_GAISLER, GAISLER_GPTIMER, ambapp_find_by_idx,
>>>>> NULL); \
>>>>> + if (adev) { \
>>>>> /* Found APB GPTIMER Timer */ \
>>>>> - LEON3_Timer_Regs = (volatile LEON3_Timer_Regs_Map *) dev.start;
>>>>> \
>>>>> + LEON3_Timer_Regs = (volatile LEON3_Timer_Regs_Map *) \
>>>>> + DEV_TO_APB(adev)->start; \
>>>>> clkirq = (LEON3_Timer_Regs->status& 0xf8)>> 3; \
>>>>> \
>>>>> Adjust_clkirq_for_node(); \
>>>>> --
>>>>> 1.7.0.4
>>>>>
>>>>> _______________________________________________
>>>>> rtems-devel mailing list
>>>>> rtems-devel at rtems.org
>>>>> http://www.rtems.org/mailman/listinfo/rtems-devel
>>>>
>>>> _______________________________________________
>>>> rtems-devel mailing list
>>>> rtems-devel at rtems.org
>>>> http://www.rtems.org/mailman/listinfo/rtems-devel
>>>
>>>
>
>
> --
> Joel Sherrill, Ph.D. Director of Research& Development
> joel.sherrill at OARcorp.com On-Line Applications Research
> Ask me about RTEMS: a free RTOS Huntsville AL 35805
> Support Available (256) 722-9985
>
>
More information about the devel
mailing list