Changeset b360885 in rtems


Ignore:
Timestamp:
Jun 5, 2009, 10:10:43 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
c30fcf52
Parents:
7a5c013
Message:

2009-06-05 Joel Sherrill <joel.sherrill@…>

  • preinstall.am, pxa255/clock/clock.c, pxa255/ffuart/ffuart.c, pxa255/irq/bsp_irq_init.c, pxa255/timer/timer.c: Fix typos and update timer.
Location:
c/src/lib/libcpu/arm
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/arm/ChangeLog

    r7a5c013 rb360885  
     12009-06-05      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * preinstall.am, pxa255/clock/clock.c, pxa255/ffuart/ffuart.c,
     4        pxa255/irq/bsp_irq_init.c, pxa255/timer/timer.c: Fix typos and update
     5        timer.
     6
    172009-06-05      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • c/src/lib/libcpu/arm/preinstall.am

    r7a5c013 rb360885  
    2929PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/mmu.h
    3030endif
    31 
    3231if pxa255
    3332$(PROJECT_INCLUDE)/pxa255.h: pxa255/include/pxa255.h $(PROJECT_INCLUDE)/$(dirstamp)
     
    4342PREINSTALL_FILES += $(PROJECT_INCLUDE)/irq.h
    4443endif
    45 
    4644if at91rm9200
    4745$(PROJECT_INCLUDE)/at91rm9200.h: at91rm9200/include/at91rm9200.h $(PROJECT_INCLUDE)/$(dirstamp)
  • c/src/lib/libcpu/arm/pxa255/clock/clock.c

    r7a5c013 rb360885  
    3535static void clock_isr_on(const rtems_irq_connect_data *unused)
    3636{
    37 
    3837  /*Clear the interrupt bit */
    3938  XSCALE_OS_TIMER_TSR = 0x1;
    40  
    41    
     39
    4240  /* enable timer interrupt */
    4341  XSCALE_OS_TIMER_IER |= 0x1;
     
    4644
    4745  XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num;
    48    
    4946}
    5047
     
    7875
    7976/* Replace the first value with the clock's interrupt name. */
    80 rtems_irq_connect_data clock_isr_data = {XSCALE_IRQ_OS_TIMER,   
    81                                          (rtems_irq_hdl)Clock_isr,
    82                                          clock_isr_on,
    83                                          clock_isr_off,
    84                                          clock_isr_is_on,
    85                                          3,     /* unused for ARM cpus */
    86                                          0 };   /* unused for ARM cpus */
     77rtems_irq_connect_data clock_isr_data = {
     78  XSCALE_IRQ_OS_TIMER,
     79  (rtems_irq_hdl)Clock_isr,
     80  clock_isr_on,
     81  clock_isr_off,
     82  clock_isr_is_on,
     83  3,     /* unused for ARM cpus */
     84  0      /* unused for ARM cpus */
     85};
    8786
    8887
     
    9291void Clock_driver_support_initialize_hardware(void)
    9392{
    94  
    95 
    9693  period_num = TIMER_RATE*(Configuration.microseconds_per_tick/10000);
    97  
    9894}
    9995
     
    10399#define Clock_driver_support_at_tick() \
    104100  do { \
    105     ;\                                                                 
    106     XSCALE_OS_TIMER_TSR = 0x1;/* read the status to clear the int */    \
    107     XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num;/*Add the match register*/ \   
    108     ;\                                         
     101    /* read the status to clear the int */ \
     102    XSCALE_OS_TIMER_TSR = 0x1; \
     103    \
     104    /*Add the match register*/ \
     105    XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num; \
    109106  } while (0)
    110107
    111108void Clock_driver_support_shutdown_hardware( void )
    112109{
    113     BSP_remove_rtems_irq_handler(&clock_isr_data);
     110  BSP_remove_rtems_irq_handler(&clock_isr_data);
    114111}
    115112
  • c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c

    r7a5c013 rb360885  
    88 *
    99 *  $Id$
    10  */
    1110 */
    1211
  • c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c

    r7a5c013 rb360885  
    1414#include <pxa255.h>
    1515
    16 extern void default_int_handler();
     16extern void default_int_handler(void);
    1717
    1818void (*IRQ_table[PRIMARY_IRQS])(uint32_t vector);
     19
    1920/*
    2021 * Interrupt system initialization. Disable interrupts, clear
    2122 * any that are pending.
    2223 */
    23 void BSP_rtems_irq_mngt_init()
     24void BSP_rtems_irq_mngt_init(void)
    2425{
    25     int i;
     26  int i;
    2627
    27     /* Initialize the vector table contents with default handler */
    28     for (i=0; i<PRIMARY_IRQS; i++) {
    29       IRQ_table[i] = default_int_handler;
    30     }
     28  /* Initialize the vector table contents with default handler */
     29  for (i=0; i<PRIMARY_IRQS; i++) {
     30    IRQ_table[i] = default_int_handler;
     31  }
    3132
    32     /* disable all interrupts */
    33     XSCALE_INT_ICMR = 0x0;
    34     /*Direct the interrupt to IRQ*/
    35     XSCALE_INT_ICLR = 0x0;
     33  /* disable all interrupts */
     34  XSCALE_INT_ICMR = 0x0;
     35
     36  /* Direct the interrupt to IRQ*/
     37  XSCALE_INT_ICLR = 0x0;
    3638}
    3739
  • c/src/lib/libcpu/arm/pxa255/timer/timer.c

    r7a5c013 rb360885  
    11/*
    2  *PXA255 timer by Yang Xi <hiyangxi@gmail.com>
     2 * PXA255 timer by Yang Xi <hiyangxi@gmail.com>
    33 * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
    44 *
     
    1818 *  $Id$
    1919 */
    20  *  $Id$
    21  */
    2220
    2321#include <rtems.h>
     
    2624
    2725uint32_t tstart;
    28 bool Timer_driver_Find_average_overhead;
    2926static uint32_t tick_time;
     27bool benchmark_timer_find_average_overhead;
     28
     29bool benchmark_timer_is_initialized = false;
     30
    3031/*
    3132 * Use the timer count register to measure.
    3233 * The frequency of it is 3.4864MHZ
    33  *The longest period we are able to capture is 4G/3.4864MHZ
    34  *   
    35  *   
     34 * The longest period we are able to capture is 4G/3.4864MHZ
    3635 */
    37 void Timer_initialize( void )
     36void benchmark_timer_initialize(void)
    3837{
    39 
    4038  tick_time = XSCALE_OS_TIMER_TCR;
    41 
    4239}
    4340
     
    5754#define LEAST_VALID       1  /* Don't trust a clicks value lower than this */
    5855
    59 int Read_timer( void )
     56int benchmark_timer_read(void)
    6057{
    6158
     
    6562    total -= tick_time;
    6663  else
    67     total += 0xffffffff-tick_time; /*Round up but not overflow*/
     64    total += 0xffffffff - tick_time; /*Round up but not overflow*/
    6865     
    69   if ( Timer_driver_Find_average_overhead == 1 )
     66  if ( benchmark_timer_find_average_overhead == true )
    7067    return total;          /*Counter cycles*/
    71   else {
    72     if ( total < LEAST_VALID )
    73       return 0;            /* below timer resolution */
    74     return total;
    75   }
    7668
     69  if ( total < LEAST_VALID )
     70    return 0;            /* below timer resolution */
     71
     72  return total;
    7773}
    7874
    79 /*
    80  *  Empty function call used in loops to measure basic cost of looping
    81  *  in Timing Test Suite.
    82  */
    83 
    84 rtems_status_code Empty_function( void )
    85 {
    86   return RTEMS_SUCCESSFUL;
    87 }
    88 
    89 void Set_find_average_overhead(
     75void benchmark_timer_disable_subtracting_average_overhead(
    9076  bool find_flag
    9177)
    9278{
    93   Timer_driver_Find_average_overhead = find_flag;
     79  benchmark_timer_find_average_overhead = find_flag;
    9480}
    95 
Note: See TracChangeset for help on using the changeset viewer.