intel_pcode.h 937 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: MIT */
  2. /*
  3. * Copyright © 2013-2021 Intel Corporation
  4. */
  5. #ifndef _INTEL_PCODE_H_
  6. #define _INTEL_PCODE_H_
  7. #include <linux/types.h>
  8. struct intel_uncore;
  9. int snb_pcode_read(struct intel_uncore *uncore, u32 mbox, u32 *val, u32 *val1);
  10. int snb_pcode_write_timeout(struct intel_uncore *uncore, u32 mbox, u32 val,
  11. int fast_timeout_us, int slow_timeout_ms);
  12. #define snb_pcode_write(uncore, mbox, val) \
  13. snb_pcode_write_timeout(uncore, mbox, val, 500, 0)
  14. int skl_pcode_request(struct intel_uncore *uncore, u32 mbox, u32 request,
  15. u32 reply_mask, u32 reply, int timeout_base_ms);
  16. int intel_pcode_init(struct intel_uncore *uncore);
  17. /*
  18. * Helpers for dGfx PCODE mailbox command formatting
  19. */
  20. int snb_pcode_read_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 *val);
  21. int snb_pcode_write_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 val);
  22. #endif /* _INTEL_PCODE_H */