From dd528aaa5b1580df6056afc6ba324fa58ca70d54 Mon Sep 17 00:00:00 2001 From: hgchu Date: Fri, 12 Jan 2018 08:28:12 +0900 Subject: [PATCH] scsi: ufs: add vendor's specific operation Change-Id: Id53ebff96cbda110ba1d3d37fde66605edec09f7 Signed-off-by: hgchu --- drivers/scsi/ufs/ufshcd-pltfrm.c | 14 ++++++++++++++ drivers/scsi/ufs/ufshcd-pltfrm.h | 1 + drivers/scsi/ufs/ufshcd.h | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c index e82bde077296..f33a3797ef7b 100644 --- a/drivers/scsi/ufs/ufshcd-pltfrm.c +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c @@ -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 "); MODULE_AUTHOR("Vinayak Holikatti "); MODULE_DESCRIPTION("UFS host controller Platform bus based glue driver"); diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.h b/drivers/scsi/ufs/ufshcd-pltfrm.h index df64c4180340..59cee8c0edc2 100644 --- a/drivers/scsi/ufs/ufshcd-pltfrm.h +++ b/drivers/scsi/ufs/ufshcd-pltfrm.h @@ -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 diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index cdc8bd05f7df..95c64b031eab 100644 --- a/drivers/scsi/ufs/ufshcd.h +++ b/drivers/scsi/ufs/ufshcd.h @@ -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; -- 2.20.1