Ignore:
Timestamp:
May 22, 2001, 11:07:09 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
2e7ed911
Parents:
e2040ba
Message:

2001-05-22 Greg Menke <gregory.menke@…>

  • Assisted in design and debug by Joel Sherrill <joel@…>.
  • clock/clockdrv.c, console/conscfg.c: Corrected.
  • include/bsp.h: Support for tm27 and addition of CPU_CLOCK_RATE.
  • startup/bspstart.c: Properly set initial status register and pending interrupts.
  • timer/timer.c: Works now.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/mips/genmongoosev/clock/clockdrv.c

    re2040ba ra355e3ea  
    2424#endif
    2525
     26
     27
    2628/* reset Timeout (TO) bit */
     29
    2730#define Clock_driver_support_at_tick() \
    28   MONGOOSEV_WRITE_REGISTER( \
    29     CLOCK_BASE, \
    30     MONGOOSEV_TIMER_CONTROL_REGISTER, \
    31     (MONGOOSEV_TIMER_CONTROL_COUNTER_ENABLE | \
    32      MONGOOSEV_TIMER_CONTROL_INTERRUPT_ENABLE) \
    33   );
     31  do { \
     32    MONGOOSEV_WRITE_REGISTER( CLOCK_BASE, MONGOOSEV_TIMER_CONTROL_REGISTER, \
     33         (MONGOOSEV_TIMER_CONTROL_COUNTER_ENABLE | MONGOOSEV_TIMER_CONTROL_INTERRUPT_ENABLE)); \
     34  } while(0)
     35
    3436
    3537#define Clock_driver_support_install_isr( _new, _old ) \
     
    3941
    4042
    41 extern int ClockRate;
    42 
    43 #define CLICKS (((unsigned32) &ClockRate) / 1000000 )
    4443#define Clock_driver_support_initialize_hardware() \
    45   do { \
    46     unsigned32 _clicks; \
    47     _clicks = CLICKS * rtems_configuration_get_microseconds_per_tick(); \
    48     MONGOOSEV_WRITE_REGISTER( \
    49       CLOCK_BASE, \
    50       MONGOOSEV_TIMER_INITIAL_COUNTER_REGISTER, \
    51       _clicks \
    52     ); \
     44   do { \
     45    unsigned32 _clicks = CPU_CLOCK_RATE_MHZ * rtems_configuration_get_microseconds_per_tick(); \
     46    MONGOOSEV_WRITE_REGISTER( CLOCK_BASE, MONGOOSEV_TIMER_INITIAL_COUNTER_REGISTER, _clicks ); \
    5347    Clock_driver_support_at_tick(); \
    54   } while(0)
     48   } while(0)
    5549
    5650#define Clock_driver_support_shutdown_hardware() \
Note: See TracChangeset for help on using the changeset viewer.