aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/hisi_sas/Makefile1
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas.h3
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas_v1_hw.c53
3 files changed, 57 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/Makefile b/drivers/scsi/hisi_sas/Makefile
index d86b05e262e9..3e70eae81343 100644
--- a/drivers/scsi/hisi_sas/Makefile
+++ b/drivers/scsi/hisi_sas/Makefile
@@ -1 +1,2 @@
1obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas_main.o 1obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas_main.o
2obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas_v1_hw.o
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 3749c46bc6d0..72533cae320d 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -269,5 +269,8 @@ union hisi_sas_command_table {
269 struct hisi_sas_command_table_smp smp; 269 struct hisi_sas_command_table_smp smp;
270 struct hisi_sas_command_table_stp stp; 270 struct hisi_sas_command_table_stp stp;
271}; 271};
272extern int hisi_sas_probe(struct platform_device *pdev,
273 const struct hisi_sas_hw *ops);
274extern int hisi_sas_remove(struct platform_device *pdev);
272 275
273#endif 276#endif
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
new file mode 100644
index 000000000000..e9aebcec7aac
--- /dev/null
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -0,0 +1,53 @@
1/*
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#include "hisi_sas.h"
13#define DRV_NAME "hisi_sas_v1_hw"
14
15
16struct hisi_sas_complete_v1_hdr {
17 __le32 data;
18};
19static const struct hisi_sas_hw hisi_sas_v1_hw = {
20 .complete_hdr_size = sizeof(struct hisi_sas_complete_v1_hdr),
21};
22
23static int hisi_sas_v1_probe(struct platform_device *pdev)
24{
25 return hisi_sas_probe(pdev, &hisi_sas_v1_hw);
26}
27
28static int hisi_sas_v1_remove(struct platform_device *pdev)
29{
30 return hisi_sas_remove(pdev);
31}
32
33static const struct of_device_id sas_v1_of_match[] = {
34 { .compatible = "hisilicon,hip05-sas-v1",},
35 {},
36};
37MODULE_DEVICE_TABLE(of, sas_v1_of_match);
38
39static struct platform_driver hisi_sas_v1_driver = {
40 .probe = hisi_sas_v1_probe,
41 .remove = hisi_sas_v1_remove,
42 .driver = {
43 .name = DRV_NAME,
44 .of_match_table = sas_v1_of_match,
45 },
46};
47
48module_platform_driver(hisi_sas_v1_driver);
49
50MODULE_LICENSE("GPL");
51MODULE_AUTHOR("John Garry <john.garry@huawei.com>");
52MODULE_DESCRIPTION("HISILICON SAS controller v1 hw driver");
53MODULE_ALIAS("platform:" DRV_NAME);