[PATCH 021/102] drm/rockchip: explicitly request exclusive reset control

From: Philipp Zabel
Date: Wed Jul 19 2017 - 11:55:05 EST


Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior. Convert all drivers requesting exclusive resets to the
explicit API call so the temporary transition helpers can be removed.

No functional changes.

Cc: Mark Yao <mark.yao@xxxxxxxxxxxxxx>
Cc: Heiko Stuebner <heiko@xxxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-rockchip@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +-
drivers/gpu/drm/rockchip/cdn-dp-core.c | 8 ++++----
drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 2 +-
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
index 9606121fa185a..172930e7645e7 100644
--- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
@@ -297,7 +297,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp)
return PTR_ERR(dp->pclk);
}

- dp->rst = devm_reset_control_get(dev, "dp");
+ dp->rst = devm_reset_control_get_exclusive(dev, "dp");
if (IS_ERR(dp->rst)) {
dev_err(dev, "failed to get dp reset control\n");
return PTR_ERR(dp->rst);
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 9b0b0588bbedb..b7f5c5d9f245d 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -765,25 +765,25 @@ static int cdn_dp_parse_dt(struct cdn_dp_device *dp)
return PTR_ERR(dp->grf_clk);
}

- dp->spdif_rst = devm_reset_control_get(dev, "spdif");
+ dp->spdif_rst = devm_reset_control_get_exclusive(dev, "spdif");
if (IS_ERR(dp->spdif_rst)) {
DRM_DEV_ERROR(dev, "no spdif reset control found\n");
return PTR_ERR(dp->spdif_rst);
}

- dp->dptx_rst = devm_reset_control_get(dev, "dptx");
+ dp->dptx_rst = devm_reset_control_get_exclusive(dev, "dptx");
if (IS_ERR(dp->dptx_rst)) {
DRM_DEV_ERROR(dev, "no uphy reset control found\n");
return PTR_ERR(dp->dptx_rst);
}

- dp->core_rst = devm_reset_control_get(dev, "core");
+ dp->core_rst = devm_reset_control_get_exclusive(dev, "core");
if (IS_ERR(dp->core_rst)) {
DRM_DEV_ERROR(dev, "no core reset control found\n");
return PTR_ERR(dp->core_rst);
}

- dp->apb_rst = devm_reset_control_get(dev, "apb");
+ dp->apb_rst = devm_reset_control_get_exclusive(dev, "apb");
if (IS_ERR(dp->apb_rst)) {
DRM_DEV_ERROR(dev, "no apb reset control found\n");
return PTR_ERR(dp->apb_rst);
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
index 21b9737662ae9..c3501ae59db35 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
@@ -1221,7 +1221,7 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
* Note that the reset was not defined in the initial device tree, so
* we have to be prepared for it not being found.
*/
- apb_rst = devm_reset_control_get(dev, "apb");
+ apb_rst = devm_reset_control_get_exclusive(dev, "apb");
if (IS_ERR(apb_rst)) {
ret = PTR_ERR(apb_rst);
if (ret == -ENOENT) {
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 5d450332c2fd7..18b582cd81e50 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1443,7 +1443,7 @@ static int vop_initial(struct vop *vop)
/*
* do hclk_reset, reset all vop registers.
*/
- ahb_rst = devm_reset_control_get(vop->dev, "ahb");
+ ahb_rst = devm_reset_control_get_exclusive(vop->dev, "ahb");
if (IS_ERR(ahb_rst)) {
dev_err(vop->dev, "failed to get ahb reset\n");
ret = PTR_ERR(ahb_rst);
@@ -1469,7 +1469,7 @@ static int vop_initial(struct vop *vop)
/*
* do dclk_reset, let all config take affect.
*/
- vop->dclk_rst = devm_reset_control_get(vop->dev, "dclk");
+ vop->dclk_rst = devm_reset_control_get_exclusive(vop->dev, "dclk");
if (IS_ERR(vop->dclk_rst)) {
dev_err(vop->dev, "failed to get dclk reset\n");
ret = PTR_ERR(vop->dclk_rst);
--
2.11.0