payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / mainboard / asrock / e350m1 / acpi / sata.asl
blob6d9ff0300586a76857e854fb4df9667bcb4c4729
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /* simple name description */
5 /*
6 Scope (_SB) {
7         Device(PCI0) {
8                 Device(SATA) {
9                         Name(_ADR, 0x00110000)
10                         #include "sata.asl"
11                 }
12         }
16 Name(STTM, Buffer(20) {
17         0x78, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
18         0x78, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
19         0x1f, 0x00, 0x00, 0x00
22 /* Start by clearing the PhyRdyChg bits */
23 Method(_INI) {
24         \_GPE._L1F()
27 Device(PMRY)
29         Name(_ADR, 0)
30         Method(_GTM, 0x0, NotSerialized) {
31                 Return(STTM)
32         }
33         Method(_STM, 0x3, NotSerialized) {}
35         Device(PMST) {
36                 Name(_ADR, 0)
37                 Method(_STA,0) {
38                         if (P0IS > 0) {
39                                 return (0x0F) /* sata is visible */
40                         }
41                         else {
42                                 return  (0x00) /* sata is missing */
43                         }
44                 }
45         }/* end of PMST */
47         Device(PSLA)
48         {
49                 Name(_ADR, 1)
50                 Method(_STA,0) {
51                         if (P1IS > 0) {
52                                 return (0x0F) /* sata is visible */
53                         }
54                         else {
55                                 return (0x00) /* sata is missing */
56                         }
57                 }
58         }       /* end of PSLA */
59 }   /* end of PMRY */
62 Device(SEDY)
64         Name(_ADR, 1)           /* IDE Scondary Channel */
65         Method(_GTM, 0x0, NotSerialized) {
66                 Return(STTM)
67         }
68         Method(_STM, 0x3, NotSerialized) {}
70         Device(SMST)
71         {
72                 Name(_ADR, 0)
73                 Method(_STA,0) {
74                         if (P2IS > 0) {
75                                 return (0x0F) /* sata is visible */
76                         }
77                         else {
78                                 return (0x00) /* sata is missing */
79                         }
80                 }
81         } /* end of SMST */
83         Device(SSLA)
84         {
85                 Name(_ADR, 1)
86                 Method(_STA,0) {
87                         if (P3IS > 0) {
88                                 return (0x0F) /* sata is visible */
89                         }
90                         else {
91                                 return (0x00) /* sata is missing */
92                         }
93                 }
94         } /* end of SSLA */
95 }   /* end of SEDY */
97 /* SATA Hot Plug Support */
98 Scope(\_GPE) {
99         Method(_L1F,0x0,NotSerialized) {
100                 if (\_SB.P0PR) {
101                         if (\_SB.P0IS > 0) {
102                                 sleep(32)
103                         }
104                         Notify(\_SB.PCI0.STCR.PMRY.PMST, 0x01) /* NOTIFY_DEVICE_CHECK */
105                          \_SB.P0PR = 1
106                 }
108                 if (\_SB.P1PR) {
109                         if (\_SB.P1IS > 0) {
110                                 sleep(32)
111                         }
112                         Notify(\_SB.PCI0.STCR.PMRY.PSLA, 0x01) /* NOTIFY_DEVICE_CHECK */
113                         \_SB.P1PR = 1
114                 }
116                 if (\_SB.P2PR) {
117                         if (\_SB.P2IS > 0) {
118                                 sleep(32)
119                         }
120                         Notify(\_SB.PCI0.STCR.SEDY.SMST, 0x01) /* NOTIFY_DEVICE_CHECK */
121                         \_SB.P2PR = 1
122                 }
124                 if (\_SB.P3PR) {
125                         if (\_SB.P3IS > 0) {
126                                 sleep(32)
127                         }
128                         Notify(\_SB.PCI0.STCR.SEDY.SSLA, 0x01) /* NOTIFY_DEVICE_CHECK */
129                         \_SB.P3PR = 1
130                 }
131         }