Changeset bb9cf58d in rtems for c/src/lib/libcpu/arm


Ignore:
Timestamp:
Apr 19, 2012, 6:16:09 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
abb52ce
Parents:
029ced28
Message:

mc9328mxl shared: Clock driver clean up and ISR Handler Prototype Correction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c

    r029ced28 rbb9cf58d  
    1212 *
    1313 *  http://www.rtems.com/license/LICENSE.
    14  *
    15  *
    16  *  $Id$
    17 */
     14 */
     15
    1816#include <rtems.h>
    1917#include <bsp.h>
     
    2321
    2422/* this is defined in ../../../shared/clockdrv_shell.h */
    25 rtems_isr Clock_isr(rtems_vector_number vector);
     23void Clock_isr(rtems_irq_hdl_param arg);
    2624static void clock_isr_on(const rtems_irq_connect_data *unused);
    2725static void clock_isr_off(const rtems_irq_connect_data *unused);
     
    3028/* Replace the first value with the clock's interrupt name. */
    3129rtems_irq_connect_data clock_isr_data = {
    32     .name   = BSP_INT_TIMER1,
    33     .hdl    = (rtems_irq_hdl)Clock_isr,
    34     .handle = (void *)BSP_INT_TIMER1,
    35     .on     = clock_isr_on,
    36     .off    = clock_isr_off,
    37     .isOn   = clock_isr_is_on,
     30  .name   = BSP_INT_TIMER1,
     31  .hdl    = Clock_isr,
     32  .handle = (void *)BSP_INT_TIMER1,
     33  .on     = clock_isr_on,
     34  .off    = clock_isr_off,
     35  .isOn   = clock_isr_is_on,
    3836};
    39 
    40 /* If you follow the code, this is never used, so any value
    41  * should work
    42  */
    43 #define CLOCK_VECTOR 0
    44 
    4537
    4638/**
     
    5547        MC9328MXL_TMR1_TSTAT = 0;                     \
    5648  } while(0)
    57 
    5849
    5950/**
     
    10394#define Clock_driver_support_shutdown_hardware()                        \
    10495  do {                                                                  \
    105         /* Disable timer */ \
    106         MC9328MXL_TMR1_TCTL = 0; \
    107         BSP_remove_rtems_irq_handler(&clock_isr_data);                  \
    108      } while (0)
     96    /* Disable timer */ \
     97    MC9328MXL_TMR1_TCTL = 0; \
     98    BSP_remove_rtems_irq_handler(&clock_isr_data);                  \
     99  } while (0)
    109100
    110101/**
     
    115106static void clock_isr_on(const rtems_irq_connect_data *unused)
    116107{
    117     MC9328MXL_TMR1_TCTL |= MC9328MXL_TMR_TCTL_IRQEN;
    118     MC9328MXL_AITC_INTENNUM = MC9328MXL_INT_TIMER1;
    119 
    120     return;
     108  MC9328MXL_TMR1_TCTL |= MC9328MXL_TMR_TCTL_IRQEN;
     109  MC9328MXL_AITC_INTENNUM = MC9328MXL_INT_TIMER1;
    121110}
    122111
     
    128117static void clock_isr_off(const rtems_irq_connect_data *unused)
    129118{
    130     MC9328MXL_TMR1_TCTL &= ~MC9328MXL_TMR_TCTL_IRQEN;
    131     MC9328MXL_AITC_INTDISNUM = MC9328MXL_INT_TIMER1;
    132     return;
     119  MC9328MXL_TMR1_TCTL &= ~MC9328MXL_TMR_TCTL_IRQEN;
     120  MC9328MXL_AITC_INTDISNUM = MC9328MXL_INT_TIMER1;
    133121}
    134122
     
    141129static int clock_isr_is_on(const rtems_irq_connect_data *irq)
    142130{
    143     return MC9328MXL_TMR1_TCTL & MC9328MXL_TMR_TCTL_IRQEN;
     131  return MC9328MXL_TMR1_TCTL & MC9328MXL_TMR_TCTL_IRQEN;
    144132}
    145 
    146133
    147134/* Make sure to include this, and only at the end of the file */
Note: See TracChangeset for help on using the changeset viewer.