mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2009-09-15 Till Straumann <strauman@slac.stanford.edu>
PR 1344/bsps: * clock/ckinit.c: Fix more bugs (applied PR1344/attachment 702): TSC handler was used when 8254 was requested and vice versa. Also, nanosecond handler was never installed to RTEMS clock.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-09-15 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 1344/bsps:
|
||||
* clock/ckinit.c: Fix more bugs (applied PR1344/attachment 702):
|
||||
TSC handler was used when 8254 was requested and vice versa.
|
||||
Also, nanosecond handler was never installed to RTEMS clock.
|
||||
|
||||
2008-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* bsp_specs: Backport from CVS-HEAD.
|
||||
|
||||
@@ -285,19 +285,27 @@ void Clock_driver_support_initialize_hardware(void)
|
||||
/* printk( "Use 8254\n" ); */
|
||||
Clock_driver_support_at_tick = Clock_driver_support_at_tick_empty;
|
||||
Clock_driver_nanoseconds_since_last_tick =
|
||||
bsp_clock_nanoseconds_since_last_tick_tsc;
|
||||
|
||||
bsp_clock_nanoseconds_since_last_tick_i8254;
|
||||
} else {
|
||||
/* printk( "Use TSC\n" ); */
|
||||
Clock_driver_support_at_tick = Clock_driver_support_at_tick_tsc;
|
||||
Clock_driver_nanoseconds_since_last_tick =
|
||||
bsp_clock_nanoseconds_since_last_tick_i8254;
|
||||
bsp_clock_nanoseconds_since_last_tick_tsc;
|
||||
}
|
||||
|
||||
/* Shell installs nanosecond handler before calling
|
||||
* Clock_driver_support_initialize_hardware() :-(
|
||||
* so we do it again now that we're ready.
|
||||
*/
|
||||
rtems_clock_set_nanoseconds_extension(
|
||||
Clock_driver_nanoseconds_since_last_tick
|
||||
);
|
||||
|
||||
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
|
||||
printk("Unable to initialize system clock\n");
|
||||
rtems_fatal_error_occurred(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#define Clock_driver_support_shutdown_hardware() \
|
||||
|
||||
Reference in New Issue
Block a user