Changeset 4172cf1b in rtems
- Timestamp:
- 10/12/14 20:37:33 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 9fab016
- Parents:
- 3dc9d80f
- git-author:
- Joel Sherrill <joel.sherrill@…> (10/12/14 20:37:33)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (10/13/14 15:33:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/sh/sh7045/clock/ckinit.c
r3dc9d80f r4172cf1b 1 1 /* 2 2 * This file contains the clock driver the Hitachi SH 704X 3 * 3 */ 4 5 /* 4 6 * Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and 5 7 * Bernd Becker (becker@faw.uni-ulm.de) … … 10 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 *13 14 * 14 15 * COPYRIGHT (c) 1998. … … 36 37 #include <stdlib.h> 37 38 38 #include <rtems/ libio.h>39 #include <rtems/clockdrv.h> 39 40 #include <rtems/score/sh_io.h> 40 41 #include <rtems/score/sh.h> … … 71 72 * number of clock ticks since the driver was initialized. 72 73 */ 73 74 74 volatile uint32_t Clock_driver_ticks; 75 75 76 static void Clock_exit( void );77 76 static rtems_isr Clock_isr( rtems_vector_number vector ); 78 77 static uint32_t Clock_MHZ ; … … 85 84 * has passed. 86 85 */ 87 88 86 uint32_t Clock_isrs; /* ISRs until next tick */ 89 87 static uint32_t Clock_isrs_const; /* only calculated once */ 90 88 91 89 /* 92 * These are set by clock driver during its init93 */94 95 rtems_device_major_number rtems_clock_major = ~0;96 rtems_device_minor_number rtems_clock_minor;97 98 /*99 90 * The previous ISR on this clock tick interrupt vector. 100 91 */ 101 102 92 rtems_isr_entry Old_ticker; 103 93 … … 105 95 * Isr Handler 106 96 */ 107 108 rtems_isr Clock_isr( 97 static rtems_isr Clock_isr( 109 98 rtems_vector_number vector 110 99 ) … … 144 133 * is used to initially establish the clock tick. 145 134 */ 146 147 void Install_clock( 135 static void Install_clock( 148 136 rtems_isr_entry clock_isr 149 137 ) … … 151 139 uint8_t temp8 = 0; 152 140 uint32_t factor = 1000000; 153 154 141 155 142 /* … … 213 200 * Schedule the clock cleanup routine to execute if the application exits. 214 201 */ 215 216 202 atexit( Clock_exit ); 217 203 } … … 220 206 * Clean up before the application exits 221 207 */ 222 223 208 void Clock_exit( void ) 224 209 { … … 247 232 * Device driver entry point for clock tick driver initialization. 248 233 */ 249 250 234 rtems_device_driver Clock_initialize( 251 235 rtems_device_major_number major, … … 256 240 Install_clock( Clock_isr ); 257 241 258 /*259 * make major/minor avail to others such as shared memory driver260 */261 262 rtems_clock_major = major;263 rtems_clock_minor = minor;264 265 242 return RTEMS_SUCCESSFUL; 266 243 }
Note: See TracChangeset
for help on using the changeset viewer.