1293f2563SHawking Zhang /*
2293f2563SHawking Zhang  * Copyright 2020 Advanced Micro Devices, Inc.
3293f2563SHawking Zhang  *
4293f2563SHawking Zhang  * Permission is hereby granted, free of charge, to any person obtaining a
5293f2563SHawking Zhang  * copy of this software and associated documentation files (the "Software"),
6293f2563SHawking Zhang  * to deal in the Software without restriction, including without limitation
7293f2563SHawking Zhang  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8293f2563SHawking Zhang  * and/or sell copies of the Software, and to permit persons to whom the
9293f2563SHawking Zhang  * Software is furnished to do so, subject to the following conditions:
10293f2563SHawking Zhang  *
11293f2563SHawking Zhang  * The above copyright notice and this permission notice shall be included in
12293f2563SHawking Zhang  * all copies or substantial portions of the Software.
13293f2563SHawking Zhang  *
14293f2563SHawking Zhang  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15293f2563SHawking Zhang  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16293f2563SHawking Zhang  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17293f2563SHawking Zhang  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18293f2563SHawking Zhang  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19293f2563SHawking Zhang  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20293f2563SHawking Zhang  * OTHER DEALINGS IN THE SOFTWARE.
21293f2563SHawking Zhang  *
22293f2563SHawking Zhang  */
23293f2563SHawking Zhang #ifndef __AMDGPU_SMUIO_H__
24293f2563SHawking Zhang #define __AMDGPU_SMUIO_H__
25293f2563SHawking Zhang 
26293f2563SHawking Zhang struct amdgpu_smuio_funcs {
27293f2563SHawking Zhang 	u32 (*get_rom_index_offset)(struct amdgpu_device *adev);
28293f2563SHawking Zhang 	u32 (*get_rom_data_offset)(struct amdgpu_device *adev);
29293f2563SHawking Zhang 	void (*update_rom_clock_gating)(struct amdgpu_device *adev, bool enable);
3025faeddcSEvan Quan 	void (*get_clock_gating_state)(struct amdgpu_device *adev, u64 *flags);
3126f70889SHawking Zhang 	u32 (*get_die_id)(struct amdgpu_device *adev);
32dfdd4b8aSHawking Zhang 	u32 (*get_socket_id)(struct amdgpu_device *adev);
33*3d2ea552SRajneesh Bhardwaj 	enum amdgpu_pkg_type (*get_pkg_type)(struct amdgpu_device *adev);
3426f70889SHawking Zhang 	bool (*is_host_gpu_xgmi_supported)(struct amdgpu_device *adev);
35293f2563SHawking Zhang };
36293f2563SHawking Zhang 
37293f2563SHawking Zhang struct amdgpu_smuio {
38293f2563SHawking Zhang 	const struct amdgpu_smuio_funcs		*funcs;
39293f2563SHawking Zhang };
40293f2563SHawking Zhang 
41293f2563SHawking Zhang #endif /* __AMDGPU_SMUIO_H__ */
42