]> git.sur5r.net Git - u-boot/commitdiff
rockchip: clk: rk3328: add ciu_clk entry for eMMC/SDMMC
authorXu Ziyuan <xzy.xu@rock-chips.com>
Sun, 16 Apr 2017 09:44:46 +0000 (17:44 +0800)
committerSimon Glass <sjg@chromium.org>
Wed, 10 May 2017 19:37:21 +0000 (13:37 -0600)
The genunie bus clock is sclk_x for eMMC/SDMMC, add support for it.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/clk/rockchip/clk_rk3328.c

index 0ff1e30bb59f87d4726dbc1a7283e219b89b44d0..8ec157416e9487ae08f5230f1b6a202147ea2290 100644 (file)
@@ -397,9 +397,11 @@ static ulong rk3328_mmc_get_clk(struct rk3328_cru *cru, uint clk_id)
 
        switch (clk_id) {
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                con_id = 30;
                break;
        case HCLK_EMMC:
+       case SCLK_EMMC:
                con_id = 32;
                break;
        default:
@@ -423,9 +425,11 @@ static ulong rk3328_mmc_set_clk(struct rk3328_cru *cru,
 
        switch (clk_id) {
        case HCLK_SDMMC:
+       case SCLK_SDMMC:
                con_id = 30;
                break;
        case HCLK_EMMC:
+       case SCLK_EMMC:
                con_id = 32;
                break;
        default:
@@ -483,6 +487,8 @@ static ulong rk3328_clk_get_rate(struct clk *clk)
                return 0;
        case HCLK_SDMMC:
        case HCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_EMMC:
                rate = rk3328_mmc_get_clk(priv->cru, clk->id);
                break;
        case SCLK_I2C0:
@@ -511,6 +517,8 @@ static ulong rk3328_clk_set_rate(struct clk *clk, ulong rate)
                return 0;
        case HCLK_SDMMC:
        case HCLK_EMMC:
+       case SCLK_SDMMC:
+       case SCLK_EMMC:
                ret = rk3328_mmc_set_clk(priv->cru, clk->id, rate);
                break;
        case SCLK_I2C0: