Changeset a9c2508 in rtems


Ignore:
Timestamp:
Aug 19, 2008, 12:39:55 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
f3eaba9a
Parents:
699c2be
Message:

2008-08-19 Sebastian Huber <sebastian.huber@…>

  • shared/clock/clock.c: Fixed warnings.
Location:
c/src/lib/libbsp/powerpc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ChangeLog

    r699c2be ra9c2508  
     12008-08-19      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * shared/clock/clock.c: Fixed warnings.
     4
    152008-07-18      Sebastian Huber <sebastian.huber@embedded-brains.de>
    26
  • c/src/lib/libbsp/powerpc/shared/clock/clock.c

    r699c2be ra9c2508  
    4141volatile uint32_t Clock_driver_ticks = 0;
    4242
    43 rtems_device_major_number rtems_clock_major = -1;
    44 
    45 rtems_device_minor_number rtems_clock_minor = -1;
     43rtems_device_major_number rtems_clock_major = UINT32_MAX;
     44
     45rtems_device_minor_number rtems_clock_minor = UINT32_MAX;
    4646
    4747static uint32_t ppc_clock_decrementer_value = PPC_CLOCK_DECREMENTER_MAX;
     
    4949static uint32_t ppc_clock_next_time_base = 0;
    5050
    51 static void ppc_clock_no_tick()
     51static void ppc_clock_no_tick(void)
    5252{
    5353        /* Do nothing */
    5454}
    5555
    56 static void (*ppc_clock_tick)() = ppc_clock_no_tick;
    57 
    58 int ppc_clock_exception_handler( BSP_Exception_frame *frame, unsigned number)
     56static void (*ppc_clock_tick)(void) = ppc_clock_no_tick;
     57
     58static int ppc_clock_exception_handler( BSP_Exception_frame *frame, unsigned number)
    5959{
    6060        uint32_t reg1;
     
    9090}
    9191
    92 int ppc_clock_exception_handler_classic( BSP_Exception_frame *frame, unsigned number)
     92static int ppc_clock_exception_handler_classic( BSP_Exception_frame *frame, unsigned number)
    9393{
    9494        uint32_t reg1;
     
    120120}
    121121
    122 int ppc_clock_exception_handler_booke( BSP_Exception_frame *frame, unsigned number)
     122static int ppc_clock_exception_handler_booke( BSP_Exception_frame *frame, unsigned number)
    123123{
    124124        uint32_t msr;
     
    142142}
    143143
    144 int ppc_clock_exception_handler_e300( BSP_Exception_frame *frame, unsigned number)
    145 {
    146         uint32_t msr;
    147 
    148         /* Increment clock ticks */
    149         Clock_driver_ticks += 1;
    150 
    151         /* Enable external exceptions */
    152         msr = ppc_external_exceptions_enable();
    153 
    154         /* Call clock ticker  */
    155         ppc_clock_tick();
    156 
    157         /* Restore machine state */
    158         ppc_external_exceptions_disable( msr);
    159 
    160         return 0;
    161 }
    162 
    163 uint32_t ppc_clock_nanoseconds_since_last_tick()
     144static int ppc_clock_exception_handler_e300( BSP_Exception_frame *frame, unsigned number)
     145{
     146        uint32_t msr;
     147
     148        /* Increment clock ticks */
     149        Clock_driver_ticks += 1;
     150
     151        /* Enable external exceptions */
     152        msr = ppc_external_exceptions_enable();
     153
     154        /* Call clock ticker  */
     155        ppc_clock_tick();
     156
     157        /* Restore machine state */
     158        ppc_external_exceptions_disable( msr);
     159
     160        return 0;
     161}
     162
     163static uint32_t ppc_clock_nanoseconds_since_last_tick(void)
    164164{
    165165        return ((ppc_clock_decrementer_value - ppc_decrementer_register()) * 1000) / bsp_clicks_per_usec;
    166166}
    167167
    168 void Clock_exit()
     168void Clock_exit(void)
    169169{
    170170        /* Set the decrementer to the maximum value */
     
    191191         * always successful.
    192192         */
    193         ppc_clock_tick = (void (*)()) rtems_clock_tick;
     193        ppc_clock_tick = (void (*)(void)) rtems_clock_tick;
    194194
    195195        /* Set the decrementer to the maximum value */
Note: See TracChangeset for help on using the changeset viewer.