Changeset 46e72c8 in rtems


Ignore:
Timestamp:
10/07/14 14:36:15 (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, 5, master
Children:
780eab4
Parents:
44bbee09
git-author:
Joel Sherrill <joel.sherrill@…> (10/07/14 14:36:15)
git-committer:
Joel Sherrill <joel.sherrill@…> (10/09/14 15:11:54)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc64/shared/clock/ckinit.c

    r44bbee09 r46e72c8  
    44 *
    55 *  Modified for sun4v - niagara
    6  *
     6 */
     7
     8/*
    79 *  COPYRIGHT (c) 1989-1999.
    810 *  On-Line Applications Research Corporation (OAR).
     
    2224#include <boot/ofw.h>
    2325
    24 /* this is default frequency for simics simulator of niagara. Use the
     26/* This is default frequency for simics simulator of niagara. Use the
    2527 * get_Frequency function to determine the CPU clock frequency at runtime.
    2628 */
     
    3436static unsigned int get_Frequency(void)
    3537{
    36         phandle root = ofw_find_device("/");
    37         unsigned int freq;
    38         if (ofw_get_property(root, "clock-frequency", &freq, sizeof(freq)) <= 0) {
    39                 printk("Unable to determine frequency, default: 0x%x\n",CPU_FREQ);
    40                 return CPU_FREQ;
    41         }
     38  phandle root = ofw_find_device("/");
     39  unsigned int freq;
    4240
    43         return freq;
    44 }
     41  if (ofw_get_property(root, "clock-frequency", &freq, sizeof(freq)) <= 0) {
     42    printk("Unable to determine frequency, default: 0x%x\n",CPU_FREQ);
     43    return CPU_FREQ;
     44  }
    4545
     46  return freq;
     47}
    4648
    4749void Clock_driver_support_at_tick(void)
     
    8688void Clock_driver_support_initialize_hardware(void)
    8789{
    88   uint64_t tick_reg;   
     90  uint64_t tick_reg;
    8991  int bit_mask;
    9092
     
    9294  sparc64_clear_interrupt_bits(bit_mask);
    9395
    94   sparc64_cycles_per_tick = rtems_configuration_get_microseconds_per_tick()*(get_Frequency()/1000000);
     96  sparc64_cycles_per_tick =
     97    rtems_configuration_get_microseconds_per_tick()*(get_Frequency()/1000000);
    9598
    9699#if defined (SUN4U)
     
    110113}
    111114
    112 
    113115#define Clock_driver_support_shutdown_hardware( ) \
    114116  do { \
     
    116118  } while ( 0 )
    117119
    118 
    119120#include "../../../shared/clockdrv_shell.h"
    120121
Note: See TracChangeset for help on using the changeset viewer.