Commit 533b81d6 authored by Chanho Park's avatar Chanho Park Committed by Martin K. Petersen
Browse files

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: default avatarAlim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: default avatarChanho Park <chanho61.park@samsung.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 91c49e7e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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);

+1 −0
Original line number Diff line number Diff line
@@ -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;