Changeset 2600
- Timestamp:
- 06/19/04 19:07:40 (9 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/kernel/include/sensors_vid.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/include/sensors_vid.h
r2152 r2600 2 2 sensors_vid.h - Part of lm_sensors, Linux kernel modules for hardware 3 3 monitoring 4 Copyright (c) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com>4 Copyright (c) 2002-2004 Mark D. Studebaker <mdsxyz123@yahoo.com> 5 5 With assistance from Trent Piepho <xyzzy@speakeasy.org> 6 6 … … 22 22 /* 23 23 This file contains common code for decoding VID pins. 24 This file is #included in various chip drivers in this directory.24 This file is #included in various sensor chip drivers. 25 25 As the user is unlikely to load more than one driver which 26 26 includes this code we don't worry about the wasted space. 27 Reference: VRM x.y DC-DC Converter Design Guidelines, 28 available at http://developer.intel.com 27 References: VRM x.y DC-DC Converter Design Guidelines, 28 VRD 10.0 Design Guide, 29 available at http://developer.intel.com 29 30 */ 30 31 … … 45 46 46 47 /* 47 Legal val values 00 - 1F .48 Legal val values 00 - 1F except for VRD 10.0, 0x00-0x3f. 48 49 vrm is the Intel VRM document version. 49 50 Note: vrm version is scaled by 10 and the return value is scaled by 1000 … … 55 56 static inline int vid_from_reg(int val, int vrm) 56 57 { 58 int vid; 59 57 60 switch(vrm) { 61 62 case 100: /* VRD 10.0 */ 63 if((val & 0x1f) == 0x1f) 64 return 0; 65 if((val & 0x1f) <= 0x09 || val == 0x0a) 66 vid = 10875 - (val & 0x1f) * 250; 67 else 68 vid = 18625 - (val & 0x1f) * 250; 69 if(val & 0x20) 70 vid += 125; 71 vid /= 10; /* only return 3 dec. places for now */ 72 return vid; 58 73 59 74 case 24: /* Opteron processor */
