[rtems commit] sparc64/shared/clock/ckinit.c: Clean up formatting

Joel Sherrill joel at rtems.org
Thu Oct 9 15:03:36 UTC 2014


Module:    rtems
Branch:    master
Commit:    46e72c8d5a9a67253c04201b47a0c86a9ffa7a12
Changeset: http://git.rtems.org/rtems/commit/?id=46e72c8d5a9a67253c04201b47a0c86a9ffa7a12

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Tue Oct  7 09:36:15 2014 -0500

sparc64/shared/clock/ckinit.c: Clean up formatting

---

 c/src/lib/libbsp/sparc64/shared/clock/ckinit.c |   29 ++++++++++++-----------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c b/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c
index d601a93..bbef4f8 100644
--- a/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c
+++ b/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c
@@ -3,7 +3,9 @@
  *  This file provides a template for the clock device driver initialization.
  *
  *  Modified for sun4v - niagara
- *
+ */
+
+/*
  *  COPYRIGHT (c) 1989-1999.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -21,7 +23,7 @@
 #include <bspopts.h>
 #include <boot/ofw.h>
 
-/* this is default frequency for simics simulator of niagara. Use the 
+/* This is default frequency for simics simulator of niagara. Use the
  * get_Frequency function to determine the CPU clock frequency at runtime.
  */
 #define CPU_FREQ (5000000)
@@ -33,16 +35,16 @@ uint64_t sparc64_cycles_per_tick;
 
 static unsigned int get_Frequency(void)
 {
-	phandle root = ofw_find_device("/");
-	unsigned int freq;
-	if (ofw_get_property(root, "clock-frequency", &freq, sizeof(freq)) <= 0) {
-		printk("Unable to determine frequency, default: 0x%x\n",CPU_FREQ);
-		return CPU_FREQ;
-	}
+  phandle root = ofw_find_device("/");
+  unsigned int freq;
 
-	return freq;
-} 
+  if (ofw_get_property(root, "clock-frequency", &freq, sizeof(freq)) <= 0) {
+    printk("Unable to determine frequency, default: 0x%x\n",CPU_FREQ);
+    return CPU_FREQ;
+  }
 
+  return freq;
+}
 
 void Clock_driver_support_at_tick(void)
 {
@@ -85,13 +87,14 @@ void Clock_driver_support_at_tick(void)
 
 void Clock_driver_support_initialize_hardware(void)
 {
-  uint64_t tick_reg; 	
+  uint64_t tick_reg;
   int bit_mask;
 
   bit_mask = SPARC_SOFTINT_TM_MASK | SPARC_SOFTINT_SM_MASK | (1<<14);
   sparc64_clear_interrupt_bits(bit_mask);
 
-  sparc64_cycles_per_tick = rtems_configuration_get_microseconds_per_tick()*(get_Frequency()/1000000);
+  sparc64_cycles_per_tick =
+    rtems_configuration_get_microseconds_per_tick()*(get_Frequency()/1000000);
 
 #if defined (SUN4U)
   sparc64_read_tick(tick_reg);
@@ -109,12 +112,10 @@ void Clock_driver_support_initialize_hardware(void)
 #endif
 }
 
-
 #define Clock_driver_support_shutdown_hardware( ) \
   do { \
     \
   } while ( 0 )
 
-
 #include "../../../shared/clockdrv_shell.h"
 



More information about the vc mailing list