clk: meson: reset mmc clock on probe
[oweals/u-boot.git] / drivers / clk / meson / gxbb.c
index e781e08d9d5d92d4ec3760fbfb1bf574dd102350..5ef4dd794d5210684d2ab89b5dfb7696783d6be2 100644 (file)
@@ -887,6 +887,13 @@ static int meson_clk_probe(struct udevice *dev)
        if (IS_ERR(priv->map))
                return PTR_ERR(priv->map);
 
+       /*
+        * Depending on the boot src, the state of the MMC clock might
+        * be different. Reset it to make sure we won't get stuck
+        */
+       regmap_write(priv->map, HHI_NAND_CLK_CNTL, 0);
+       regmap_write(priv->map, HHI_SD_EMMC_CLK_CNTL, 0);
+
        debug("meson-clk: probed\n");
 
        return 0;