Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / src / mainboard / iwill / dk8_htx / dsdt.asl
1 /*
2  * Copyright 2005 AMD
3  */
4 DefinitionBlock ("DSDT.aml", "DSDT", 1, "AMD-K8", "AMDACPI", 100925440)
5 {
6     Scope (_PR)
7     {
8         Processor (CPU0, 0x00, 0x0000C010, 0x06) {}
9         Processor (CPU1, 0x01, 0x00000000, 0x00) {}
10         Processor (CPU2, 0x02, 0x00000000, 0x00) {}
11         Processor (CPU3, 0x03, 0x00000000, 0x00) {}
12
13     }
14
15     Method (FWSO, 0, NotSerialized) { }
16
17     Name (_S0, Package (0x04) { 0x00, 0x00, 0x00, 0x00 })
18     Name (_S1, Package (0x04) { 0x01, 0x01, 0x01, 0x01 })
19     Name (_S3, Package (0x04) { 0x05, 0x05, 0x05, 0x05 })
20     Name (_S5, Package (0x04) { 0x07, 0x07, 0x07, 0x07 })
21
22     Scope (_SB)
23     {
24         Device (PCI0)
25         {
26             /* BUS0 root bus */
27
28             External (BUSN)
29             External (MMIO)
30             External (PCIO)
31             External (SBLK)
32             External (TOM1)
33             External (HCLK)
34             External (SBDN)
35             External (HCDN)
36             External (CBST)
37
38
39             Name (_HID, EisaId ("PNP0A03"))
40             Name (_ADR, 0x00180000)
41             Name (_UID, 0x01)
42
43             Name (HCIN, 0x00)  // HC1
44
45             Method (_BBN, 0, NotSerialized)
46             {
47                 Return (GBUS (GHCN(HCIN), GHCL(HCIN)))
48             }
49
50             Method (_CRS, 0, NotSerialized)
51             {
52                 Name (BUF0, ResourceTemplate ()
53                 {
54                     IO (Decode16, 0x0CF8, 0x0CF8, 0x01, 0x08) //CF8-CFFh
55                     IO (Decode16, 0xC000, 0xC000, 0x01, 0x80) //8000h
56                     IO (Decode16, 0xC080, 0xC080, 0x01, 0x80) //8080h
57
58                     WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
59                         0x0000, // Address Space Granularity
60                         0x8100, // Address Range Minimum
61                         0xFFFF, // Address Range Maximum
62                         0x0000, // Address Translation Offset
63                         0x7F00,,,
64                         , TypeStatic)    //8100h-FFFFh
65
66                     DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
67                         0x00000000, // Address Space Granularity
68                         0x000C0000, // Address Range Minimum
69                         0x00000000, // Address Range Maximum
70                         0x00000000, // Address Translation Offset
71                         0x00000000,,,
72                         , AddressRangeMemory, TypeStatic)   //Video BIOS A0000h-C7FFFh
73
74                     Memory32Fixed (ReadWrite, 0x000D8000, 0x00004000)//USB HC D8000-DBFFF
75
76                     WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
77                         0x0000, // Address Space Granularity
78                         0x0000, // Address Range Minimum
79                         0x03AF, // Address Range Maximum
80                         0x0000, // Address Translation Offset
81                         0x03B0,,,
82                         , TypeStatic)  //0-CF7h
83
84                     WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
85                         0x0000, // Address Space Granularity
86                         0x03E0, // Address Range Minimum
87                         0x0CF7, // Address Range Maximum
88                         0x0000, // Address Translation Offset
89                         0x0918,,,
90                         , TypeStatic)  //0-CF7h
91                 })
92                 \_SB.OSTP ()
93                 CreateDWordField (BUF0, 0x3E, VLEN)
94                 CreateDWordField (BUF0, 0x36, VMAX)
95                 CreateDWordField (BUF0, 0x32, VMIN)
96                 ShiftLeft (VGA1, 0x09, Local0)
97                 Add (VMIN, Local0, VMAX)
98                 Decrement (VMAX)
99                 Store (Local0, VLEN)
100                 Concatenate (\_SB.GMEM (0x00, \_SB.PCI0.SBLK), BUF0, Local1)
101                 Concatenate (\_SB.GIOR (0x00, \_SB.PCI0.SBLK), Local1, Local2)
102                 Concatenate (\_SB.GWBN (0x00, \_SB.PCI0.SBLK), Local2, Local3)
103                 Return (Local3)
104             }
105
106             #include "acpi/pci0_hc.asl"
107
108         }
109         Device (PCI1)
110         {
111             Name (_HID, "PNP0A03")
112             Name (_ADR, 0x00000000)
113             Name (_UID, 0x02)
114             Method (_STA, 0, NotSerialized)
115             {
116                 Return (\_SB.PCI0.CBST)
117             }
118             Name (_BBN, 0x00)
119         }
120
121
122     }
123
124     Scope (_GPE)
125     {
126         Method (_L08, 0, NotSerialized)
127         {
128             Notify (\_SB.PCI0, 0x02) //PME# Wakeup
129         }
130
131         Method (_L0F, 0, NotSerialized)
132         {
133             Notify (\_SB.PCI0.TP2P.USB0, 0x02)  //USB Wakeup
134         }
135
136         Method (_L22, 0, NotSerialized) // GPIO18 (LID) - Pogo 0 Bridge B
137         {
138             Notify (\_SB.PCI0.PG0B, 0x02)
139         }
140
141         Method (_L29, 0, NotSerialized) // GPIO25 (Suspend) - Pogo 0 Bridge A
142         {
143             Notify (\_SB.PCI0.PG0A, 0x02)
144         }
145     }
146
147     Method (_PTS, 1, NotSerialized)
148     {
149         Or (Arg0, 0xF0, Local0)
150         Store (Local0, DBG1)
151     }
152 /*
153     Method (_WAK, 1, NotSerialized)
154     {
155         Or (Arg0, 0xE0, Local0)
156         Store (Local0, DBG1)
157     }
158 */
159     Name (PICF, 0x00) //Flag Variable for PIC vs. I/O APIC Mode
160     Method (_PIC, 1, NotSerialized) //PIC Flag and Interface Method
161     {
162         Store (Arg0, PICF)
163     }
164
165     OperationRegion (DEBG, SystemIO, 0x80, 0x01)
166     Field (DEBG, ByteAcc, Lock, Preserve)
167     {
168         DBG1,   8
169     }
170
171     OperationRegion (EXTM, SystemMemory, 0x000FF83C, 0x04)
172     Field (EXTM, WordAcc, Lock, Preserve)
173     {
174         AMEM,   32
175     }
176
177     OperationRegion (VGAM, SystemMemory, 0x000C0002, 0x01)
178     Field (VGAM, ByteAcc, Lock, Preserve)
179     {
180         VGA1,   8
181     }
182
183     OperationRegion (GRAM, SystemMemory, 0x0400, 0x0100)
184     Field (GRAM, ByteAcc, Lock, Preserve)
185     {
186         Offset (0x10),
187         FLG0,   8
188     }
189
190     OperationRegion (GSTS, SystemIO, 0xC028, 0x02)
191     Field (GSTS, ByteAcc, NoLock, Preserve)
192     {
193             ,   4,
194         IRQR,   1
195     }
196
197     OperationRegion (Z007, SystemIO, 0x21, 0x01)
198     Field (Z007, ByteAcc, NoLock, Preserve)
199     {
200         Z008,   8
201     }
202
203     OperationRegion (Z009, SystemIO, 0xA1, 0x01)
204     Field (Z009, ByteAcc, NoLock, Preserve)
205     {
206         Z00A,   8
207     }
208
209     #include "northbridge/amd/amdk8/amdk8_util.asl"
210
211 }
212