summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc64
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-07 09:36:15 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-09 10:11:54 -0500
commit46e72c8d5a9a67253c04201b47a0c86a9ffa7a12 (patch)
treebbd9a2af6b30319e81a00ae282cb814947d63a98 /c/src/lib/libbsp/sparc64
parentLEON: let termios layer handle \n also in polling (diff)
downloadrtems-46e72c8d5a9a67253c04201b47a0c86a9ffa7a12.tar.bz2
sparc64/shared/clock/ckinit.c: Clean up formatting
Diffstat (limited to 'c/src/lib/libbsp/sparc64')
-rw-r--r--c/src/lib/libbsp/sparc64/shared/clock/ckinit.c29
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 d601a9378e..bbef4f875f 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"