forked from Imagelibrary/rtems
libcpu/powerpc/mpc5xx/clock/clock.c: Fix warnings
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
/* clock.c
|
/*
|
||||||
*
|
*
|
||||||
* This routine initializes the PIT on the MPC5xx.
|
* This routine initializes the PIT on the MPC5xx.
|
||||||
* The tick frequency is specified by the bsp.
|
* The tick frequency is specified by the bsp.
|
||||||
*
|
*/
|
||||||
*
|
|
||||||
|
/*
|
||||||
* MPC5xx port sponsored by Defence Research and Development Canada - Suffield
|
* MPC5xx port sponsored by Defence Research and Development Canada - Suffield
|
||||||
* Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
|
* Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
|
||||||
*
|
*
|
||||||
@@ -54,13 +55,6 @@ extern uint32_t bsp_clicks_per_usec;
|
|||||||
|
|
||||||
void Clock_exit( void );
|
void Clock_exit( void );
|
||||||
|
|
||||||
/*
|
|
||||||
* These are set by clock driver during its init
|
|
||||||
*/
|
|
||||||
|
|
||||||
rtems_device_major_number rtems_clock_major = ~0;
|
|
||||||
rtems_device_minor_number rtems_clock_minor;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ISR Handler
|
* ISR Handler
|
||||||
*/
|
*/
|
||||||
@@ -107,8 +101,7 @@ void clockOn(void* unused)
|
|||||||
usiu.piscrk = 0;
|
usiu.piscrk = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void clockOff(void* unused)
|
||||||
clockOff(void* unused)
|
|
||||||
{
|
{
|
||||||
/* disable PIT and PIT interrupts */
|
/* disable PIT and PIT interrupts */
|
||||||
usiu.piscrk = USIU_UNLOCK_KEY;
|
usiu.piscrk = USIU_UNLOCK_KEY;
|
||||||
@@ -127,13 +120,12 @@ int clockIsOn(void* unused)
|
|||||||
* Called via atexit()
|
* Called via atexit()
|
||||||
* Remove the clock interrupt handler by setting handler to NULL
|
* Remove the clock interrupt handler by setting handler to NULL
|
||||||
*/
|
*/
|
||||||
void
|
void Clock_exit(void)
|
||||||
Clock_exit(void)
|
|
||||||
{
|
{
|
||||||
(void) BSP_disconnect_clock_handler ();
|
(void) BSP_disconnect_clock_handler ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Install_clock(rtems_isr_entry clock_isr)
|
static void Install_clock(rtems_isr_entry clock_isr)
|
||||||
{
|
{
|
||||||
Clock_driver_ticks = 0;
|
Clock_driver_ticks = 0;
|
||||||
|
|
||||||
@@ -141,13 +133,6 @@ void Install_clock(rtems_isr_entry clock_isr)
|
|||||||
atexit(Clock_exit);
|
atexit(Clock_exit);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
ReInstall_clock(rtems_isr_entry new_clock_isr)
|
|
||||||
{
|
|
||||||
BSP_connect_clock_handler (new_clock_isr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
rtems_device_driver Clock_initialize(
|
rtems_device_driver Clock_initialize(
|
||||||
rtems_device_major_number major,
|
rtems_device_major_number major,
|
||||||
rtems_device_minor_number minor,
|
rtems_device_minor_number minor,
|
||||||
@@ -156,12 +141,5 @@ rtems_device_driver Clock_initialize(
|
|||||||
{
|
{
|
||||||
Install_clock( Clock_isr );
|
Install_clock( Clock_isr );
|
||||||
|
|
||||||
/*
|
|
||||||
* make major/minor avail to others such as shared memory driver
|
|
||||||
*/
|
|
||||||
|
|
||||||
rtems_clock_major = major;
|
|
||||||
rtems_clock_minor = minor;
|
|
||||||
|
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user