[PATCH 1/2] clock: Remove Clock_exit() from API

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Dec 6 08:14:19 UTC 2019


This function is no longer supported by the standard clock driver.

Update #3436.
---
 bsps/bfin/shared/dev/clock.c              |  4 +---
 bsps/m68k/csb360/dev/ckinit.c             |  2 +-
 bsps/m68k/gen68340/clock/ckinit.c         |  2 +-
 bsps/m68k/mcf5206elite/dev/ckinit.c       |  2 +-
 bsps/m68k/mrm332/clock/ckinit.c           |  2 +-
 bsps/m68k/mvme147/clock/ckinit.c          |  2 +-
 bsps/m68k/mvme162/clock/ckinit.c          |  2 +-
 bsps/mips/hurricane/clock/ckinit.c        |  4 +---
 bsps/no_cpu/no_bsp/clock/ckinit.c         |  2 +-
 bsps/powerpc/shared/clock/clock-ppc-dec.c | 11 -----------
 bsps/powerpc/shared/clock/clock-ppc403.c  |  2 +-
 bsps/powerpc/shared/clock/clock.c         |  9 ---------
 bsps/powerpc/ss555/clock/clock.c          |  4 +---
 bsps/sh/gensh1/clock/ckinit.c             |  2 +-
 bsps/sh/gensh2/clock/ckinit.c             |  2 ++
 bsps/sh/gensh4/clock/ckinit.c             |  2 ++
 cpukit/include/rtems/clockdrv.h           |  2 --
 17 files changed, 16 insertions(+), 40 deletions(-)

diff --git a/bsps/bfin/shared/dev/clock.c b/bsps/bfin/shared/dev/clock.c
index 3463858b39..75cd139e52 100644
--- a/bsps/bfin/shared/dev/clock.c
+++ b/bsps/bfin/shared/dev/clock.c
@@ -29,8 +29,6 @@
 
 volatile uint32_t Clock_driver_ticks;
 
-void Clock_exit(void);
-
 static rtems_isr clockISR(rtems_vector_number vector) {
 
   Clock_driver_ticks += 1;
@@ -50,7 +48,7 @@ static rtems_isr clockISR(rtems_vector_number vector) {
  *  This routine allows the clock driver to exit by masking the interrupt and
  *  disabling the clock's counter.
  */
-void Clock_exit(void)
+static void Clock_exit(void)
 {
   *(uint32_t volatile *) TCNTL = 0;
 }
diff --git a/bsps/m68k/csb360/dev/ckinit.c b/bsps/m68k/csb360/dev/ckinit.c
index 3b7b25067c..839a2748ef 100644
--- a/bsps/m68k/csb360/dev/ckinit.c
+++ b/bsps/m68k/csb360/dev/ckinit.c
@@ -52,7 +52,7 @@ Clock_isr (rtems_vector_number vector)
   }
 }
 
-void
+static void
 Clock_exit(void)
 {
   uint32_t icr;
diff --git a/bsps/m68k/gen68340/clock/ckinit.c b/bsps/m68k/gen68340/clock/ckinit.c
index e099d91fb6..7dfe85d422 100644
--- a/bsps/m68k/gen68340/clock/ckinit.c
+++ b/bsps/m68k/gen68340/clock/ckinit.c
@@ -51,7 +51,7 @@ Clock_isr (rtems_vector_number vector)
   rtems_clock_tick();
 }
 
