scsi: ufs: add vendor's specific operation
authorhgchu <hg.chu@samsung.com>
Thu, 11 Jan 2018 23:28:12 +0000 (08:28 +0900)
committerJaeHun Jung <jh0801.jung@samsung.com>
Tue, 8 May 2018 08:20:07 +0000 (17:20 +0900)
Change-Id: Id53ebff96cbda110ba1d3d37fde66605edec09f7
Signed-off-by: hgchu <hg.chu@samsung.com>
drivers/scsi/ufs/ufshcd-pltfrm.c
drivers/scsi/ufs/ufshcd-pltfrm.h
drivers/scsi/ufs/ufshcd.h

index e82bde0772963cbbde59a52712984f56921d39d9..f33a3797ef7b392c645f7b7d0ff02a839fff61ad 100644 (file)
@@ -365,6 +365,20 @@ out:
 }
 EXPORT_SYMBOL_GPL(ufshcd_pltfrm_init);
 
+/**
+ * ufshcd_pltfrm_exit - exit common routine for platform driver
+ * @pdev: pointer to platform device handle
+ */
+void ufshcd_pltfrm_exit(struct platform_device *pdev)
+{
+       struct ufs_hba *hba =  platform_get_drvdata(pdev);
+
+       disable_irq(hba->irq);
+
+       ufshcd_remove(hba);
+}
+EXPORT_SYMBOL_GPL(ufshcd_pltfrm_exit);
+
 MODULE_AUTHOR("Santosh Yaragnavi <santosh.sy@samsung.com>");
 MODULE_AUTHOR("Vinayak Holikatti <h.vinayak@samsung.com>");
 MODULE_DESCRIPTION("UFS host controller Platform bus based glue driver");
index df64c418034046bd9810cc66bb5ca655a50da2b4..59cee8c0edc2b0b646621cd5bcfc68ebae8668f6 100644 (file)
@@ -19,6 +19,7 @@
 int ufshcd_pltfrm_init(struct platform_device *pdev,
                       struct ufs_hba_variant_ops *vops);
 void ufshcd_pltfrm_shutdown(struct platform_device *pdev);
+void ufshcd_pltfrm_exit(struct platform_device *pdev);
 
 #ifdef CONFIG_PM
 
index cdc8bd05f7dfcf7189a4a616bb90c2ea3a8e2ece..95c64b031eab3663ec19660896e8423cd6f7ee08 100644 (file)
@@ -220,6 +220,14 @@ struct ufs_dev_cmd {
        struct ufs_query query;
 };
 
+/**
+ * ufs_hba_variant: host specific data
+ */
+struct ufs_hba_variant {
+       const struct ufs_hba_variant_ops *ops;
+       u32 quirks;
+       void *vs_data;
+};
 struct ufs_desc_size {
        int dev_desc;
        int pwr_desc;