amd/acpi: Clean up SMBus references.
Replace the AMD SMBus section with the equivalent SB800 smbus.asl include or remove already commented-out sections. Verified by running the cpp preprocessor over the DSDTs and diffing the results against this patch. The only change is in src/mainboard/siemens/sitemp_g1p1/dsdt.asl, where someone added RADD and SADD to the OpRegion, but those are unused, so removing them is fine. Change-Id: I074c8a1ed1c9a944d4988752bd0fc42c199c766c Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de> Reviewed-on: http://review.coreboot.org/10618 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
9bb09526fa
commit
a4d179af56
|
@ -1648,171 +1648,5 @@ DefinitionBlock (
|
|||
/* DBGO("\n") */
|
||||
}
|
||||
} /* End Scope SI */
|
||||
#if 0
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
Name (KELV, 2732)
|
||||
Name (THOT, 800)
|
||||
Name (TCRT, 850)
|
||||
|
||||
ThermalZone(TZ00) {
|
||||
Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AC0\n") */
|
||||
Return(Add(0, 2730))
|
||||
}
|
||||
Method(_AL0,0) { /* Returns package of cooling device to turn on */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AL0\n") */
|
||||
Return(Package() {\_TZ.TZ00.FAN0})
|
||||
}
|
||||
Device (FAN0) {
|
||||
Name(_HID, EISAID("PNP0C0B"))
|
||||
Name(_PR0, Package() {PFN0})
|
||||
}
|
||||
|
||||
PowerResource(PFN0,0,0) {
|
||||
Method(_STA) {
|
||||
Store(0xF,Local0)
|
||||
Return(Local0)
|
||||
}
|
||||
Method(_ON) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
|
||||
}
|
||||
Method(_OFF) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
|
||||
}
|
||||
}
|
||||
|
||||
Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_HOT\n") */
|
||||
Return (Add (THOT, KELV))
|
||||
}
|
||||
Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_CRT\n") */
|
||||
Return (Add (TCRT, KELV))
|
||||
}
|
||||
Method(_TMP,0) { /* return current temp of this zone */
|
||||
Store (SMBR (0x07, 0x4C,, 0x00), Local0)
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400, KELV))
|
||||
}
|
||||
|
||||
Store (SMBR (0x07, 0x4C, 0x01), Local0)
|
||||
/* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
|
||||
/* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
If (LGreater (Local0, Local1)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
|
||||
Multiply (Local1, 10, Local1)
|
||||
Return (Add (Local1, KELV))
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400 , KELV))
|
||||
}
|
||||
} /* end of _TMP */
|
||||
} /* end of TZ00 */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* End of ASL file */
|
||||
|
|
|
@ -1654,171 +1654,5 @@ DefinitionBlock (
|
|||
/* DBGO("\n") */
|
||||
}
|
||||
} /* End Scope SI */
|
||||
#if 0
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
Name (KELV, 2732)
|
||||
Name (THOT, 800)
|
||||
Name (TCRT, 850)
|
||||
|
||||
ThermalZone(TZ00) {
|
||||
Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AC0\n") */
|
||||
Return(Add(0, 2730))
|
||||
}
|
||||
Method(_AL0,0) { /* Returns package of cooling device to turn on */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AL0\n") */
|
||||
Return(Package() {\_TZ.TZ00.FAN0})
|
||||
}
|
||||
Device (FAN0) {
|
||||
Name(_HID, EISAID("PNP0C0B"))
|
||||
Name(_PR0, Package() {PFN0})
|
||||
}
|
||||
|
||||
PowerResource(PFN0,0,0) {
|
||||
Method(_STA) {
|
||||
Store(0xF,Local0)
|
||||
Return(Local0)
|
||||
}
|
||||
Method(_ON) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
|
||||
}
|
||||
Method(_OFF) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
|
||||
}
|
||||
}
|
||||
|
||||
Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_HOT\n") */
|
||||
Return (Add (THOT, KELV))
|
||||
}
|
||||
Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_CRT\n") */
|
||||
Return (Add (TCRT, KELV))
|
||||
}
|
||||
Method(_TMP,0) { /* return current temp of this zone */
|
||||
Store (SMBR (0x07, 0x4C,, 0x00), Local0)
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400, KELV))
|
||||
}
|
||||
|
||||
Store (SMBR (0x07, 0x4C, 0x01), Local0)
|
||||
/* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
|
||||
/* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
If (LGreater (Local0, Local1)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
|
||||
Multiply (Local1, 10, Local1)
|
||||
Return (Add (Local1, KELV))
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400 , KELV))
|
||||
}
|
||||
} /* end of _TMP */
|
||||
} /* end of TZ00 */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* End of ASL file */
|
||||
|
|
|
@ -1625,99 +1625,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1640,100 +1640,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1700,100 +1700,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1703,100 +1703,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1682,100 +1682,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1682,100 +1682,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1605,100 +1605,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1654,171 +1654,5 @@ DefinitionBlock (
|
|||
/* DBGO("\n") */
|
||||
}
|
||||
} /* End Scope SI */
|
||||
#if 0
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
Name (KELV, 2732)
|
||||
Name (THOT, 800)
|
||||
Name (TCRT, 850)
|
||||
|
||||
ThermalZone(TZ00) {
|
||||
Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AC0\n") */
|
||||
Return(Add(0, 2730))
|
||||
}
|
||||
Method(_AL0,0) { /* Returns package of cooling device to turn on */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AL0\n") */
|
||||
Return(Package() {\_TZ.TZ00.FAN0})
|
||||
}
|
||||
Device (FAN0) {
|
||||
Name(_HID, EISAID("PNP0C0B"))
|
||||
Name(_PR0, Package() {PFN0})
|
||||
}
|
||||
|
||||
PowerResource(PFN0,0,0) {
|
||||
Method(_STA) {
|
||||
Store(0xF,Local0)
|
||||
Return(Local0)
|
||||
}
|
||||
Method(_ON) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
|
||||
}
|
||||
Method(_OFF) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
|
||||
}
|
||||
}
|
||||
|
||||
Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_HOT\n") */
|
||||
Return (Add (THOT, KELV))
|
||||
}
|
||||
Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_CRT\n") */
|
||||
Return (Add (TCRT, KELV))
|
||||
}
|
||||
Method(_TMP,0) { /* return current temp of this zone */
|
||||
Store (SMBR (0x07, 0x4C,, 0x00), Local0)
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400, KELV))
|
||||
}
|
||||
|
||||
Store (SMBR (0x07, 0x4C, 0x01), Local0)
|
||||
/* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
|
||||
/* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
If (LGreater (Local0, Local1)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
|
||||
Multiply (Local1, 10, Local1)
|
||||
Return (Add (Local1, KELV))
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400 , KELV))
|
||||
}
|
||||
} /* end of _TMP */
|
||||
} /* end of TZ00 */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* End of ASL file */
|
||||
|
|
|
@ -1648,171 +1648,5 @@ DefinitionBlock (
|
|||
/* DBGO("\n") */
|
||||
}
|
||||
} /* End Scope SI */
|
||||
#if 0
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
Name (KELV, 2732)
|
||||
Name (THOT, 800)
|
||||
Name (TCRT, 850)
|
||||
|
||||
ThermalZone(TZ00) {
|
||||
Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AC0\n") */
|
||||
Return(Add(0, 2730))
|
||||
}
|
||||
Method(_AL0,0) { /* Returns package of cooling device to turn on */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AL0\n") */
|
||||
Return(Package() {\_TZ.TZ00.FAN0})
|
||||
}
|
||||
Device (FAN0) {
|
||||
Name(_HID, EISAID("PNP0C0B"))
|
||||
Name(_PR0, Package() {PFN0})
|
||||
}
|
||||
|
||||
PowerResource(PFN0,0,0) {
|
||||
Method(_STA) {
|
||||
Store(0xF,Local0)
|
||||
Return(Local0)
|
||||
}
|
||||
Method(_ON) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
|
||||
}
|
||||
Method(_OFF) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
|
||||
}
|
||||
}
|
||||
|
||||
Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_HOT\n") */
|
||||
Return (Add (THOT, KELV))
|
||||
}
|
||||
Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_CRT\n") */
|
||||
Return (Add (TCRT, KELV))
|
||||
}
|
||||
Method(_TMP,0) { /* return current temp of this zone */
|
||||
Store (SMBR (0x07, 0x4C,, 0x00), Local0)
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400, KELV))
|
||||
}
|
||||
|
||||
Store (SMBR (0x07, 0x4C, 0x01), Local0)
|
||||
/* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
|
||||
/* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
If (LGreater (Local0, Local1)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
|
||||
Multiply (Local1, 10, Local1)
|
||||
Return (Add (Local1, KELV))
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400 , KELV))
|
||||
}
|
||||
} /* end of _TMP */
|
||||
} /* end of TZ00 */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* End of ASL file */
|
||||
|
|
|
@ -1682,100 +1682,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1682,100 +1682,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1682,100 +1682,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1700,100 +1700,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1682,100 +1682,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1625,99 +1625,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1665,171 +1665,5 @@ DefinitionBlock (
|
|||
/* DBGO("\n") */
|
||||
}
|
||||
} /* End Scope SI */
|
||||
#if 0
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
Name (KELV, 2732)
|
||||
Name (THOT, 800)
|
||||
Name (TCRT, 850)
|
||||
|
||||
ThermalZone(TZ00) {
|
||||
Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AC0\n") */
|
||||
Return(Add(0, 2730))
|
||||
}
|
||||
Method(_AL0,0) { /* Returns package of cooling device to turn on */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AL0\n") */
|
||||
Return(Package() {\_TZ.TZ00.FAN0})
|
||||
}
|
||||
Device (FAN0) {
|
||||
Name(_HID, EISAID("PNP0C0B"))
|
||||
Name(_PR0, Package() {PFN0})
|
||||
}
|
||||
|
||||
PowerResource(PFN0,0,0) {
|
||||
Method(_STA) {
|
||||
Store(0xF,Local0)
|
||||
Return(Local0)
|
||||
}
|
||||
Method(_ON) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
|
||||
}
|
||||
Method(_OFF) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
|
||||
}
|
||||
}
|
||||
|
||||
Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_HOT\n") */
|
||||
Return (Add (THOT, KELV))
|
||||
}
|
||||
Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_CRT\n") */
|
||||
Return (Add (TCRT, KELV))
|
||||
}
|
||||
Method(_TMP,0) { /* return current temp of this zone */
|
||||
Store (SMBR (0x07, 0x4C,, 0x00), Local0)
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400, KELV))
|
||||
}
|
||||
|
||||
Store (SMBR (0x07, 0x4C, 0x01), Local0)
|
||||
/* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
|
||||
/* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
If (LGreater (Local0, Local1)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
|
||||
Multiply (Local1, 10, Local1)
|
||||
Return (Add (Local1, KELV))
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400 , KELV))
|
||||
}
|
||||
} /* end of _TMP */
|
||||
} /* end of TZ00 */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* End of ASL file */
|
||||
|
|
|
@ -1664,171 +1664,5 @@ DefinitionBlock (
|
|||
/* DBGO("\n") */
|
||||
}
|
||||
} /* End Scope SI */
|
||||
#if 0
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
Name (KELV, 2732)
|
||||
Name (THOT, 800)
|
||||
Name (TCRT, 850)
|
||||
|
||||
ThermalZone(TZ00) {
|
||||
Method(_AC0,0) { /* Active Cooling 0 (0=highest fan speed) */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AC0\n") */
|
||||
Return(Add(0, 2730))
|
||||
}
|
||||
Method(_AL0,0) { /* Returns package of cooling device to turn on */
|
||||
/* DBGO("\\_TZ\\TZ00\\_AL0\n") */
|
||||
Return(Package() {\_TZ.TZ00.FAN0})
|
||||
}
|
||||
Device (FAN0) {
|
||||
Name(_HID, EISAID("PNP0C0B"))
|
||||
Name(_PR0, Package() {PFN0})
|
||||
}
|
||||
|
||||
PowerResource(PFN0,0,0) {
|
||||
Method(_STA) {
|
||||
Store(0xF,Local0)
|
||||
Return(Local0)
|
||||
}
|
||||
Method(_ON) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _ON\n") */
|
||||
}
|
||||
Method(_OFF) {
|
||||
/* DBGO("\\_TZ\\TZ00\\FAN0 _OFF\n") */
|
||||
}
|
||||
}
|
||||
|
||||
Method(_HOT,0) { /* return hot temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_HOT\n") */
|
||||
Return (Add (THOT, KELV))
|
||||
}
|
||||
Method(_CRT,0) { /* return critical temp in tenths degree Kelvin */
|
||||
/* DBGO("\\_TZ\\TZ00\\_CRT\n") */
|
||||
Return (Add (TCRT, KELV))
|
||||
}
|
||||
Method(_TMP,0) { /* return current temp of this zone */
|
||||
Store (SMBR (0x07, 0x4C,, 0x00), Local0)
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400, KELV))
|
||||
}
|
||||
|
||||
Store (SMBR (0x07, 0x4C, 0x01), Local0)
|
||||
/* only the two MSBs in the external temperature low byte are used, resolution 0.25. We ignore it */
|
||||
/* Store (SMBR (0x07, 0x4C, 0x10), Local2) */
|
||||
If (LGreater (Local0, 0x10)) {
|
||||
If (LGreater (Local0, Local1)) {
|
||||
Store (Local0, Local1)
|
||||
}
|
||||
|
||||
Multiply (Local1, 10, Local1)
|
||||
Return (Add (Local1, KELV))
|
||||
}
|
||||
Else {
|
||||
Add (Local0, THOT, Local0)
|
||||
Return (Add (400 , KELV))
|
||||
}
|
||||
} /* end of _TMP */
|
||||
} /* end of TZ00 */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/* End of ASL file */
|
||||
|
|
|
@ -1212,102 +1212,6 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "SIEMENS", "SITEMP ", 0x20101005)
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x10) // 0x0C replace by 0x10
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8, /* SMBUS slave data */
|
||||
SMK1, 8,
|
||||
SLMC, 8,
|
||||
RADD, 8,
|
||||
SADD, 8
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
#include "acpi/thermal.asl"
|
||||
}
|
||||
|
|
|
@ -1620,100 +1620,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1636,100 +1636,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1738,100 +1738,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1625,99 +1625,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1625,99 +1625,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
|
@ -1620,100 +1620,7 @@ DefinitionBlock (
|
|||
}
|
||||
} /* End Scope SI */
|
||||
|
||||
/* SMBUS Support */
|
||||
Mutex (SBX0, 0x00)
|
||||
OperationRegion (SMB0, SystemIO, 0xB00, 0x0C)
|
||||
Field (SMB0, ByteAcc, NoLock, Preserve) {
|
||||
HSTS, 8, /* SMBUS status */
|
||||
SSTS, 8, /* SMBUS slave status */
|
||||
HCNT, 8, /* SMBUS control */
|
||||
HCMD, 8, /* SMBUS host cmd */
|
||||
HADD, 8, /* SMBUS address */
|
||||
DAT0, 8, /* SMBUS data0 */
|
||||
DAT1, 8, /* SMBUS data1 */
|
||||
BLKD, 8, /* SMBUS block data */
|
||||
SCNT, 8, /* SMBUS slave control */
|
||||
SCMD, 8, /* SMBUS shadow cmd */
|
||||
SEVT, 8, /* SMBUS slave event */
|
||||
SDAT, 8 /* SMBUS slave data */
|
||||
}
|
||||
|
||||
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */
|
||||
Store (0x1E, HSTS)
|
||||
Store (0xFA, Local0)
|
||||
While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) {
|
||||
Stall (0x64)
|
||||
Decrement (Local0)
|
||||
}
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
|
||||
Method (SWTC, 1, NotSerialized) {
|
||||
Store (Arg0, Local0)
|
||||
Store (0x07, Local2)
|
||||
Store (One, Local1)
|
||||
While (LEqual (Local1, One)) {
|
||||
Store (And (HSTS, 0x1E), Local3)
|
||||
If (LNotEqual (Local3, Zero)) { /* read sucess */
|
||||
If (LEqual (Local3, 0x02)) {
|
||||
Store (Zero, Local2)
|
||||
}
|
||||
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
If (LLess (Local0, 0x0A)) { /* read failure */
|
||||
Store (0x10, Local2)
|
||||
Store (Zero, Local1)
|
||||
}
|
||||
Else {
|
||||
Sleep (0x0A) /* 10 ms, try again */
|
||||
Subtract (Local0, 0x0A, Local0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Return (Local2)
|
||||
}
|
||||
|
||||
Method (SMBR, 3, NotSerialized) {
|
||||
Store (0x07, Local0)
|
||||
If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) {
|
||||
Store (WCLR (), Local0) /* clear SMBUS status register before read data */
|
||||
If (LEqual (Local0, Zero)) {
|
||||
Release (SBX0)
|
||||
Return (0x0)
|
||||
}
|
||||
|
||||
Store (0x1F, HSTS)
|
||||
Store (Or (ShiftLeft (Arg1, One), One), HADD)
|
||||
Store (Arg2, HCMD)
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (0x48, HCNT) /* read byte */
|
||||
}
|
||||
|
||||
Store (SWTC (0x03E8), Local1) /* 1000 ms */
|
||||
If (LEqual (Local1, Zero)) {
|
||||
If (LEqual (Arg0, 0x07)) {
|
||||
Store (DAT0, Local0)
|
||||
}
|
||||
}
|
||||
Else {
|
||||
Store (Local1, Local0)
|
||||
}
|
||||
|
||||
Release (SBX0)
|
||||
}
|
||||
|
||||
/* DBGO("the value of SMBusData0 register ") */
|
||||
/* DBGO(Arg2) */
|
||||
/* DBGO(" is ") */
|
||||
/* DBGO(Local0) */
|
||||
/* DBGO("\n") */
|
||||
|
||||
Return (Local0)
|
||||
}
|
||||
#include <southbridge/amd/cimx/sb800/acpi/smbus.asl>
|
||||
|
||||
/* THERMAL */
|
||||
Scope(\_TZ) {
|
||||
|
|
Loading…
Reference in New Issue