xref: /linux/drivers/gpu/drm/i915/intel_sbi.h (revision 2c1ed907520c50326b8f604907a8478b27881a2e)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2013-2021 Intel Corporation
4  */
5 
6 #ifndef _INTEL_SBI_H_
7 #define _INTEL_SBI_H_
8 
9 #include <linux/types.h>
10 
11 struct drm_i915_private;
12 
13 enum intel_sbi_destination {
14 	SBI_ICLK,
15 	SBI_MPHY,
16 };
17 
18 void intel_sbi_init(struct drm_i915_private *i915);
19 void intel_sbi_fini(struct drm_i915_private *i915);
20 void intel_sbi_lock(struct drm_i915_private *i915);
21 void intel_sbi_unlock(struct drm_i915_private *i915);
22 u32 intel_sbi_read(struct drm_i915_private *i915, u16 reg,
23 		   enum intel_sbi_destination destination);
24 void intel_sbi_write(struct drm_i915_private *i915, u16 reg, u32 value,
25 		     enum intel_sbi_destination destination);
26 
27 #endif /* _INTEL_SBI_H_ */
28