blob: 12cd2ab1aeadd258382e5267effd4443b09d15f3 [file] [log] [blame]
Don Brace2cc37b12019-03-14 16:58:09 -05001/* SPDX-License-Identifier: GPL-2.0 */
Kevin Barnett6c223762016-06-27 16:41:00 -05002/*
3 * driver for Microsemi PQI-based storage controllers
Don Brace2a712682020-08-28 16:09:22 -05004 * Copyright (c) 2019-2020 Microchip Technology Inc. and its subsidiaries
Don Brace2f4c4b92019-03-14 16:58:02 -05005 * Copyright (c) 2016-2018 Microsemi Corporation
Kevin Barnett6c223762016-06-27 16:41:00 -05006 * Copyright (c) 2016 PMC-Sierra, Inc.
7 *
Don Brace2f4c4b92019-03-14 16:58:02 -05008 * Questions/Comments/Bugfixes to storagedev@microchip.com
Kevin Barnett6c223762016-06-27 16:41:00 -05009 *
10 */
11
12#if !defined(_SMARTPQI_SIS_H)
13#define _SMARTPQI_SIS_H
14
15int sis_wait_for_ctrl_ready(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett061ef062017-05-03 18:53:05 -050016int sis_wait_for_ctrl_ready_resume(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050017bool sis_is_firmware_running(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett162d7752017-05-03 18:52:46 -050018bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050019int sis_get_ctrl_properties(struct pqi_ctrl_info *ctrl_info);
20int sis_get_pqi_capabilities(struct pqi_ctrl_info *ctrl_info);
21int sis_init_base_struct_addr(struct pqi_ctrl_info *ctrl_info);
22void sis_enable_msix(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett061ef062017-05-03 18:53:05 -050023void sis_enable_intx(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett5b0fba02017-05-03 18:52:40 -050024void sis_shutdown_ctrl(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett336b6812017-08-10 13:46:39 -050025int sis_pqi_reset_quiesce(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050026int sis_reenable_sis_mode(struct pqi_ctrl_info *ctrl_info);
Kevin Barnettff6abb72016-08-31 14:54:41 -050027void sis_write_driver_scratch(struct pqi_ctrl_info *ctrl_info, u32 value);
28u32 sis_read_driver_scratch(struct pqi_ctrl_info *ctrl_info);
Mahesh Rajashekhara4fd22c12018-12-18 17:39:07 -060029void sis_soft_reset(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett2708a252021-03-11 14:15:09 -060030u32 sis_get_product_id(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050031
32#endif /* _SMARTPQI_SIS_H */