UsbSbd.asl 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /************************************************************************************;
  2. ;* *;
  3. ;* *;
  4. ;* Intel Corporation - ACPI Reference Code for the Baytrail *;
  5. ;* Family of Customer Reference Boards. *;
  6. ;* *;
  7. ;* MPG-MSAE *;
  8. ;* *;
  9. ;* Copyright (c) 1999 - 2014, Intel Corporation. *;
  10. ;* *;
  11. ;* ThSPDX-License-Identifier: BSD-2-Clause-Patent
  12. ;* *;
  13. ;* *;
  14. ;* This program has been developed by Intel Corporation. *;
  15. ;* Licensee has Intel's permission to incorporate this source code *;
  16. ;* into their product, royalty free. This source code may NOT be *;
  17. ;* redistributed to anyone without Intel's written permission. *;
  18. ;* *;
  19. ;* Intel specifically disclaims all warranties, express or *;
  20. ;* implied, and all liability, including consequential and other *;
  21. ;* indirect damages, for the use of this code, including liability *;
  22. ;* for infringement of any proprietary rights, and including the *;
  23. ;* warranties of merchantability and fitness for a particular *;
  24. ;* purpose. Intel does not assume any responsibility for any *;
  25. ;* errors which may appear in this code nor any responsibility to *;
  26. ;* update it. *;
  27. ;* *;
  28. ;* Version: See README.TXT *;
  29. ;* *;
  30. ;************************************************************************************/
  31. //
  32. // _DSM : Device Specific Method supporting USB Sideband Deferring function
  33. //
  34. // Arg0: UUID Unique function identifier
  35. // Arg1: Integer Revision Level
  36. // Arg2: Integer Function Index
  37. // Arg3: Package Parameters
  38. //
  39. Method (_DSM, 4, Serialized, 0, UnknownObj, {BuffObj, IntObj, IntObj, PkgObj})
  40. {
  41. If (LEqual(Arg0, ToUUID ("A5FC708F-8775-4BA6-BD0C-BA90A1EC72F8")))
  42. {
  43. //
  44. // Switch by function index
  45. //
  46. Switch (ToInteger(Arg2))
  47. {
  48. //
  49. // Standard query - A bitmask of functions supported
  50. // Supports function 0-2
  51. //
  52. Case (0)
  53. {
  54. if (LEqual(Arg1, 1)) // test Arg1 for the revision
  55. {
  56. Return (Buffer () {0x07})
  57. }
  58. else
  59. {
  60. Return (Buffer () {0})
  61. }
  62. }
  63. //
  64. // USB Sideband Deferring Support
  65. // 0: USB Sideband Deferring not supported on this device
  66. // 1: USB Sideband Deferring supported
  67. //
  68. Case (1)
  69. {
  70. if (LEqual(SDGV,0xFF)) // check for valid GPE vector
  71. {
  72. Return (0)
  73. }
  74. else
  75. {
  76. Return (1)
  77. }
  78. }
  79. //
  80. // GPE Vector
  81. // Return the bit offset within the GPE block of the GPIO (HOST_ALERT) driven by this device
  82. //
  83. Case (2)
  84. {
  85. Return (SDGV)
  86. }
  87. }
  88. }
  89. Return (0)
  90. }