blob: eea3dd9d4ac9901ff2f707d0bf6b6e3ae09fe5ba [file] [log] [blame]
Kevin Barnett6c223762016-06-27 16:41:00 -05001/*
2 * driver for Microsemi PQI-based storage controllers
Don Brace2f4c4b92019-03-14 16:58:02 -05003 * Copyright (c) 2019 Microchip Technology Inc. and its subsidiaries
4 * Copyright (c) 2016-2018 Microsemi Corporation
Kevin Barnett6c223762016-06-27 16:41:00 -05005 * Copyright (c) 2016 PMC-Sierra, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more details.
15 *
Don Brace2f4c4b92019-03-14 16:58:02 -050016 * Questions/Comments/Bugfixes to storagedev@microchip.com
Kevin Barnett6c223762016-06-27 16:41:00 -050017 *
18 */
19
20#if !defined(_SMARTPQI_SIS_H)
21#define _SMARTPQI_SIS_H
22
23int sis_wait_for_ctrl_ready(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett061ef062017-05-03 18:53:05 -050024int sis_wait_for_ctrl_ready_resume(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050025bool sis_is_firmware_running(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett162d7752017-05-03 18:52:46 -050026bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050027int sis_get_ctrl_properties(struct pqi_ctrl_info *ctrl_info);
28int sis_get_pqi_capabilities(struct pqi_ctrl_info *ctrl_info);
29int sis_init_base_struct_addr(struct pqi_ctrl_info *ctrl_info);
30void sis_enable_msix(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett061ef062017-05-03 18:53:05 -050031void sis_enable_intx(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett5b0fba02017-05-03 18:52:40 -050032void sis_shutdown_ctrl(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett336b6812017-08-10 13:46:39 -050033int sis_pqi_reset_quiesce(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050034int sis_reenable_sis_mode(struct pqi_ctrl_info *ctrl_info);
Kevin Barnettff6abb72016-08-31 14:54:41 -050035void sis_write_driver_scratch(struct pqi_ctrl_info *ctrl_info, u32 value);
36u32 sis_read_driver_scratch(struct pqi_ctrl_info *ctrl_info);
Mahesh Rajashekhara4fd22c12018-12-18 17:39:07 -060037void sis_soft_reset(struct pqi_ctrl_info *ctrl_info);
Kevin Barnett6c223762016-06-27 16:41:00 -050038
39#endif /* _SMARTPQI_SIS_H */