summaryrefslogtreecommitdiff
path: root/Board/IO/F81866/ACPI/PS2ms.asl
blob: 9447512464ed15a85c9a0587cd8393dddd335c15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
//*************************************************************************
//*************************************************************************
//**                                                                     **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.            **
//**                                                                     **
//**                       All Rights Reserved.                          **
//**                                                                     **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
//**                                                                     **
//**                       Phone: (770)-246-8600                         **
//**                                                                     **
//*************************************************************************
//*************************************************************************
//
//*************************************************************************
// $Header: /Alaska/BIN/IO/Fintek/F81866/F81866 Device ASL Files/PS2ms.asl 1     7/20/11 4:22a Kasalinyi $
//
// $Revision: 1 $
//
// $Date: 7/20/11 4:22a $
//*************************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/IO/Fintek/F81866/F81866 Device ASL Files/PS2ms.asl $
// 
// 1     7/20/11 4:22a Kasalinyi
// [Category]  	Improvement
// [Description]  	Initial Porting
// [Files]  		DeviceASL.cif
// FDC.ASL
// LPTE.ASL
// PS2kb.asl
// PS2ms.asl
// Uart1.ASL
// Uart2.ASL
// Uart3.ASL
// Uart4.ASL
// Uart5.ASL
// Uart6.ASL
// SIOH.ASL
// 
// 2     3/21/11 9:43p Mikes
// Clean code
// 
//*************************************************************************
//<AMI_FHDR_START>
//
// Name:  <PS2ms.ASL>
//
// Description: Define ACPI method or namespce For Super IO
//
//<AMI_FHDR_END>
//*************************************************************************

//**********************************************************************;
// PS2 Mouse Device, IO category # - 12
//---------------------------------------------------------------------
Device(PS2M) {

        Name(_HID, EISAID("PNP0F03"))	// Hardware Device ID - Microsoft mouse
					// check if MSFT Mouse driver supports D3 properly on all MSFT OSes. 
					// It may prevent OS to go to S3 sleep state
					// Use Logitech _HID instead if OS rejecting to go to S3.
//        Name(_HID, EISAID("PNP0F12"))	// Logitech PS2 Mouse ID
        Name(_CID, EISAID("PNP0F13"))	// Compatible ID

        Method(_STA, 0) {
                // Check if PS2Mouse detected in BIOS Post
                // IOST - bit mask of enabled devices, 0x4000 - PS2M mask
                If(And(\IOST, 0x4000)){		// Check if PS2MS detected in BIOS Post
                	Return(0x0f) 
				} else {
					Return(0x00)// device's not present
				}
        }
        Name(CRS1, ResourceTemplate()
        {
                IRQNoFlags(){12}
        })
        Name(CRS2, ResourceTemplate()
	{
		IO(Decode16, 0x60, 0x60, 0, 0x1)
		IO(Decode16, 0x64, 0x64, 0, 0x1)
                IRQNoFlags(){12}
	})
        Method(_CRS,0)
        {
        	If(And(\IOST, 0x0400)){	// PS2K is present, I/O resources 0x60 & 0x64 are reserved there
       		    Return(CRS1)
		} else {	        // single PS/2 mouse(no PS/2 kbd), need to supply I/O resources 0x60 & 0x64 for PS/2 Controller.
		    Return(CRS2)
		}
   	}

//-----------------------------------------------------------------------
//NOTE: _PRS MUST be the NAME not a METHOD object 
//to have GENERICSIO.C working right! 
//-----------------------------------------------------------------------
	Name(_PRS, ResourceTemplate(){
		StartDependentFn(0, 0) { 
			IRQNoFlags(){12} 
		}
		EndDependentFn()
	})

	// Mouse 2nd Level wake up control method
	Method(_PSW, 1){
		Store(Arg0, \MSFG)
	}

}// End of PS2M

Scope(\){
	Name(\MSFG, 0x01)	//Mouse wake-up flag default enable
}
//*************************************************************************
//*************************************************************************
//**                                                                     **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.            **
//**                                                                     **
//**                       All Rights Reserved.                          **
//**                                                                     **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
//**                                                                     **
//**                       Phone: (770)-246-8600                         **
//**                                                                     **
//*************************************************************************
//*************************************************************************