1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  *    driver for Microchip PQI-based storage controllers
4  *    Copyright (c) 2019-2023 Microchip Technology Inc. and its subsidiaries
5  *    Copyright (c) 2016-2018 Microsemi Corporation
6  *    Copyright (c) 2016 PMC-Sierra, Inc.
7  *
8  *    Questions/Comments/Bugfixes to storagedev@microchip.com
9  *
10  */
11 
12 #if !defined(_SMARTPQI_SIS_H)
13 #define _SMARTPQI_SIS_H
14 
15 void sis_verify_structures(void);
16 int sis_wait_for_ctrl_ready(struct pqi_ctrl_info *ctrl_info);
17 int sis_wait_for_ctrl_ready_resume(struct pqi_ctrl_info *ctrl_info);
18 bool sis_is_firmware_running(struct pqi_ctrl_info *ctrl_info);
19 bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info);
20 int sis_get_ctrl_properties(struct pqi_ctrl_info *ctrl_info);
21 int sis_get_pqi_capabilities(struct pqi_ctrl_info *ctrl_info);
22 int sis_init_base_struct_addr(struct pqi_ctrl_info *ctrl_info);
23 void sis_enable_msix(struct pqi_ctrl_info *ctrl_info);
24 void sis_enable_intx(struct pqi_ctrl_info *ctrl_info);
25 void sis_shutdown_ctrl(struct pqi_ctrl_info *ctrl_info,
26 	enum pqi_ctrl_shutdown_reason ctrl_shutdown_reason);
27 int sis_pqi_reset_quiesce(struct pqi_ctrl_info *ctrl_info);
28 int sis_reenable_sis_mode(struct pqi_ctrl_info *ctrl_info);
29 void sis_write_driver_scratch(struct pqi_ctrl_info *ctrl_info, u32 value);
30 u32 sis_read_driver_scratch(struct pqi_ctrl_info *ctrl_info);
31 void sis_soft_reset(struct pqi_ctrl_info *ctrl_info);
32 u32 sis_get_product_id(struct pqi_ctrl_info *ctrl_info);
33 int sis_wait_for_fw_triage_completion(struct pqi_ctrl_info *ctrl_info);
34 bool sis_is_ctrl_logging_supported(struct pqi_ctrl_info *ctrl_info);
35 void sis_notify_kdump(struct pqi_ctrl_info *ctrl_info);
36 int sis_wait_for_ctrl_logging_completion(struct pqi_ctrl_info *ctrl_info);
37 
38 extern unsigned int sis_ctrl_ready_timeout_secs;
39 
40 #endif	/* _SMARTPQI_SIS_H */
41