diff mbox series

[v3,06/17] scsi: ufs: ufs-exynos: get sysreg regmap for io-coherency

Message ID 20210917065436.145629-7-chanho61.park@samsung.com (mailing list archive)
State Superseded
Headers show
Series [v3,01/17] scsi: ufs: add quirk to handle broken UIC command | expand

Commit Message

Chanho Park Sept. 17, 2021, 6:54 a.m. UTC
UFS_EMBD sharability register of fsys block provides "sharability"
setting of ufs-exynos. It can be set via syscon and regmap.

Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Kiwoong Kim <kwmad.kim@samsung.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
 drivers/scsi/ufs/ufs-exynos.c | 5 +++++
 drivers/scsi/ufs/ufs-exynos.h | 1 +
 2 files changed, 6 insertions(+)

Comments

Rob Herring (Arm) Sept. 22, 2021, 7:55 p.m. UTC | #1
On Fri, Sep 17, 2021 at 03:54:25PM +0900, Chanho Park wrote:
> UFS_EMBD sharability register of fsys block provides "sharability"
> setting of ufs-exynos. It can be set via syscon and regmap.
> 
> Cc: Alim Akhtar <alim.akhtar@samsung.com>
> Cc: Kiwoong Kim <kwmad.kim@samsung.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> ---
>  drivers/scsi/ufs/ufs-exynos.c | 5 +++++
>  drivers/scsi/ufs/ufs-exynos.h | 1 +
>  2 files changed, 6 insertions(+)

This patch is a nop... Fold it into the patch using sysreg.

> 
> diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
> index 8a17ba32a721..f7a1b99c823b 100644
> --- a/drivers/scsi/ufs/ufs-exynos.c
> +++ b/drivers/scsi/ufs/ufs-exynos.c
> @@ -12,6 +12,7 @@
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/of_address.h>
> +#include <linux/mfd/syscon.h>
>  #include <linux/phy/phy.h>
>  #include <linux/platform_device.h>
>  
> @@ -906,6 +907,10 @@ static int exynos_ufs_parse_dt(struct device *dev, struct exynos_ufs *ufs)
>  		goto out;
>  	}
>  
> +	ufs->sysreg = syscon_regmap_lookup_by_phandle(np, "sysreg");
> +	if (IS_ERR(ufs->sysreg))
> +		ufs->sysreg = NULL;
> +
>  	ufs->pclk_avail_min = PCLK_AVAIL_MIN;
>  	ufs->pclk_avail_max = PCLK_AVAIL_MAX;
>  
> diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h
> index 2e72aabaa673..4f93db893ce8 100644
> --- a/drivers/scsi/ufs/ufs-exynos.h
> +++ b/drivers/scsi/ufs/ufs-exynos.h
> @@ -191,6 +191,7 @@ struct exynos_ufs {
>  	struct ufs_phy_time_cfg t_cfg;
>  	ktime_t entry_hibern8_t;
>  	const struct exynos_ufs_drv_data *drv_data;
> +	struct regmap *sysreg;
>  
>  	u32 opts;
>  #define EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL		BIT(0)
> -- 
> 2.33.0
> 
>
Chanho Park Sept. 23, 2021, 12:39 a.m. UTC | #2
> >  drivers/scsi/ufs/ufs-exynos.c | 5 +++++
> > drivers/scsi/ufs/ufs-exynos.h | 1 +
> >  2 files changed, 6 insertions(+)
> 
> This patch is a nop... Fold it into the patch using sysreg.

I separated them to be reviewed easily by different maintainers. I'll squash
them on next patchset.

Best Regards,
Chanho Park
Rob Herring (Arm) Sept. 23, 2021, 12:26 p.m. UTC | #3
On Thu, Sep 23, 2021 at 09:39:46AM +0900, Chanho Park wrote:
> > >  drivers/scsi/ufs/ufs-exynos.c | 5 +++++
> > > drivers/scsi/ufs/ufs-exynos.h | 1 +
> > >  2 files changed, 6 insertions(+)
> > 
> > This patch is a nop... Fold it into the patch using sysreg.
> 
> I separated them to be reviewed easily by different maintainers. I'll squash
> them on next patchset.

Patch 14 is what this should be merged with. How is that a different 
maintainer?

Rob
Chanho Park Sept. 24, 2021, 12:59 a.m. UTC | #4
> > > This patch is a nop... Fold it into the patch using sysreg.
> >
> > I separated them to be reviewed easily by different maintainers. I'll
> > squash them on next patchset.
> 
> Patch 14 is what this should be merged with. How is that a different
> maintainer?

Ah, Okay. I got your point. I'd like to split them for getting some reviews
from previous ufs-exynos driver owner before adding exynosautov9 ufs driver.

0006-scsi-ufs-ufs-exynos-get-sysreg-regmap-for-io-coheren.patch
0014-scsi-ufs-ufs-exynos-support-exynosauto-v9-ufs-driver.patch

I think both patches can be squashed as you suggested.

Best Regards,
Chanho Park
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c
index 8a17ba32a721..f7a1b99c823b 100644
--- a/drivers/scsi/ufs/ufs-exynos.c
+++ b/drivers/scsi/ufs/ufs-exynos.c
@@ -12,6 +12,7 @@ 
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
+#include <linux/mfd/syscon.h>
 #include <linux/phy/phy.h>
 #include <linux/platform_device.h>
 
@@ -906,6 +907,10 @@  static int exynos_ufs_parse_dt(struct device *dev, struct exynos_ufs *ufs)
 		goto out;
 	}
 
+	ufs->sysreg = syscon_regmap_lookup_by_phandle(np, "sysreg");
+	if (IS_ERR(ufs->sysreg))
+		ufs->sysreg = NULL;
+
 	ufs->pclk_avail_min = PCLK_AVAIL_MIN;
 	ufs->pclk_avail_max = PCLK_AVAIL_MAX;
 
diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h
index 2e72aabaa673..4f93db893ce8 100644
--- a/drivers/scsi/ufs/ufs-exynos.h
+++ b/drivers/scsi/ufs/ufs-exynos.h
@@ -191,6 +191,7 @@  struct exynos_ufs {
 	struct ufs_phy_time_cfg t_cfg;
 	ktime_t entry_hibern8_t;
 	const struct exynos_ufs_drv_data *drv_data;
+	struct regmap *sysreg;
 
 	u32 opts;
 #define EXYNOS_UFS_OPT_HAS_APB_CLK_CTRL		BIT(0)