Changeset eb7c6a84 in rtems


Ignore:
Timestamp:
May 10, 2012, 4:17:59 PM (7 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
30d4124
Parents:
79fee34
Message:

pc386 - Clock driver compiles again plus clean up

The clock drivers were very inconsistent about prototyping
the ISR handlers. This broke with the recent clean up.

Tested on qemu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/clock/ckinit.c

    r79fee34 reb7c6a84  
    1 /*
     1/**
     2 *  @file
     3 *
    24 *  Clock Tick Device Driver
    35 *
     
    1113 *      This removes all boilerplate and leave original hardware
    1214 *      code I developed for the go32 BSP.
    13  *
    14  *  COPYRIGHT (c) 1989-2008.
     15 */
     16
     17/*
     18 *  COPYRIGHT (c) 1989-2012.
    1519 *  On-Line Applications Research Corporation (OAR).
    1620 *
     
    3236volatile uint32_t pc386_isrs_per_tick;
    3337uint32_t pc386_clock_click_count;
     38
     39/* forward declaration */
     40void Clock_isr(void *param);
     41void Clock_driver_support_at_tick_tsc(void);
     42void Clock_driver_support_at_tick_empty(void);
     43uint32_t bsp_clock_nanoseconds_since_last_tick_tsc(void);
     44uint32_t bsp_clock_nanoseconds_since_last_tick_i8254(void);
     45void Clock_isr_handler(rtems_irq_hdl_param param);
     46int clockIsOn(const rtems_irq_connect_data* unused);
     47void clockOff(const rtems_irq_connect_data* unused);
     48void Clock_driver_install_handler(void);
     49void Clock_driver_support_initialize_hardware(void);
    3450
    3551/*
     
    97113extern volatile uint32_t Clock_driver_isrs;
    98114
     115/*
     116 * Get nanoseconds using Pentium-compatible TSC register
     117 */
    99118uint32_t bsp_clock_nanoseconds_since_last_tick_tsc(void)
    100119{
    101   /******
    102    * Get nanoseconds using Pentium-compatible TSC register
    103    ******/
    104 
    105120  uint64_t                 diff_nsec;
    106121
     
    125140}
    126141
     142/*
     143 * Get nanoseconds using 8254 timer chip
     144 */
    127145uint32_t bsp_clock_nanoseconds_since_last_tick_i8254(void)
    128146{
    129 
    130   /******
    131    * Get nanoseconds using 8254 timer chip
    132    ******/
    133 
    134147  uint32_t                 usecs, clicks, isrs;
    135148  uint32_t                 usecs1, usecs2;
     
    270283}
    271284
    272 /* a bit of a hack since the ISR models do not match */
    273 rtems_isr Clock_isr(
    274   rtems_vector_number vector
    275 );
    276 
    277285bool Clock_isr_enabled = false;
    278286void Clock_isr_handler(
     
    281289{
    282290  if ( Clock_isr_enabled )
    283     Clock_isr( 0 );
     291    Clock_isr( param );
    284292}
    285293
Note: See TracChangeset for help on using the changeset viewer.