98_LINK.ASL 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. /**************************************************************************;
  2. ;* *;
  3. ;* *;
  4. ;* Intel Corporation - ACPI Reference Code for the Baytrail *;
  5. ;* Family of Customer Reference Boards. *;
  6. ;* *;
  7. ;* *;
  8. ;* Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved *;
  9. ;
  10. ; SPDX-License-Identifier: BSD-2-Clause-Patent
  11. ;
  12. ;* *;
  13. ;* *;
  14. ;**************************************************************************/
  15. // Use this information when determining the Possible IRQs that can be
  16. // used in a given system.
  17. //
  18. // The following IRQs are always in use by legacy devices:
  19. // 0 = System Timer
  20. // 2 = 8259 PIC
  21. // 8 = RTC
  22. // 9 = SCI Interrupt (It may be used, we choose not to)
  23. // 13 = Co-processor Error
  24. //
  25. // The following may be in use by legacy devices:
  26. // 1 = If using PS/2 Keyboard
  27. // 3 = If COMx Port Enabled and IRQ = 3
  28. // 4 = If COMx Port Enabled and IRQ = 4
  29. // 5 = If LPT Port Enabled and IRQ = 5
  30. // 6 = If FDC Enabled
  31. // 7 = If LPT Port Enabled and IRQ = 7
  32. // 12 = If using PS/2 Mouse
  33. // 14 = Primary IDE (If populated and in Compatibility Mode)
  34. // 15 = Secondary IDE (If populated and in Compatibility Mode)
  35. //
  36. // The following will never be in use by legacy devices:
  37. // 10 = Assign to PARC, PCRC, PERC, PGRC
  38. // 11 = Assign to PBRC, PDRC, PFRC, PHRC
  39. Device(LNKA) // PARC Routing Resource
  40. {
  41. Name(_HID,EISAID("PNP0C0F")) // PCI Interrupt Link Device
  42. Name(_UID,1) // Unique to other Link Devices
  43. // Disable the PCI IRQ.
  44. Method(_DIS,0,Serialized)
  45. {
  46. Or(PARC,0x80,PARC)
  47. }
  48. // Possible IRQ Resource Setting.
  49. Method (_PRS, 0, Serialized)
  50. {
  51. return (PRSA)
  52. }
  53. // Current IRQ Resource Setting.
  54. Method(_CRS,0,Serialized)
  55. {
  56. Name(RTLA,ResourceTemplate()
  57. {
  58. IRQ(Level,ActiveLow,Shared) {}
  59. })
  60. // Point to specific byte.
  61. CreateWordField(RTLA,1,IRQ0)
  62. // Zero out IRQ mask bits 0-15
  63. Store(Zero,IRQ0)
  64. ShiftLeft(1,And(PARC,0x0F),IRQ0)
  65. Return(RTLA)
  66. }
  67. // Set IRQ Resource Setting.
  68. Method(_SRS,1,Serialized)
  69. {
  70. // Point to the specific byte passed in
  71. CreateWordField(Arg0,1,IRQ0)
  72. // Determine the IRQ bit to set and store it
  73. FindSetRightBit(IRQ0,Local0)
  74. Decrement(Local0)
  75. Store(Local0,PARC)
  76. }
  77. // PCI IRQ Status.
  78. Method(_STA,0,Serialized)
  79. {
  80. If(And(PARC,0x80))
  81. {
  82. Return(0x0009)
  83. }
  84. Else
  85. {
  86. Return(0x000B)
  87. }
  88. }
  89. }
  90. Device(LNKB) // PBRC Routing Resource
  91. {
  92. Name(_HID,EISAID("PNP0C0F"))
  93. Name(_UID,2)
  94. // Disable the PCI IRQ.
  95. Method(_DIS,0,Serialized)
  96. {
  97. Or(PBRC,0x80,PBRC)
  98. }
  99. // Possible IRQ Resource Setting.
  100. Method (_PRS, 0, Serialized)
  101. {
  102. return (PRSB)
  103. }
  104. // Current IRQ Resource Setting.
  105. Method(_CRS,0,Serialized)
  106. {
  107. Name(RTLB,ResourceTemplate()
  108. {
  109. IRQ(Level,ActiveLow,Shared) {}
  110. })
  111. // Point to specific byte.
  112. CreateWordField(RTLB,1,IRQ0)
  113. // Zero out IRQ mask bits 0-15
  114. Store(Zero,IRQ0)
  115. ShiftLeft(1,And(PBRC,0x0F),IRQ0)
  116. Return(RTLB)
  117. }
  118. // Set IRQ Resource Setting.
  119. Method(_SRS,1,Serialized)
  120. {
  121. // Point to the specific byte passed in.
  122. CreateWordField(Arg0,1,IRQ0)
  123. // Determine the IRQ bit to set and store it,
  124. FindSetRightBit(IRQ0,Local0)
  125. Decrement(Local0)
  126. Store(Local0,PBRC)
  127. }
  128. // PCI IRQ Status.
  129. Method(_STA,0,Serialized)
  130. {
  131. If(And(PBRC,0x80))
  132. {
  133. Return(0x0009)
  134. }
  135. Else
  136. {
  137. Return(0x000B)
  138. }
  139. }
  140. }
  141. Device(LNKC) // PCRC Routing Resource
  142. {
  143. Name(_HID,EISAID("PNP0C0F"))
  144. Name(_UID,3)
  145. // Disable the PCI IRQ.
  146. Method(_DIS,0,Serialized)
  147. {
  148. Or(PCRC,0x80,PCRC)
  149. }
  150. // Possible IRQ Resource Setting.
  151. Method (_PRS, 0, Serialized)
  152. {
  153. return (PRSC)
  154. }
  155. // Current IRQ Resource Setting.
  156. Method(_CRS,0,Serialized)
  157. {
  158. Name(RTLC,ResourceTemplate()
  159. {
  160. IRQ(Level,ActiveLow,Shared) {}
  161. })
  162. // Point to specific byte.
  163. CreateWordField(RTLC,1,IRQ0)
  164. // Zero out IRQ mask bits 0-15
  165. Store(Zero,IRQ0)
  166. ShiftLeft(1,And(PCRC,0x0F),IRQ0)
  167. Return(RTLC)
  168. }
  169. // Set IRQ Resource Setting.
  170. Method(_SRS,1,Serialized)
  171. {
  172. // Point to the specific byte passed in.
  173. CreateWordField(Arg0,1,IRQ0)
  174. // Determine the IRQ bit to set and store it,
  175. FindSetRightBit(IRQ0,Local0)
  176. Decrement(Local0)
  177. Store(Local0,PCRC)
  178. }
  179. // PCI IRQ Status.
  180. Method(_STA,0,Serialized)
  181. {
  182. If(And(PCRC,0x80))
  183. {
  184. Return(0x0009)
  185. }
  186. Else
  187. {
  188. Return(0x000B)
  189. }
  190. }
  191. }
  192. Device(LNKD) // PDRC Routing Resource
  193. {
  194. Name(_HID,EISAID("PNP0C0F"))
  195. Name(_UID,4)
  196. // Disable the PCI IRQ.
  197. Method(_DIS,0,Serialized)
  198. {
  199. Or(PDRC,0x80,PDRC)
  200. }
  201. // Possible IRQ Resource Setting.
  202. Method (_PRS, 0, Serialized)
  203. {
  204. return (PRSD)
  205. }
  206. // Current IRQ Resource Setting.
  207. Method(_CRS,0,Serialized)
  208. {
  209. Name(RTLD,ResourceTemplate()
  210. {
  211. IRQ(Level,ActiveLow,Shared) {}
  212. })
  213. // Point to specific byte.
  214. CreateWordField(RTLD,1,IRQ0)
  215. // Zero out IRQ mask bits 0-15
  216. Store(Zero,IRQ0)
  217. ShiftLeft(1,And(PDRC,0x0F),IRQ0)
  218. Return(RTLD)
  219. }
  220. // Set IRQ Resource Setting.
  221. Method(_SRS,1,Serialized)
  222. {
  223. // Point to the specific byte passed in.
  224. CreateWordField(Arg0,1,IRQ0)
  225. // Determine the IRQ bit to set and store it,
  226. FindSetRightBit(IRQ0,Local0)
  227. Decrement(Local0)
  228. Store(Local0,PDRC)
  229. }
  230. // PCI IRQ Status.
  231. Method(_STA,0,Serialized)
  232. {
  233. If(And(PDRC,0x80))
  234. {
  235. Return(0x0009)
  236. }
  237. Else
  238. {
  239. Return(0x000B)
  240. }
  241. }
  242. }
  243. Device(LNKE) // PERC Routing Resource
  244. {
  245. Name(_HID,EISAID("PNP0C0F"))
  246. Name(_UID,5)
  247. // Disable the PCI IRQ.
  248. Method(_DIS,0,Serialized)
  249. {
  250. Or(PERC,0x80,PERC)
  251. }
  252. // Possible IRQ Resource Setting.
  253. Method (_PRS, 0, Serialized)
  254. {
  255. return (PRSE)
  256. }
  257. // Current IRQ Resource Setting.
  258. Method(_CRS,0,Serialized)
  259. {
  260. Name(RTLE,ResourceTemplate()
  261. {
  262. IRQ(Level,ActiveLow,Shared) {}
  263. })
  264. // Point to specific byte.
  265. CreateWordField(RTLE,1,IRQ0)
  266. // Zero out IRQ mask bits 0-15
  267. Store(Zero,IRQ0)
  268. ShiftLeft(1,And(PERC,0x0F),IRQ0)
  269. Return(RTLE)
  270. }
  271. // Set IRQ Resource Setting.
  272. Method(_SRS,1,Serialized)
  273. {
  274. // Point to the specific byte passed in
  275. CreateWordField(Arg0,1,IRQ0)
  276. // Determine the IRQ bit to set and store it
  277. FindSetRightBit(IRQ0,Local0)
  278. Decrement(Local0)
  279. Store(Local0,PERC)
  280. }
  281. // PCI IRQ Status.
  282. Method(_STA,0,Serialized)
  283. {
  284. If(And(PERC,0x80))
  285. {
  286. Return(0x0009)
  287. }
  288. Else
  289. {
  290. Return(0x000B)
  291. }
  292. }
  293. }
  294. Device(LNKF) // PFRC Routing Resource
  295. {
  296. Name(_HID,EISAID("PNP0C0F"))
  297. Name(_UID,6)
  298. // Disable the PCI IRQ.
  299. Method(_DIS,0,Serialized)
  300. {
  301. Or(PFRC,0x80,PFRC)
  302. }
  303. // Possible IRQ Resource Setting.
  304. Method (_PRS, 0, Serialized)
  305. {
  306. return (PRSF)
  307. }
  308. // Current IRQ Resource Setting.
  309. Method(_CRS,0,Serialized)
  310. {
  311. Name(RTLF,ResourceTemplate()
  312. {
  313. IRQ(Level,ActiveLow,Shared) {}
  314. })
  315. // Point to specific byte.
  316. CreateWordField(RTLF,1,IRQ0)
  317. // Zero out IRQ mask bits 0-15
  318. Store(Zero,IRQ0)
  319. ShiftLeft(1,And(PFRC,0x0F),IRQ0)
  320. Return(RTLF)
  321. }
  322. // Set IRQ Resource Setting.
  323. Method(_SRS,1,Serialized)
  324. {
  325. // Point to the specific byte passed in.
  326. CreateWordField(Arg0,1,IRQ0)
  327. // Determine the IRQ bit to set and store it,
  328. FindSetRightBit(IRQ0,Local0)
  329. Decrement(Local0)
  330. Store(Local0,PFRC)
  331. }
  332. // PCI IRQ Status.
  333. Method(_STA,0,Serialized)
  334. {
  335. If(And(PFRC,0x80))
  336. {
  337. Return(0x0009)
  338. }
  339. Else
  340. {
  341. Return(0x000B)
  342. }
  343. }
  344. }
  345. Device(LNKG) // PGRC Routing Resource
  346. {
  347. Name(_HID,EISAID("PNP0C0F"))
  348. Name(_UID,7)
  349. // Disable the PCI IRQ.
  350. Method(_DIS,0,Serialized)
  351. {
  352. Or(PGRC,0x80,PGRC)
  353. }
  354. // Possible IRQ Resource Setting.
  355. Method (_PRS, 0, Serialized)
  356. {
  357. return (PRSG)
  358. }
  359. // Current IRQ Resource Setting.
  360. Method(_CRS,0,Serialized)
  361. {
  362. Name(RTLG,ResourceTemplate()
  363. {
  364. IRQ(Level,ActiveLow,Shared) {}
  365. })
  366. // Point to specific byte.
  367. CreateWordField(RTLG,1,IRQ0)
  368. // Zero out IRQ mask bits 0-15
  369. Store(Zero,IRQ0)
  370. ShiftLeft(1,And(PGRC,0x0F),IRQ0)
  371. Return(RTLG)
  372. }
  373. // Set IRQ Resource Setting.
  374. Method(_SRS,1,Serialized)
  375. {
  376. // Point to the specific byte passed in.
  377. CreateWordField(Arg0,1,IRQ0)
  378. // Determine the IRQ bit to set and store it,
  379. FindSetRightBit(IRQ0,Local0)
  380. Decrement(Local0)
  381. Store(Local0,PGRC)
  382. }
  383. // PCI IRQ Status.
  384. Method(_STA,0,Serialized)
  385. {
  386. If(And(PGRC,0x80))
  387. {
  388. Return(0x0009)
  389. }
  390. Else
  391. {
  392. Return(0x000B)
  393. }
  394. }
  395. }
  396. Device(LNKH) // PHRC Routing Resource
  397. {
  398. Name(_HID,EISAID("PNP0C0F"))
  399. Name(_UID,8)
  400. // Disable the PCI IRQ.
  401. Method(_DIS,0,Serialized)
  402. {
  403. Or(PHRC,0x80,PHRC)
  404. }
  405. // Possible IRQ Resource Setting.
  406. Method (_PRS, 0, Serialized)
  407. {
  408. return (PRSH)
  409. }
  410. // Current IRQ Resource Setting.
  411. Method(_CRS,0,Serialized)
  412. {
  413. Name(RTLH,ResourceTemplate()
  414. {
  415. IRQ(Level,ActiveLow,Shared) {}
  416. })
  417. // Point to specific byte.
  418. CreateWordField(RTLH,1,IRQ0)
  419. // Zero out IRQ mask bits 0-15
  420. Store(Zero,IRQ0)
  421. ShiftLeft(1,And(PHRC,0x0F),IRQ0)
  422. Return(RTLH)
  423. }
  424. // Set IRQ Resource Setting.
  425. Method(_SRS,1,Serialized)
  426. {
  427. // Point to the specific byte passed in.
  428. CreateWordField(Arg0,1,IRQ0)
  429. // Determine the IRQ bit to set and store it,
  430. FindSetRightBit(IRQ0,Local0)
  431. Decrement(Local0)
  432. Store(Local0,PHRC)
  433. }
  434. // PCI IRQ Status.
  435. Method(_STA,0,Serialized)
  436. {
  437. If(And(PHRC,0x80))
  438. {
  439. Return(0x0009)
  440. }
  441. Else
  442. {
  443. Return(0x000B)
  444. }
  445. }
  446. }