Changeset 6d44a3e in rtems
- Timestamp:
- 10/12/14 15:06:05 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- b3f86763
- Parents:
- 88867e89
- git-author:
- Joel Sherrill <joel.sherrill@…> (10/12/14 15:06:05)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (10/13/14 15:33:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/m68k/mvme167/clock/ckinit.c
r88867e89 r6d44a3e 1 /* ckinit.c 2 * 1 /* 3 2 * Implementation of the Clock_initialize() functions 4 3 * prototyped in rtems/c/src/lib/include/clockdrv.h. … … 13 12 * Computer Programmer's Reference Guide (MVME187PG/D2) with the April 14 13 * 1993 supplements/addenda (MVME187PG/D2A1). 15 * 14 */ 15 16 /* 16 17 * COPYRIGHT (c) 1989-1999. 17 18 * On-Line Applications Research Corporation (OAR). … … 33 34 34 35 /* 35 * These are declared in rtems/c/src/lib/include/clockdrv.h36 * In other BSPs, rtems_clock_major is set to the largest possible value37 * (which is almost certainly greater than the number of I/O devices) to38 * indicate that this device has not been initialized yet. The actual39 * device number is supplied during initialization. We do not do that.40 *41 * Initialized data ends up the the .data section. This causes two problems:42 * 1) the .data section is no longer ROMable because we need to write into43 * it. 2) The initial value is correct only after a download. On subsequent44 * program restarts, the value is not re-initialized but left to whatever it45 * was when the previous run terminated or aborted. If we depend on some46 * global variable value, we must initialize that value explicitly in code47 * at boot time.48 */49 rtems_device_major_number rtems_clock_major;50 rtems_device_minor_number rtems_clock_minor;51 52 /*53 36 * Clock_driver_ticks is a monotonically increasing counter of the number of 54 37 * VMEchip2 timer #2 ticks since the driver was initialized. 55 38 */ 56 volatile uint32_t 39 volatile uint32_t Clock_driver_ticks; 57 40 58 41 /* … … 83 66 * kernel clock tick (if Clock_isrs == 1), call rtems_clock_tick() to signal 84 67 * the event and reset the Clock_isrs counter; else, just decrement it. 85 *86 * Input parameters:87 * vector number88 *89 * Output parameters: NONE90 *91 * Return values: NONE92 68 */ 93 rtems_isr VMEchip2_T2_isr(69 static rtems_isr VMEchip2_T2_isr( 94 70 rtems_vector_number vector 95 71 ) … … 137 113 * boot ROM to provide a 1 MHz clock to the timers. For a 25 MHz MVME167, the 138 114 * prescaler value should be 0xE7 (page 2-63). 139 *140 * Input parameters: NONE141 *142 * Output paremeters: NONE143 *144 * Return values: NONE145 115 */ 146 void VMEchip2_T2_initialize( void )116 static void VMEchip2_T2_initialize( void ) 147 117 { 148 118 Clock_driver_ticks = 0; … … 165 135 166 136 /* 167 * clock_exit168 *169 137 * This routine stops the VMEchip2 T2 timer, disables its interrupt, and 170 138 * re-install the old interrupt vectors. 171 *172 * Input parameters: NONE173 *174 * Output parameters: NONE175 *176 * Return values: NONE177 *178 139 */ 179 140 void clock_exit( void ) … … 186 147 } 187 148 188 /*189 * Clock_initialize()190 * prototyped in rtems/c/src/lib/include/clockdrv.h.191 *192 * Input parameters:193 * major - console device major number194 * minor - console device minor number195 * ALWAYS 0 IN VERSION 3.6.0 OF RTEMS!196 * Probably provided for symmetry with the other I/O calls.197 * arg - pointer to optional device driver arguments198 * ALWAYS NULL IN VERSION 3.6.0 OF RTEMS!199 *200 * Output paremeters: NONE201 *202 * Return values:203 * rtems_device_driver status code204 */205 149 rtems_device_driver Clock_initialize( 206 150 rtems_device_major_number major, … … 211 155 VMEchip2_T2_initialize(); 212 156 213 /*214 * Make major/minor avail to others such as shared memory driver215 */216 rtems_clock_major = major;217 rtems_clock_minor = minor;218 219 157 return RTEMS_SUCCESSFUL; 220 158 }
Note: See TracChangeset
for help on using the changeset viewer.