]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: Use rockchip_get_clk() to obtain the SoC clock
authorSimon Glass <sjg@chromium.org>
Sun, 17 Jul 2016 21:23:17 +0000 (15:23 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 26 Jul 2016 02:46:45 +0000 (20:46 -0600)
The current code picks the first available clock. In U-Boot proper this is
the oscillator device, not the SoC clock device. As a result the HDMI display
does not work.

Fix this by calling rockchip_get_clk() instead.

Fixes: 135aa950 (clk: convert API to match reset/mailbox style)
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
arch/arm/mach-rockchip/board.c
arch/arm/mach-rockchip/rk3288-board-spl.c
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
drivers/clk/clk_rk3288.c
drivers/video/rockchip/rk_vop.c

index f662b26938aa148a1d9ac982cd64678ab6d74fb3..bec756d7ac0bad6aed9324254909b2d675a85fc9 100644 (file)
@@ -178,7 +178,7 @@ static int do_clock(cmd_tbl_t *cmdtp, int flag, int argc,
        int ret, i;
        struct udevice *dev;
 
-       ret = uclass_get_device(UCLASS_CLK, 0, &dev);
+       ret = rockchip_get_clk(&dev);
        if (ret) {
                printf("clk-uclass not found\n");
                return 0;
index d82115fbfa51397850abf58eb58fe6829654a125..ed14023021d5694a9c8a4ef512d1da0c9a96c5ac 100644 (file)
@@ -187,7 +187,7 @@ void board_init_f(ulong dummy)
        rockchip_timer_init();
        configure_l2ctlr();
 
-       ret = uclass_get_device(UCLASS_CLK, 0, &dev);
+       ret = rockchip_get_clk(&dev);
        if (ret) {
                debug("CLK init failed: %d\n", ret);
                return;
index fc0f2f33bddaf178ddc975dd3f39b643b46262c6..4364d5a504bb8ddafe0a0187784ef5c61e7d7c4a 100644 (file)
@@ -923,7 +923,7 @@ static int rk3288_dmc_probe(struct udevice *dev)
        priv->chan[1].pctl = regmap_get_range(plat->map, 2);
        priv->chan[1].publ = regmap_get_range(plat->map, 3);
 #endif
-       ret = uclass_get_device(UCLASS_CLK, 0, &dev_clk);
+       ret = rockchip_get_clk(&dev_clk);
        if (ret)
                return ret;
        priv->ddr_clk.id = CLK_DDR;
index a41cf8b9f828739641999435d3c1b318c78b0ef0..e00feb08091e8b47273363a3b272afc9ca2b4a24 100644 (file)
@@ -145,7 +145,7 @@ void *rockchip_get_cru(void)
        struct udevice *dev;
        int ret;
 
-       ret = uclass_get_device(UCLASS_CLK, 0, &dev);
+       ret = rockchip_get_clk(&dev);
        if (ret)
                return ERR_PTR(ret);
 
index cc26f1956d39a7569c70d7b3c49ed545c168ca55..c6d88d9225d7c9fa66cf46208b7eb85e01b09d50 100644 (file)
@@ -238,7 +238,7 @@ int rk_display_init(struct udevice *dev, ulong fbbase,
                return ret;
        }
 
-       ret = uclass_get_device(UCLASS_CLK, 0, &dev_clk);
+       ret = rockchip_get_clk(&dev_clk);
        if (!ret) {
                clk.id = DCLK_VOP0 + remote_vop_id;
                ret = clk_request(dev_clk, &clk);