Changeset 46e72c8 in rtems
- Timestamp:
- 10/07/14 14:36:15 (9 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/sparc64/shared/clock/ckinit.c
r44bbee09 r46e72c8 4 4 * 5 5 * Modified for sun4v - niagara 6 * 6 */ 7 8 /* 7 9 * COPYRIGHT (c) 1989-1999. 8 10 * On-Line Applications Research Corporation (OAR). … … 22 24 #include <boot/ofw.h> 23 25 24 /* this is default frequency for simics simulator of niagara. Use the26 /* This is default frequency for simics simulator of niagara. Use the 25 27 * get_Frequency function to determine the CPU clock frequency at runtime. 26 28 */ … … 34 36 static unsigned int get_Frequency(void) 35 37 { 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; 42 40 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 } 45 45 46 return freq; 47 } 46 48 47 49 void Clock_driver_support_at_tick(void) … … 86 88 void Clock_driver_support_initialize_hardware(void) 87 89 { 88 uint64_t tick_reg; 90 uint64_t tick_reg; 89 91 int bit_mask; 90 92 … … 92 94 sparc64_clear_interrupt_bits(bit_mask); 93 95 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); 95 98 96 99 #if defined (SUN4U) … … 110 113 } 111 114 112 113 115 #define Clock_driver_support_shutdown_hardware( ) \ 114 116 do { \ … … 116 118 } while ( 0 ) 117 119 118 119 120 #include "../../../shared/clockdrv_shell.h" 120 121
Note: See TracChangeset
for help on using the changeset viewer.