diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/rockchip/rk_edp.c | 11 | ||||
-rw-r--r-- | drivers/video/rockchip/rk_hdmi.c | 12 | ||||
-rw-r--r-- | drivers/video/rockchip/rk_lvds.c | 1 | ||||
-rw-r--r-- | drivers/video/rockchip/rk_vop.c | 11 |
4 files changed, 18 insertions, 17 deletions
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c index 124ddf6..7ece038 100644 --- a/drivers/video/rockchip/rk_edp.c +++ b/drivers/video/rockchip/rk_edp.c @@ -1009,8 +1009,7 @@ int rk_edp_probe(struct udevice *dev) struct display_plat *uc_plat = dev_get_uclass_platdata(dev); struct rk_edp_priv *priv = dev_get_priv(dev); struct rk3288_edp *regs = priv->regs; - struct udevice *clk; - int periph; + struct clk clk; int ret; ret = uclass_get_device_by_phandle(UCLASS_PANEL, dev, "rockchip,panel", @@ -1026,8 +1025,8 @@ int rk_edp_probe(struct udevice *dev) ret = clk_get_by_index(dev, 1, &clk); if (ret >= 0) { - periph = ret; - ret = clk_set_periph_rate(clk, periph, 0); + ret = clk_set_rate(&clk, 0); + clk_free(&clk); } if (ret) { debug("%s: Failed to set EDP clock: ret=%d\n", __func__, ret); @@ -1036,8 +1035,8 @@ int rk_edp_probe(struct udevice *dev) ret = clk_get_by_index(uc_plat->src_dev, 0, &clk); if (ret >= 0) { - periph = ret; - ret = clk_set_periph_rate(clk, periph, 192000000); + ret = clk_set_rate(&clk, 192000000); + clk_free(&clk); } if (ret < 0) { debug("%s: Failed to set clock in source device '%s': ret=%d\n", diff --git a/drivers/video/rockchip/rk_hdmi.c b/drivers/video/rockchip/rk_hdmi.c index 5fcb61a..8dd2c87 100644 --- a/drivers/video/rockchip/rk_hdmi.c +++ b/drivers/video/rockchip/rk_hdmi.c @@ -859,15 +859,15 @@ static int rk_hdmi_probe(struct udevice *dev) { struct display_plat *uc_plat = dev_get_uclass_platdata(dev); struct rk_hdmi_priv *priv = dev_get_priv(dev); - struct udevice *reg, *clk; - int periph; + struct udevice *reg; + struct clk clk; int ret; int vop_id = uc_plat->source_id; ret = clk_get_by_index(dev, 0, &clk); if (ret >= 0) { - periph = ret; - ret = clk_set_periph_rate(clk, periph, 0); + ret = clk_set_rate(&clk, 0); + clk_free(&clk); } if (ret) { debug("%s: Failed to set EDP clock: ret=%d\n", __func__, ret); @@ -880,8 +880,8 @@ static int rk_hdmi_probe(struct udevice *dev) */ ret = clk_get_by_index(uc_plat->src_dev, 0, &clk); if (ret >= 0) { - periph = ret; - ret = clk_set_periph_rate(clk, periph, 384000000); + ret = clk_set_rate(&clk, 384000000); + clk_free(&clk); } if (ret < 0) { debug("%s: Failed to set clock in source device '%s': ret=%d\n", diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c index dc10b86..fcbb4d6 100644 --- a/drivers/video/rockchip/rk_lvds.c +++ b/drivers/video/rockchip/rk_lvds.c @@ -5,7 +5,6 @@ */ #include <common.h> -#include <clk.h> #include <display.h> #include <dm.h> #include <edid.h> diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index db09d9a..cc26f19 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -195,7 +195,8 @@ int rk_display_init(struct udevice *dev, ulong fbbase, struct udevice *disp; int ret, remote, i, offset; struct display_plat *disp_uc_plat; - struct udevice *clk; + struct udevice *dev_clk; + struct clk clk; vop_id = fdtdec_get_int(blob, ep_node, "reg", -1); debug("vop_id=%d\n", vop_id); @@ -237,11 +238,13 @@ int rk_display_init(struct udevice *dev, ulong fbbase, return ret; } - ret = rkclk_get_clk(CLK_NEW, &clk); + ret = uclass_get_device(UCLASS_CLK, 0, &dev_clk); if (!ret) { - ret = clk_set_periph_rate(clk, DCLK_VOP0 + remote_vop_id, - timing.pixelclock.typ); + clk.id = DCLK_VOP0 + remote_vop_id; + ret = clk_request(dev_clk, &clk); } + if (!ret) + ret = clk_set_rate(&clk, timing.pixelclock.typ); if (ret) { debug("%s: Failed to set pixel clock: ret=%d\n", __func__, ret); return ret; |