From 1bdaa54d4001ba3ff03c5062f2ef037129f644f0 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Fri, 30 May 2003 00:55:23 +0000 Subject: [PATCH] add support for AMD Opteron VID encoding patch from Philip Pokorny git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1738 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 5 ++++- doc/vid | 4 ++++ kernel/include/sensors_vid.h | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 309efb06..112b9917 100644 --- a/CHANGES +++ b/CHANGES @@ -24,7 +24,8 @@ ask CVS about it: Library: Add support for exponents and logarithms for vt1211/vt8235 temps; add lm85 support Makefiles: Generate warnings if new library won't be found by ld.so; - Modules now install in kernel/drivers/i2c/[busses,chips] + Modules now install in kernel/drivers/i2c/[busses,chips]; + Ensure that headers in /usr/local/include are used first Modules (all): Cleanups including - Add #include - C99 initializers @@ -39,11 +40,13 @@ ask CVS about it: - Remove xxx_inc_use() and xxx_dec_use() functions - Use module_init() and module_exit() - Update to new i2c_driver struct definition + Modules (several): Add support for AMD Opteron VRM (VID) encoding Module adm1021: Set alarm on failed reads and report old value; merge changes from kernel 2.5.54 Module bmcsensors: Fix compile when DEBUG=1 Modules ddcmon, eeprom: Use i2c block reads if possible; better error handling + Module gl520sm: Fix temperature over/hyst writes Module lm75: merge changes from kernel 2.5.54 Module lm85: New Module i2c-amd756: merge changes from kernel 2.5.54 diff --git a/doc/vid b/doc/vid index 8b47f570..4a905b04 100644 --- a/doc/vid +++ b/doc/vid @@ -23,6 +23,8 @@ The common versions are as follows: Document Version Voltage Range Increment Processors ---------------- ------------- --------- ---------- +"2.4" 0.8 - 1.55 0.025V AMD Opteron 24x + 8.2 (8.1, 8.3) 1.30 - 2.05V 0.05V PII, PIII, Celeron 2.1 - 3.5V 0.10V @@ -34,6 +36,8 @@ Document Version Voltage Range Increment Processors 9.0, (9.1) 1.100 - 1.850V 0.025V P4, AMD Socket A +"2.4" is not an actual document version but simply a way to identify +AMD Opteron 24x processors. Note that versions 8.1 - 8.4 are compatible. lm_sensors versions through 2.6.3 support only the VRM 8.2 standard. diff --git a/kernel/include/sensors_vid.h b/kernel/include/sensors_vid.h index d40e3435..54b823d0 100644 --- a/kernel/include/sensors_vid.h +++ b/kernel/include/sensors_vid.h @@ -28,6 +28,21 @@ available at http://developer.intel.com */ +/* + AMD Opteron processors don't follow the Intel VRM spec. + I'm going to "make up" 2.4 as the VRM spec for the Opterons. + No good reason just a mnemonic for the 24x Opteron processor + series + + Opteron VID encoding is: + + 00000 = 1.550 V + 00001 = 1.525 V + . . . . + 11110 = 0.800 V + 11111 = 0.000 V (off) + */ + /* Legal val values 00 - 1F. vrm is the Intel VRM document version. @@ -41,6 +56,9 @@ static inline int vid_from_reg(int val, int vrm) { switch(vrm) { + case 24: /* Opteron processor */ + return(val == 0x1f ? 0 : 1550 - val * 25); + case 91: /* VRM 9.1 */ case 90: /* VRM 9.0 */ return(val == 0x1f ? 0 :