blob: 4c393cd8ee8127474251c215acfa8a6fe3fe9aa1 [file] [log] [blame]
John Garrye8899fa2015-11-18 00:50:30 +08001/*
2 * Copyright (c) 2015 Linaro Ltd.
3 * Copyright (c) 2015 Hisilicon Limited.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 */
11
12#ifndef _HISI_SAS_H_
13#define _HISI_SAS_H_
14
John Garry4d558c72016-02-04 02:26:08 +080015#include <linux/acpi.h>
John Garry3bc45af2016-10-04 19:11:11 +080016#include <linux/clk.h>
John Garrye8899fa2015-11-18 00:50:30 +080017#include <linux/dmapool.h>
Xiang Chena25d0d32017-08-11 00:09:40 +080018#include <linux/iopoll.h>
John Garrye8899fa2015-11-18 00:50:30 +080019#include <linux/mfd/syscon.h>
20#include <linux/module.h>
21#include <linux/of_address.h>
John Garry11b75242017-06-14 23:33:17 +080022#include <linux/pci.h>
John Garrye8899fa2015-11-18 00:50:30 +080023#include <linux/platform_device.h>
John Garry4d558c72016-02-04 02:26:08 +080024#include <linux/property.h>
John Garrye8899fa2015-11-18 00:50:30 +080025#include <linux/regmap.h>
John Garry6f2ff1a2016-01-26 02:47:20 +080026#include <scsi/sas_ata.h>
John Garrye8899fa2015-11-18 00:50:30 +080027#include <scsi/libsas.h>
28
John Garry6328d902016-08-24 19:05:54 +080029#define DRV_VERSION "v1.6"
John Garrye8899fa2015-11-18 00:50:30 +080030
John Garry7eb78692015-11-18 00:50:31 +080031#define HISI_SAS_MAX_PHYS 9
John Garry6be6de12015-11-18 00:50:34 +080032#define HISI_SAS_MAX_QUEUES 32
33#define HISI_SAS_QUEUE_SLOTS 512
John Garry5560e9f2016-01-26 02:47:04 +080034#define HISI_SAS_MAX_ITCT_ENTRIES 2048
John Garry7eb78692015-11-18 00:50:31 +080035#define HISI_SAS_MAX_DEVICES HISI_SAS_MAX_ITCT_ENTRIES
Xiang Chen06ec0fb2017-03-23 01:25:18 +080036#define HISI_SAS_RESET_BIT 0
Xiaofei Tan917d3bd2017-08-11 00:09:26 +080037#define HISI_SAS_REJECT_CMD_BIT 1
John Garry7eb78692015-11-18 00:50:31 +080038
Xiaofei Tanf557e322017-06-29 21:02:14 +080039#define HISI_SAS_STATUS_BUF_SZ (sizeof(struct hisi_sas_status_buffer))
40#define HISI_SAS_COMMAND_TABLE_SZ (sizeof(union hisi_sas_command_table))
41
42#define hisi_sas_status_buf_addr(buf) \
43 (buf + offsetof(struct hisi_sas_slot_buf_table, status_buffer))
44#define hisi_sas_status_buf_addr_mem(slot) hisi_sas_status_buf_addr(slot->buf)
45#define hisi_sas_status_buf_addr_dma(slot) \
46 hisi_sas_status_buf_addr(slot->buf_dma)
47
48#define hisi_sas_cmd_hdr_addr(buf) \
49 (buf + offsetof(struct hisi_sas_slot_buf_table, command_header))
50#define hisi_sas_cmd_hdr_addr_mem(slot) hisi_sas_cmd_hdr_addr(slot->buf)
51#define hisi_sas_cmd_hdr_addr_dma(slot) hisi_sas_cmd_hdr_addr(slot->buf_dma)
52
53#define hisi_sas_sge_addr(buf) \
54 (buf + offsetof(struct hisi_sas_slot_buf_table, sge_page))
55#define hisi_sas_sge_addr_mem(slot) hisi_sas_sge_addr(slot->buf)
56#define hisi_sas_sge_addr_dma(slot) hisi_sas_sge_addr(slot->buf_dma)
John Garry6be6de12015-11-18 00:50:34 +080057
John Garry42e7a692015-11-18 00:50:49 +080058#define HISI_SAS_MAX_SSP_RESP_SZ (sizeof(struct ssp_frame_hdr) + 1024)
John Garry66ee9992015-11-18 00:50:54 +080059#define HISI_SAS_MAX_SMP_RESP_SZ 1028
John Garry6f2ff1a2016-01-26 02:47:20 +080060#define HISI_SAS_MAX_STP_RESP_SZ 28
John Garry42e7a692015-11-18 00:50:49 +080061
John Garry98bf39f2016-01-26 02:47:02 +080062#define DEV_IS_EXPANDER(type) \
63 ((type == SAS_EDGE_EXPANDER_DEVICE) || \
64 (type == SAS_FANOUT_EXPANDER_DEVICE))
65
Xiang Chen6c7bb8a2017-06-14 23:33:14 +080066#define HISI_SAS_SATA_PROTOCOL_NONDATA 0x1
67#define HISI_SAS_SATA_PROTOCOL_PIO 0x2
68#define HISI_SAS_SATA_PROTOCOL_DMA 0x4
69#define HISI_SAS_SATA_PROTOCOL_FPDMA 0x8
70#define HISI_SAS_SATA_PROTOCOL_ATAPI 0x10
71
John Garryabda97c2015-11-18 00:50:51 +080072struct hisi_hba;
John Garryaf740db2015-11-18 00:50:41 +080073
John Garry07d78592015-11-18 00:50:47 +080074enum {
75 PORT_TYPE_SAS = (1U << 1),
76 PORT_TYPE_SATA = (1U << 0),
77};
78
John Garryaf740db2015-11-18 00:50:41 +080079enum dev_status {
80 HISI_SAS_DEV_NORMAL,
81 HISI_SAS_DEV_EH,
82};
John Garryabda97c2015-11-18 00:50:51 +080083
John Garry441c2742016-08-24 19:05:47 +080084enum {
85 HISI_SAS_INT_ABT_CMD = 0,
86 HISI_SAS_INT_ABT_DEV = 1,
87};
88
John Garryabda97c2015-11-18 00:50:51 +080089enum hisi_sas_dev_type {
90 HISI_SAS_DEV_TYPE_STP = 0,
91 HISI_SAS_DEV_TYPE_SSP,
92 HISI_SAS_DEV_TYPE_SATA,
93};
94
John Garry2b383352017-08-11 00:09:30 +080095struct hisi_sas_hw_error {
96 u32 irq_msk;
97 u32 msk;
98 int shift;
99 const char *msg;
100 int reg;
101};
102
John Garry7eb78692015-11-18 00:50:31 +0800103struct hisi_sas_phy {
John Garry976867e2015-11-18 00:50:42 +0800104 struct hisi_hba *hisi_hba;
105 struct hisi_sas_port *port;
John Garry7eb78692015-11-18 00:50:31 +0800106 struct asd_sas_phy sas_phy;
John Garry976867e2015-11-18 00:50:42 +0800107 struct sas_identify identify;
108 struct timer_list timer;
John Garry66139922015-11-18 00:50:48 +0800109 struct work_struct phyup_ws;
John Garry976867e2015-11-18 00:50:42 +0800110 u64 port_id; /* from hw */
John Garry5d742422015-11-18 00:50:38 +0800111 u64 dev_sas_addr;
John Garry976867e2015-11-18 00:50:42 +0800112 u64 frame_rcvd_size;
113 u8 frame_rcvd[32];
114 u8 phy_attached;
115 u8 reserved[3];
John Garryd0ef10c2017-06-26 18:27:28 +0800116 u32 phy_type;
John Garry976867e2015-11-18 00:50:42 +0800117 enum sas_linkrate minimum_linkrate;
118 enum sas_linkrate maximum_linkrate;
John Garry7eb78692015-11-18 00:50:31 +0800119};
120
121struct hisi_sas_port {
122 struct asd_sas_port sas_port;
John Garry976867e2015-11-18 00:50:42 +0800123 u8 port_attached;
124 u8 id; /* from hw */
John Garry7eb78692015-11-18 00:50:31 +0800125};
126
John Garry9101a072015-11-18 00:50:37 +0800127struct hisi_sas_cq {
128 struct hisi_hba *hisi_hba;
John Garryd177c402017-01-03 20:24:48 +0800129 struct tasklet_struct tasklet;
John Garrye6c346f2016-09-06 23:36:11 +0800130 int rd_point;
John Garry9101a072015-11-18 00:50:37 +0800131 int id;
132};
133
John Garry4fde02a2016-09-06 23:36:12 +0800134struct hisi_sas_dq {
135 struct hisi_hba *hisi_hba;
Xiang Chenb1a49412017-06-14 23:33:13 +0800136 struct hisi_sas_slot *slot_prep;
137 spinlock_t lock;
John Garry4fde02a2016-09-06 23:36:12 +0800138 int wr_point;
139 int id;
140};
141
John Garryaf740db2015-11-18 00:50:41 +0800142struct hisi_sas_device {
John Garryabda97c2015-11-18 00:50:51 +0800143 struct hisi_hba *hisi_hba;
144 struct domain_device *sas_device;
Xiang Chen640acc92017-08-11 00:09:33 +0800145 struct completion *completion;
Xiang Chenb1a49412017-06-14 23:33:13 +0800146 struct hisi_sas_dq *dq;
John Garry405314d2017-03-23 01:25:21 +0800147 struct list_head list;
John Garryad604832017-06-14 23:33:12 +0800148 u64 attached_phy;
149 atomic64_t running_req;
150 enum sas_device_type dev_type;
151 int device_id;
Xiaofei Tan32ccba52017-04-10 21:21:57 +0800152 int sata_idx;
John Garryad604832017-06-14 23:33:12 +0800153 u8 dev_status;
John Garryaf740db2015-11-18 00:50:41 +0800154};
155
John Garry6be6de12015-11-18 00:50:34 +0800156struct hisi_sas_slot {
John Garry42e7a692015-11-18 00:50:49 +0800157 struct list_head entry;
158 struct sas_task *task;
159 struct hisi_sas_port *port;
160 u64 n_elem;
161 int dlvry_queue;
162 int dlvry_queue_slot;
John Garry27a3f222015-11-18 00:50:50 +0800163 int cmplt_queue;
164 int cmplt_queue_slot;
John Garry42e7a692015-11-18 00:50:49 +0800165 int idx;
John Garrycac9b2a2016-02-25 17:42:11 +0800166 int abort;
Xiaofei Tanf557e322017-06-29 21:02:14 +0800167 void *buf;
168 dma_addr_t buf_dma;
John Garry42e7a692015-11-18 00:50:49 +0800169 void *cmd_hdr;
170 dma_addr_t cmd_hdr_dma;
John Garrycac9b2a2016-02-25 17:42:11 +0800171 struct work_struct abort_slot;
John Garry0844a3f2017-04-10 21:21:59 +0800172 struct timer_list internal_abort_timer;
John Garry42e7a692015-11-18 00:50:49 +0800173};
174
175struct hisi_sas_tmf_task {
176 u8 tmf;
177 u16 tag_of_task_to_be_managed;
John Garry6be6de12015-11-18 00:50:34 +0800178};
179
John Garry7eb78692015-11-18 00:50:31 +0800180struct hisi_sas_hw {
John Garry8ff1d572015-11-18 00:50:46 +0800181 int (*hw_init)(struct hisi_hba *hisi_hba);
John Garryabda97c2015-11-18 00:50:51 +0800182 void (*setup_itct)(struct hisi_hba *hisi_hba,
183 struct hisi_sas_device *device);
John Garry685b6d62016-04-15 21:36:36 +0800184 int (*slot_index_alloc)(struct hisi_hba *hisi_hba, int *slot_idx,
185 struct domain_device *device);
186 struct hisi_sas_device *(*alloc_dev)(struct domain_device *device);
John Garry66139922015-11-18 00:50:48 +0800187 void (*sl_notify)(struct hisi_hba *hisi_hba, int phy_no);
Xiang Chenb1a49412017-06-14 23:33:13 +0800188 int (*get_free_slot)(struct hisi_hba *hisi_hba, struct hisi_sas_dq *dq);
189 void (*start_delivery)(struct hisi_sas_dq *dq);
John Garry42e7a692015-11-18 00:50:49 +0800190 int (*prep_ssp)(struct hisi_hba *hisi_hba,
191 struct hisi_sas_slot *slot, int is_tmf,
192 struct hisi_sas_tmf_task *tmf);
John Garry66ee9992015-11-18 00:50:54 +0800193 int (*prep_smp)(struct hisi_hba *hisi_hba,
194 struct hisi_sas_slot *slot);
John Garry6f2ff1a2016-01-26 02:47:20 +0800195 int (*prep_stp)(struct hisi_hba *hisi_hba,
196 struct hisi_sas_slot *slot);
John Garry441c2742016-08-24 19:05:47 +0800197 int (*prep_abort)(struct hisi_hba *hisi_hba,
198 struct hisi_sas_slot *slot,
199 int device_id, int abort_flag, int tag_to_abort);
John Garry27a3f222015-11-18 00:50:50 +0800200 int (*slot_complete)(struct hisi_hba *hisi_hba,
John Garry405314d2017-03-23 01:25:21 +0800201 struct hisi_sas_slot *slot);
John Garry396b8042017-03-23 01:25:19 +0800202 void (*phys_init)(struct hisi_hba *hisi_hba);
John Garrye4189d52015-11-18 00:50:57 +0800203 void (*phy_enable)(struct hisi_hba *hisi_hba, int phy_no);
204 void (*phy_disable)(struct hisi_hba *hisi_hba, int phy_no);
205 void (*phy_hard_reset)(struct hisi_hba *hisi_hba, int phy_no);
Xiaofei Tanc52108c2017-08-11 00:09:29 +0800206 void (*get_events)(struct hisi_hba *hisi_hba, int phy_no);
Xiang Chen2ae75782016-11-07 20:48:40 +0800207 void (*phy_set_linkrate)(struct hisi_hba *hisi_hba, int phy_no,
208 struct sas_phy_linkrates *linkrates);
209 enum sas_linkrate (*phy_get_max_linkrate)(void);
John Garry27a3f222015-11-18 00:50:50 +0800210 void (*free_device)(struct hisi_hba *hisi_hba,
211 struct hisi_sas_device *dev);
John Garry184a4632015-11-18 00:50:52 +0800212 int (*get_wideport_bitmap)(struct hisi_hba *hisi_hba, int port_id);
Xiang Chend30ff262017-06-14 23:33:32 +0800213 void (*dereg_device)(struct hisi_hba *hisi_hba,
214 struct domain_device *device);
Xiang Chen06ec0fb2017-03-23 01:25:18 +0800215 int (*soft_reset)(struct hisi_hba *hisi_hba);
Xiaofei Tan917d3bd2017-08-11 00:09:26 +0800216 u32 (*get_phys_state)(struct hisi_hba *hisi_hba);
John Garrya8d547b2016-01-26 02:47:03 +0800217 int max_command_entries;
John Garry6be6de12015-11-18 00:50:34 +0800218 int complete_hdr_size;
John Garry7eb78692015-11-18 00:50:31 +0800219};
220
221struct hisi_hba {
222 /* This must be the first element, used by SHOST_TO_SAS_HA */
223 struct sas_ha_struct *p;
224
John Garry11b75242017-06-14 23:33:17 +0800225 struct platform_device *platform_dev;
226 struct pci_dev *pci_dev;
227 struct device *dev;
228
John Garrye26b2f42015-11-18 00:50:32 +0800229 void __iomem *regs;
230 struct regmap *ctrl;
231 u32 ctrl_reset_reg;
232 u32 ctrl_reset_sts_reg;
233 u32 ctrl_clock_ena_reg;
John Garry3bc45af2016-10-04 19:11:11 +0800234 u32 refclk_frequency_mhz;
John Garry7eb78692015-11-18 00:50:31 +0800235 u8 sas_addr[SAS_ADDR_SIZE];
236
237 int n_phy;
John Garryfa42d802015-11-18 00:50:43 +0800238 spinlock_t lock;
John Garry7eb78692015-11-18 00:50:31 +0800239
John Garryfa42d802015-11-18 00:50:43 +0800240 struct timer_list timer;
John Garry7e9080e2015-11-18 00:50:40 +0800241 struct workqueue_struct *wq;
John Garry257efd12015-11-18 00:50:36 +0800242
243 int slot_index_count;
244 unsigned long *slot_index_tags;
Xiaofei Tanc7b9d362017-04-10 21:21:56 +0800245 unsigned long reject_stp_links_msk;
John Garry257efd12015-11-18 00:50:36 +0800246
John Garry7eb78692015-11-18 00:50:31 +0800247 /* SCSI/SAS glue */
248 struct sas_ha_struct sha;
249 struct Scsi_Host *shost;
John Garry9101a072015-11-18 00:50:37 +0800250
251 struct hisi_sas_cq cq[HISI_SAS_MAX_QUEUES];
John Garry4fde02a2016-09-06 23:36:12 +0800252 struct hisi_sas_dq dq[HISI_SAS_MAX_QUEUES];
John Garry7eb78692015-11-18 00:50:31 +0800253 struct hisi_sas_phy phy[HISI_SAS_MAX_PHYS];
254 struct hisi_sas_port port[HISI_SAS_MAX_PHYS];
John Garrye26b2f42015-11-18 00:50:32 +0800255
256 int queue_count;
John Garry6be6de12015-11-18 00:50:34 +0800257
Xiaofei Tanf557e322017-06-29 21:02:14 +0800258 struct dma_pool *buffer_pool;
John Garryaf740db2015-11-18 00:50:41 +0800259 struct hisi_sas_device devices[HISI_SAS_MAX_DEVICES];
John Garry6be6de12015-11-18 00:50:34 +0800260 struct hisi_sas_cmd_hdr *cmd_hdr[HISI_SAS_MAX_QUEUES];
261 dma_addr_t cmd_hdr_dma[HISI_SAS_MAX_QUEUES];
262 void *complete_hdr[HISI_SAS_MAX_QUEUES];
263 dma_addr_t complete_hdr_dma[HISI_SAS_MAX_QUEUES];
264 struct hisi_sas_initial_fis *initial_fis;
265 dma_addr_t initial_fis_dma;
266 struct hisi_sas_itct *itct;
267 dma_addr_t itct_dma;
268 struct hisi_sas_iost *iost;
269 dma_addr_t iost_dma;
270 struct hisi_sas_breakpoint *breakpoint;
271 dma_addr_t breakpoint_dma;
272 struct hisi_sas_breakpoint *sata_breakpoint;
273 dma_addr_t sata_breakpoint_dma;
274 struct hisi_sas_slot *slot_info;
Xiang Chen06ec0fb2017-03-23 01:25:18 +0800275 unsigned long flags;
John Garry7eb78692015-11-18 00:50:31 +0800276 const struct hisi_sas_hw *hw; /* Low level hw interface */
Xiaofei Tan32ccba52017-04-10 21:21:57 +0800277 unsigned long sata_dev_bitmap[BITS_TO_LONGS(HISI_SAS_MAX_DEVICES)];
Xiang Chen06ec0fb2017-03-23 01:25:18 +0800278 struct work_struct rst_work;
John Garry7eb78692015-11-18 00:50:31 +0800279};
280
John Garryc799d6b2015-11-18 00:50:33 +0800281/* Generic HW DMA host memory structures */
282/* Delivery queue header */
283struct hisi_sas_cmd_hdr {
284 /* dw0 */
285 __le32 dw0;
286
287 /* dw1 */
288 __le32 dw1;
289
290 /* dw2 */
291 __le32 dw2;
292
293 /* dw3 */
294 __le32 transfer_tags;
295
296 /* dw4 */
297 __le32 data_transfer_len;
298
299 /* dw5 */
300 __le32 first_burst_num;
301
302 /* dw6 */
303 __le32 sg_len;
304
305 /* dw7 */
306 __le32 dw7;
307
308 /* dw8-9 */
309 __le64 cmd_table_addr;
310
311 /* dw10-11 */
312 __le64 sts_buffer_addr;
313
314 /* dw12-13 */
315 __le64 prd_table_addr;
316
317 /* dw14-15 */
318 __le64 dif_prd_table_addr;
319};
320
321struct hisi_sas_itct {
322 __le64 qw0;
323 __le64 sas_addr;
324 __le64 qw2;
325 __le64 qw3;
John Garry281e3bf2016-01-26 02:47:06 +0800326 __le64 qw4_15[12];
John Garryc799d6b2015-11-18 00:50:33 +0800327};
328
329struct hisi_sas_iost {
330 __le64 qw0;
331 __le64 qw1;
332 __le64 qw2;
333 __le64 qw3;
334};
335
336struct hisi_sas_err_record {
John Garry8d1eee72016-01-26 02:47:05 +0800337 u32 data[4];
John Garryc799d6b2015-11-18 00:50:33 +0800338};
339
340struct hisi_sas_initial_fis {
341 struct hisi_sas_err_record err_record;
342 struct dev_to_host_fis fis;
343 u32 rsvd[3];
344};
345
346struct hisi_sas_breakpoint {
347 u8 data[128]; /*io128 byte*/
348};
349
350struct hisi_sas_sge {
351 __le64 addr;
352 __le32 page_ctrl_0;
353 __le32 page_ctrl_1;
354 __le32 data_len;
355 __le32 data_off;
356};
357
358struct hisi_sas_command_table_smp {
359 u8 bytes[44];
360};
361
362struct hisi_sas_command_table_stp {
363 struct host_to_dev_fis command_fis;
364 u8 dummy[12];
365 u8 atapi_cdb[ATAPI_CDB_LEN];
366};
367
Ming Lin65e86172016-04-04 14:48:10 -0700368#define HISI_SAS_SGE_PAGE_CNT SG_CHUNK_SIZE
John Garryc799d6b2015-11-18 00:50:33 +0800369struct hisi_sas_sge_page {
370 struct hisi_sas_sge sge[HISI_SAS_SGE_PAGE_CNT];
Xiaofei Tanf557e322017-06-29 21:02:14 +0800371} __aligned(16);
John Garryc799d6b2015-11-18 00:50:33 +0800372
373struct hisi_sas_command_table_ssp {
374 struct ssp_frame_hdr hdr;
375 union {
376 struct {
377 struct ssp_command_iu task;
378 u32 prot[6];
379 };
380 struct ssp_tmf_iu ssp_task;
381 struct xfer_rdy_iu xfer_rdy;
382 struct ssp_response_iu ssp_res;
383 } u;
384};
385
386union hisi_sas_command_table {
387 struct hisi_sas_command_table_ssp ssp;
388 struct hisi_sas_command_table_smp smp;
389 struct hisi_sas_command_table_stp stp;
Xiaofei Tanf557e322017-06-29 21:02:14 +0800390} __aligned(16);
391
392struct hisi_sas_status_buffer {
393 struct hisi_sas_err_record err;
394 u8 iu[1024];
395} __aligned(16);
396
397struct hisi_sas_slot_buf_table {
398 struct hisi_sas_status_buffer status_buffer;
399 union hisi_sas_command_table command_header;
400 struct hisi_sas_sge_page sge_page;
John Garryc799d6b2015-11-18 00:50:33 +0800401};
John Garry2e244f02017-03-23 01:25:17 +0800402
John Garrye21fe3a2017-06-14 23:33:20 +0800403extern struct scsi_transport_template *hisi_sas_stt;
404extern struct scsi_host_template *hisi_sas_sht;
405
Xiang Chena25d0d32017-08-11 00:09:40 +0800406extern void hisi_sas_stop_phys(struct hisi_hba *hisi_hba);
John Garrye21fe3a2017-06-14 23:33:20 +0800407extern void hisi_sas_init_add(struct hisi_hba *hisi_hba);
408extern int hisi_sas_alloc(struct hisi_hba *hisi_hba, struct Scsi_Host *shost);
409extern void hisi_sas_free(struct hisi_hba *hisi_hba);
Xiang Chen6c7bb8a2017-06-14 23:33:14 +0800410extern u8 hisi_sas_get_ata_protocol(u8 cmd, int direction);
John Garry2e244f02017-03-23 01:25:17 +0800411extern struct hisi_sas_port *to_hisi_sas_port(struct asd_sas_port *sas_port);
Xiang Chen75904072017-06-14 23:33:15 +0800412extern void hisi_sas_sata_done(struct sas_task *task,
413 struct hisi_sas_slot *slot);
Xiang Chen318913c2017-06-14 23:33:16 +0800414extern int hisi_sas_get_ncq_tag(struct sas_task *task, u32 *tag);
John Garry0fa24c12017-06-14 23:33:18 +0800415extern int hisi_sas_get_fw_info(struct hisi_hba *hisi_hba);
John Garry9fb10b52015-11-18 00:50:44 +0800416extern int hisi_sas_probe(struct platform_device *pdev,
417 const struct hisi_sas_hw *ops);
418extern int hisi_sas_remove(struct platform_device *pdev);
John Garryc799d6b2015-11-18 00:50:33 +0800419
John Garry184a4632015-11-18 00:50:52 +0800420extern void hisi_sas_phy_down(struct hisi_hba *hisi_hba, int phy_no, int rdy);
John Garry27a3f222015-11-18 00:50:50 +0800421extern void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba,
422 struct sas_task *task,
423 struct hisi_sas_slot *slot);
Xiang Chen06ec0fb2017-03-23 01:25:18 +0800424extern void hisi_sas_init_mem(struct hisi_hba *hisi_hba);
John Garrye8899fa2015-11-18 00:50:30 +0800425#endif