From: hgchu Date: Thu, 11 Jan 2018 23:28:12 +0000 (+0900) Subject: scsi: ufs: add vendor's specific operation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd528aaa5b1580df6056afc6ba324fa58ca70d54;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: ufs: add vendor's specific operation Change-Id: Id53ebff96cbda110ba1d3d37fde66605edec09f7 Signed-off-by: hgchu --- 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;