Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 /*
0003  * Copyright © 2013-2021 Intel Corporation
0004  */
0005 
0006 #ifndef _INTEL_PCODE_H_
0007 #define _INTEL_PCODE_H_
0008 
0009 #include <linux/types.h>
0010 
0011 struct intel_uncore;
0012 
0013 int snb_pcode_read(struct intel_uncore *uncore, u32 mbox, u32 *val, u32 *val1);
0014 int snb_pcode_write_timeout(struct intel_uncore *uncore, u32 mbox, u32 val,
0015                 int fast_timeout_us, int slow_timeout_ms);
0016 #define snb_pcode_write(uncore, mbox, val) \
0017     snb_pcode_write_timeout(uncore, mbox, val, 500, 0)
0018 
0019 int skl_pcode_request(struct intel_uncore *uncore, u32 mbox, u32 request,
0020               u32 reply_mask, u32 reply, int timeout_base_ms);
0021 
0022 int intel_pcode_init(struct intel_uncore *uncore);
0023 
0024 /*
0025  * Helpers for dGfx PCODE mailbox command formatting
0026  */
0027 int snb_pcode_read_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 *val);
0028 int snb_pcode_write_p(struct intel_uncore *uncore, u32 mbcmd, u32 p1, u32 p2, u32 val);
0029 
0030 #endif /* _INTEL_PCODE_H */