libcpu/bfin/clock: Fix warnings

This commit is contained in:
Joel Sherrill
2014-10-12 15:38:01 -05:00
parent 9fab016dac
commit e827199f55
2 changed files with 21 additions and 52 deletions

View File

@@ -1,5 +1,7 @@
/* RTEMS Clock Tick Driver for Blackfin. Uses Blackfin Core Timer.
*
*/
/*
* Copyright (c) 2008 Kallisti Labs, Los Gatos, CA, USA
* written by Allan Hessenflow <allanh@kallisti.com>
*
@@ -25,13 +27,6 @@ volatile uint32_t Clock_driver_ticks;
void Clock_exit(void);
/*
* Major and minor number.
*/
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
static rtems_isr clockISR(rtems_vector_number vector) {
Clock_driver_ticks += 1;
@@ -49,23 +44,14 @@ static rtems_isr clockISR(rtems_vector_number vector) {
#endif
}
/*
* Clock_exit
*
* This routine allows the clock driver to exit by masking the interrupt and
* disabling the clock's counter.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* Return values: NONE
*
*/
void Clock_exit(void) {
void Clock_exit(void)
{
*(uint32_t volatile *) TCNTL = 0;
}
@@ -73,22 +59,13 @@ void Clock_exit(void) {
* Clock_initialize
*
* This routine initializes the clock driver.
*
* Input parameters:
* major - clock device major number
* minor - clock device minor number
* parg - pointer to optional device driver arguments
*
* Output parameters: NONE
*
* Return values:
* rtems_device_driver status code
*/
rtems_device_driver Clock_initialize(rtems_device_major_number major,
rtems_device_driver Clock_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp) {
void *pargp
)
{
Clock_driver_ticks = 0;
set_vector(clockISR, CEC_CORE_TIMER_VECTOR, 1);
@@ -100,12 +77,6 @@ rtems_device_driver Clock_initialize(rtems_device_major_number major,
*(uint32_t volatile *) TCNTL = TCNTL_TMPWR | TCNTL_TAUTORLD | TCNTL_TMREN;
atexit(Clock_exit);
/*
* make major/minor avail to others such as shared memory driver
*/
rtems_clock_major = major;
rtems_clock_minor = minor;
return RTEMS_SUCCESSFUL;
}

View File

@@ -1,5 +1,7 @@
/* Real Time Clock Driver for Blackfin
*
*/
/*
* Copyright (c) 2006 by Atos Automacao Industrial Ltda.
* written by Alain Schaefer <alain.schaefer@easc.ch>
* and Antonio Giovanini <antonio@atos.com.br>
@@ -36,7 +38,6 @@ void Init_RTC(void)
/*
* Read time from RTEMS' clock manager and set it to RTC
*/
void setRealTimeFromRTEMS (void)
{
rtems_time_of_day time_buffer;
@@ -51,7 +52,6 @@ void setRealTimeFromRTEMS (void)
/*
* Read real time from RTC and set it to RTEMS' clock manager
*/
void setRealTimeToRTEMS (void)
{
rtems_time_of_day time_buffer;
@@ -90,7 +90,6 @@ int setRealTime(
/*
* Get the time from the RTC.
*/
void getRealTime(
rtems_time_of_day *tod
)
@@ -134,7 +133,6 @@ void getRealTime(
* Return the difference between RTC and RTEMS' clock manager time in minutes.
* If the difference is greater than 1 day, this returns 9999.
*/
int checkRealTime (void)
{
rtems_time_of_day rtems_tod;