[U-Boot] [PATCH] rockchip: video: fix taking the VOP device out of standby

The VOP uses regular registers, so use setbits_le32/clrbits_le32 instead of rk_setbits/rk_clrbits.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com ---
drivers/video/rockchip/rk3288_vop.c | 2 +- drivers/video/rockchip/rk_vop.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c index 758ebaf..3a5740a 100644 --- a/drivers/video/rockchip/rk3288_vop.c +++ b/drivers/video/rockchip/rk3288_vop.c @@ -75,7 +75,7 @@ static int rk_vop_remove(struct udevice *dev) struct rk_vop_priv *priv = dev_get_priv(dev); struct rk3288_vop *regs = priv->regs;
- rk_setreg(®s->sys_ctrl, V_STANDBY_EN(1)); + setbits_le32(®s->sys_ctrl, V_STANDBY_EN(1));
/* wait frame complete (60Hz) to enter standby */ mdelay(17); diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index bac4def..c979049 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -106,7 +106,7 @@ static void rkvop_enable_output(struct udevice *dev, enum vop_modes mode) struct rk3288_vop *regs = priv->regs;
/* remove from standby */ - rk_clrreg(®s->sys_ctrl, V_STANDBY_EN(1)); + clrbits_le32(®s->sys_ctrl, V_STANDBY_EN(1));
switch (mode) { case VOP_MODE_HDMI:

Hi Philipp,
On Fri, 9 Jun 2017 18:24:37 +0200 Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote: ...
--- a/drivers/video/rockchip/rk3288_vop.c +++ b/drivers/video/rockchip/rk3288_vop.c @@ -75,7 +75,7 @@ static int rk_vop_remove(struct udevice *dev) struct rk_vop_priv *priv = dev_get_priv(dev); struct rk3288_vop *regs = priv->regs;
- rk_setreg(®s->sys_ctrl, V_STANDBY_EN(1));
- setbits_le32(®s->sys_ctrl, V_STANDBY_EN(1));
this patch doesn't apply on current master. Do you have more local patches applied?
-- Anatolij

Anatolij,
This is against u-boot-dm/master and a fix-up for the errors that Tom reported in response to Simon’s pull-request (for u-boot-dm).
I haven’t bothered to find out what tree the underlying patch came in through…
Philipp.
On 09 Jun 2017, at 18:45, Anatolij Gustschin agust@denx.de wrote:
Hi Philipp,
On Fri, 9 Jun 2017 18:24:37 +0200 Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote: ...
--- a/drivers/video/rockchip/rk3288_vop.c +++ b/drivers/video/rockchip/rk3288_vop.c @@ -75,7 +75,7 @@ static int rk_vop_remove(struct udevice *dev) struct rk_vop_priv *priv = dev_get_priv(dev); struct rk3288_vop *regs = priv->regs;
- rk_setreg(®s->sys_ctrl, V_STANDBY_EN(1));
- setbits_le32(®s->sys_ctrl, V_STANDBY_EN(1));
this patch doesn't apply on current master. Do you have more local patches applied?
-- Anatolij

On Fri, 9 Jun 2017 18:48:53 +0200 Dr. Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
Anatolij,
This is against u-boot-dm/master and a fix-up for the errors that Tom reported in response to Simon’s pull-request (for u-boot-dm).
I haven’t bothered to find out what tree the underlying patch came in through…
Ah, okay, no problem. It should go through dm tree then.
-- Anatolij

Hi Simon,
On Fri, 9 Jun 2017 18:24:37 +0200 Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
The VOP uses regular registers, so use setbits_le32/clrbits_le32 instead of rk_setbits/rk_clrbits.
these could be changed when applying, to match with the code:
s/rk_setbits/rk_setreg/ s/rk_clrbits/rk_clrreg/
no need to resubmit I think.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Acked-by: Anatolij Gustschin agust@denx.de
Thanks, Anatolij

Hi,
On 9 June 2017 at 11:02, Anatolij Gustschin agust@denx.de wrote:
Hi Simon,
On Fri, 9 Jun 2017 18:24:37 +0200 Philipp Tomsich philipp.tomsich@theobroma-systems.com wrote:
The VOP uses regular registers, so use setbits_le32/clrbits_le32 instead of rk_setbits/rk_clrbits.
these could be changed when applying, to match with the code:
s/rk_setbits/rk_setreg/ s/rk_clrbits/rk_clrreg/
no need to resubmit I think.
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com
Acked-by: Anatolij Gustschin agust@denx.de
Thank you both. I squashed this into the offending patch, in these two commits:
6b5a09aa38 rockchip: video: Take the vop device out of standby f418676e9a rockchip: video: Add remove() methods
Regards, Simon
participants (4)
-
Anatolij Gustschin
-
Dr. Philipp Tomsich
-
Philipp Tomsich
-
Simon Glass