-void
+static void
 Clock_exit (void)
 {
   /*
diff --git a/bsps/m68k/mcf5206elite/dev/ckinit.c b/bsps/m68k/mcf5206elite/dev/ckinit.c
index 80962a1d58..6cda45ca05 100644
--- a/bsps/m68k/mcf5206elite/dev/ckinit.c
+++ b/bsps/m68k/mcf5206elite/dev/ckinit.c
@@ -47,7 +47,7 @@ Clock_isr (rtems_vector_number vector)
       rtems_clock_hook(vector);
 }
 
-void
+static void
 Clock_exit(void)
 {
   /* disable all timer1 interrupts */
diff --git a/bsps/m68k/mrm332/clock/ckinit.c b/bsps/m68k/mrm332/clock/ckinit.c
index 273ff9abed..cb7595f955 100644
--- a/bsps/m68k/mrm332/clock/ckinit.c
+++ b/bsps/m68k/mrm332/clock/ckinit.c
@@ -24,7 +24,7 @@ uint32_t                Clock_isrs;         /* ISRs until next tick */
 volatile uint32_t       Clock_driver_ticks; /* ticks since initialization */
 static rtems_isr_entry  Old_ticker;
 
-void Clock_exit( void );
+static void Clock_exit( void );
 
 static rtems_isr Clock_isr(rtems_vector_number vector)
 {
diff --git a/bsps/m68k/mvme147/clock/ckinit.c b/bsps/m68k/mvme147/clock/ckinit.c
index ce88255593..4a3e95df86 100644
--- a/bsps/m68k/mvme147/clock/ckinit.c
+++ b/bsps/m68k/mvme147/clock/ckinit.c
@@ -29,7 +29,7 @@ uint32_t         Clock_isrs;                  /* ISRs until next tick */
 volatile uint32_t         Clock_driver_ticks; /* ticks since initialization */
 rtems_isr_entry  Old_ticker;
 
-void Clock_exit( void );
+static void Clock_exit( void );
 
 /*
  *  ISR Handler
diff --git a/bsps/m68k/mvme162/clock/ckinit.c b/bsps/m68k/mvme162/clock/ckinit.c
index f4b680e170..5412c16d7d 100644
--- a/bsps/m68k/mvme162/clock/ckinit.c
+++ b/bsps/m68k/mvme162/clock/ckinit.c
@@ -31,7 +31,7 @@ uint32_t         Clock_isrs;                  /* ISRs until next tick */
 volatile uint32_t         Clock_driver_ticks; /* ticks since initialization */
 rtems_isr_entry  Old_ticker;
 
-void Clock_exit( void );
+static void Clock_exit( void );
 
 #define CLOCK_VECTOR (VBR0 * 0x10 + 0x9)
 
diff --git a/bsps/mips/hurricane/clock/ckinit.c b/bsps/mips/hurricane/clock/ckinit.c
index c0d2a38269..7e692efe0f 100644
--- a/bsps/mips/hurricane/clock/ckinit.c
+++ b/bsps/mips/hurricane/clock/ckinit.c
@@ -59,7 +59,7 @@ void init_hbt(void);
 void enable_hbi(void);
 void disable_hbi(void);
 
-void Clock_exit(void);
+static void Clock_exit(void);
 rtems_isr Clock_isr(rtems_vector_number vector);
 rtems_isr User_Clock_isr(rtems_vector_number vector);
 void Install_clock(rtems_isr_entry clock_isr);
@@ -96,8 +96,6 @@ uint32_t Clock_isrs;              /* ISRs until next tick */
 
 rtems_isr_entry  Old_ticker;
 
-void Clock_exit( void );
-
 static uint32_t mips_timer_rate = 0;
 
 /*
diff --git a/bsps/no_cpu/no_bsp/clock/ckinit.c b/bsps/no_cpu/no_bsp/clock/ckinit.c
index eb0867a895..1d680fe355 100644
--- a/bsps/no_cpu/no_bsp/clock/ckinit.c
+++ b/bsps/no_cpu/no_bsp/clock/ckinit.c
@@ -48,7 +48,7 @@ uint32_t         Clock_isrs;              /* ISRs until next tick */
  */
 rtems_isr_entry  Old_ticker;
 
-void Clock_exit( void );
+static void Clock_exit( void );
 
 /*
  *  Isr Handler
diff --git a/bsps/powerpc/shared/clock/clock-ppc-dec.c b/bsps/powerpc/shared/clock/clock-ppc-dec.c
index 103406673a..bb12e55902 100644
--- a/bsps/powerpc/shared/clock/clock-ppc-dec.c
+++ b/bsps/powerpc/shared/clock/clock-ppc-dec.c
@@ -197,17 +197,6 @@ int clockIsOn(void* unused)
   return 0;
 }
 
-/*
- *  Clock_exit
- *
- *  This routine allows the clock driver to exit by masking the interrupt and
- *  disabling the clock's counter.
- */
-void Clock_exit( void )
-{
-  (void) BSP_disconnect_clock_handler ();
-}
-
 /*
  *  Clock_initialize
  *
diff --git a/bsps/powerpc/shared/clock/clock-ppc403.c b/bsps/powerpc/shared/clock/clock-ppc403.c
index 64e6f29d39..8e3d3bb725 100644
--- a/bsps/powerpc/shared/clock/clock-ppc403.c
+++ b/bsps/powerpc/shared/clock/clock-ppc403.c
@@ -58,7 +58,7 @@ volatile uint32_t Clock_driver_ticks;
 static uint32_t   pit_value, tick_time;
 static bool       auto_restart;
 
-void Clock_exit( void );
+static void Clock_exit( void );
 
 static inline uint32_t get_itimer(void)
 {
diff --git a/bsps/powerpc/shared/clock/clock.c b/bsps/powerpc/shared/clock/clock.c
index cfd77914ec..a2a19865fb 100644
--- a/bsps/powerpc/shared/clock/clock.c
+++ b/bsps/powerpc/shared/clock/clock.c
@@ -167,15 +167,6 @@ static int ppc_clock_exception_handler_ppc405(BSP_Exception_frame *frame, unsign
   return 0;
 }
 
-void Clock_exit(void)
-{
-  /* Set the decrementer to the maximum value */
-  ppc_set_decrementer_register( PPC_CLOCK_DECREMENTER_MAX);
-
-  /* Use default clock handler */
-  ppc_clock_tick = ppc_clock_no_tick;
-}
-
 rtems_device_driver Clock_initialize(
   rtems_device_major_number major,
   rtems_device_minor_number minor,
diff --git a/bsps/powerpc/ss555/clock/clock.c b/bsps/powerpc/ss555/clock/clock.c
index 9f843cee4f..74b34180c4 100644
--- a/bsps/powerpc/ss555/clock/clock.c
+++ b/bsps/powerpc/ss555/clock/clock.c
@@ -52,8 +52,6 @@ extern int BSP_connect_clock_handler(rtems_isr_entry);
 extern int BSP_disconnect_clock_handler(void);
 extern uint32_t bsp_clicks_per_usec;
 
-void Clock_exit( void );
-
 /*
  *  ISR Handler
  */
@@ -119,7 +117,7 @@ int clockIsOn(void* unused)
  * Called via atexit()
  * Remove the clock interrupt handler by setting handler to NULL
  */
-void Clock_exit(void)
+static void Clock_exit(void)
 {
   (void) BSP_disconnect_clock_handler ();
 }
diff --git a/bsps/sh/gensh1/clock/ckinit.c b/bsps/sh/gensh1/clock/ckinit.c
index 6faaf27f58..76faf2e857 100644
--- a/bsps/sh/gensh1/clock/ckinit.c
+++ b/bsps/sh/gensh1/clock/ckinit.c
@@ -123,7 +123,7 @@ static unsigned int sh_clicks_per_tick(
 
 volatile uint32_t   Clock_driver_ticks;
 
-void Clock_exit( void );
+static void Clock_exit( void );
 static rtems_isr Clock_isr( rtems_vector_number vector );
 
 /*
diff --git a/bsps/sh/gensh2/clock/ckinit.c b/bsps/sh/gensh2/clock/ckinit.c
index 5120b594eb..30a2e218ed 100644
--- a/bsps/sh/gensh2/clock/ckinit.c
+++ b/bsps/sh/gensh2/clock/ckinit.c
@@ -42,6 +42,8 @@
 #include <rtems/score/ispsh7045.h>
 #include <rtems/score/iosh7045.h>
 
+static void Clock_exit( void );
+
 extern uint32_t bsp_clicks_per_second;
 
 #define _MTU_COUNTER0_MICROSECOND (Clock_MHZ/16)
diff --git a/bsps/sh/gensh4/clock/ckinit.c b/bsps/sh/gensh4/clock/ckinit.c
index 795203d2d9..48439d670e 100644
--- a/bsps/sh/gensh4/clock/ckinit.c
+++ b/bsps/sh/gensh4/clock/ckinit.c
@@ -24,6 +24,8 @@
 #include <rtems/score/ispsh7750.h>
 #include <rtems/score/iosh7750.h>
 
+static void Clock_exit( void );
+
 extern uint32_t bsp_clicks_per_second;
 
 #ifndef CLOCKPRIO
diff --git a/cpukit/include/rtems/clockdrv.h b/cpukit/include/rtems/clockdrv.h
index 5d7a92c515..543838b964 100644
--- a/cpukit/include/rtems/clockdrv.h
+++ b/cpukit/include/rtems/clockdrv.h
@@ -39,8 +39,6 @@ rtems_device_driver Clock_initialize(
   void *
 );
 
-void Clock_exit(void);
-
 #ifdef __cplusplus
 }
 #endif
-- 
2.16.4



More information about the devel mailing list