mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
UPSTREAM: scsi: ufs: ufs-exynos: Support custom version of ufs_hba_variant_ops
By default, ufs_hba_exynos_ops will be used. Add support for a custom
version of ufs_hba_variant_ops because some variants of exynos-ufs will use
only few callbacks.
Link: https://lore.kernel.org/r/20211018124216.153072-8-chanho61.park@samsung.com
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Kiwoong Kim <kwmad.kim@samsung.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 234653003
(cherry picked from commit 533b81d674)
Change-Id: I34233f15c0447c33c934eaaf724d3dc4506f141a
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
47a41dbf33
commit
4d7b6190b2
@@ -1237,8 +1237,14 @@ static int exynos_ufs_probe(struct platform_device *pdev)
|
||||
{
|
||||
int err;
|
||||
struct device *dev = &pdev->dev;
|
||||
const struct ufs_hba_variant_ops *vops = &ufs_hba_exynos_ops;
|
||||
const struct exynos_ufs_drv_data *drv_data =
|
||||
device_get_match_data(dev);
|
||||
|
||||
err = ufshcd_pltfrm_init(pdev, &ufs_hba_exynos_ops);
|
||||
if (drv_data && drv_data->vops)
|
||||
vops = drv_data->vops;
|
||||
|
||||
err = ufshcd_pltfrm_init(pdev, vops);
|
||||
if (err)
|
||||
dev_err(dev, "ufshcd_pltfrm_init() failed %d\n", err);
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ struct exynos_ufs_uic_attr {
|
||||
};
|
||||
|
||||
struct exynos_ufs_drv_data {
|
||||
const struct ufs_hba_variant_ops *vops;
|
||||
struct exynos_ufs_uic_attr *uic_attr;
|
||||
unsigned int quirks;
|
||||
unsigned int opts;
|
||||
|
||||
Reference in New Issue
Block a user