PchRegsHda.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. @file
  5. PchRegsHda.h
  6. @brief
  7. Register names for PCH High Definition Audio device.
  8. Conventions:
  9. - Prefixes:
  10. Definitions beginning with "R_" are registers
  11. Definitions beginning with "B_" are bits within registers
  12. Definitions beginning with "V_" are meaningful values of bits within the registers
  13. Definitions beginning with "S_" are register sizes
  14. Definitions beginning with "N_" are the bit position
  15. - In general, PCH registers are denoted by "_PCH_" in register names
  16. - Registers / bits that are different between PCH generations are denoted by
  17. "_PCH_<generation_name>_" in register/bit names. e.g., "_PCH_VLV_"
  18. - Registers / bits that are different between SKUs are denoted by "_<SKU_name>"
  19. at the end of the register/bit names
  20. - Registers / bits of new devices introduced in a PCH generation will be just named
  21. as "_PCH_" without <generation_name> inserted.
  22. **/
  23. #ifndef _PCH_REGS_HDA_H_
  24. #define _PCH_REGS_HDA_H_
  25. ///
  26. /// Azalia Controller Registers (D27:F0)
  27. ///
  28. #define PCI_DEVICE_NUMBER_PCH_AZALIA 27
  29. #define PCI_FUNCTION_NUMBER_PCH_AZALIA 0
  30. #define R_PCH_HDA_PCS 0x54 // Power Management Control and Status
  31. #define B_PCH_HDA_PCS_DATA 0xFF000000 // Data, does not apply
  32. #define B_PCH_HDA_PCS_CCE BIT23 // Bus Power Control Enable, does not apply
  33. #define B_PCH_HDA_PCS_PMES BIT15 // PME Status
  34. #define B_PCH_HDA_PCS_PMEE BIT8 // PME Enable
  35. #define B_PCH_HDA_PCS_PS (BIT1 | BIT0) // Power State - D0/D3 Hot
  36. #define V_PCH_HDA_PCS_PS0 0x00
  37. #define V_PCH_HDA_PCS_PS3 0x03
  38. #endif