summaryrefslogtreecommitdiff
path: root/ReferenceCode/AcpiTables/Dsdt/H8S2113_SIO.ASL
blob: e3bbd808a82b22e1fd2464b1eb06a0289136b6d5 (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
129
130
131
132
133
134
/**************************************************************************;
;*                                                                        *;
;*    Intel Confidential                                                  *;
;*                                                                        *;
;*    Intel Corporation - ACPI Reference Code for the Haswell             *;
;*    Family of Customer Reference Boards.                                *;
;*                                                                        *;
;*                                                                        *;
;*    Copyright (c)  1999 - 2012 Intel Corporation. All rights reserved   *;
;*    This software and associated documentation (if any) is furnished    *;
;*    under a license and may only be used or copied in accordance        *;
;*    with the terms of the license. Except as permitted by such          *;
;*    license, no part of this software or documentation may be           *;
;*    reproduced, stored in a retrieval system, or transmitted in any     *;
;*    form or by any means without the express written consent of         *;
;*    Intel Corporation.                                                  *;
;*                                                                        *;
;*                                                                        *;
;**************************************************************************/
/*++
  This file contains a 'Sample Driver' and is licensed as such  
  under the terms of your license agreement with Intel or your  
  vendor. This file may be modified by the user, subject to    
  the additional terms of the license agreement                 
--*/
Device(H8S2)
{
  Name(_HID,EISAID("PNP0A05"))

  Name(_UID, 5)

  Method(_STA,0,Serialized)
  {
    If(LEqual(PFLV,FMBL))
    {
      Return(0x000F)
    }

    Return(0x0000)
  }

  Device(UAR9)  // Serial Port UART 9
  {
    Name(_HID, EISAID("PNP0501"))
  
    Name(_UID, 1)

    //
    // Status Method for UART 9.
    //
    Method(_STA, 0, Serialized)
    {
      If(LAnd(LEqual(PFLV,FMBL), LNotEqual(BID, BHB)))
     {
      Return(0x000F)
     }

      Return(0x0000)
    }

    //
    // Disable Method for UART 9.
    //
    //
    // Current Resource Setting Method for UART 9.
    //
    Method(_CRS, 0, Serialized)
    {
      //
      // Create the Buffer that stores the resources to be returned.
      //
      Name(BUF0, ResourceTemplate()
      {
        IO(Decode16,0x03F8,0x03F8,0x01,0x08)
        IRQNoFlags(){4}
      })
  
      //
      // TO-DO: Need to implement the code updating BUF0 (I/O 0x3F8~0x3FF and IRQ 4 are the default setting)
      // according to the real resources assigned when the EC commands are available.
      //
      
      Return(BUF0)
    }
  

    //
    // Set Resource Setting Method for UART 9.
    //
    Method(_SRS,1,Serialized)
    {
      CreateByteField(Arg0, 0x02, IOLO)
      CreateByteField(Arg0, 0x03, IOHI)
      CreateWordField(Arg0, 0x09, IRQW)
  
      If(LEqual(IOHI, 0x03))
      {
        If(LEqual(IOLO, 0xF8))
        {
          If(LEqual(IRQW, 4))
          {
             Store(1, HSCS)
          }
        }
      }
  
      //
      // TO-DO: Need to implement the code setting the resources based on the arguments when the EC commands are available.
      //
    }

    //
    // D0 Method for COM Port.
    //
    Method(_PS0,0,Serialized)
    {
      //
      // TO-DO: Need to implement the code put the device on D0 state when the EC commands are available.
      //
    }
  
    //
    // D3 Method for COM Port.
    //
    Method(_PS3,0,Serialized)
    {
      //
      // TO-DO: Need to implement the code putting the device on D3 state when the EC commands are available.
      //
    }
  }
}