clk: meson: reset mmc clock on probe
[oweals/u-boot.git] / drivers / clk / mpc83xx_clk.c
index 489004190eb8843b5c51eff0990185851d31fd0d..4183db28455df5e5eb0676222ffe4c1efd428abf 100644 (file)
@@ -6,7 +6,9 @@
 
 #include <common.h>
 #include <clk-uclass.h>
+#include <clock_legacy.h>
 #include <dm.h>
+#include <vsprintf.h>
 #include <dm/lists.h>
 #include <dt-bindings/clk/mpc83xx-clk.h>
 #include <asm/arch/soc.h>
@@ -65,7 +67,10 @@ static inline bool is_clk_valid(struct udevice *clk, int id)
        case MPC83XX_CLK_DMAC:
                return (type == SOC_MPC8308) || (type == SOC_MPC8309);
        case MPC83XX_CLK_PCI:
-               return mpc83xx_has_pci(type);
+               /*
+                * FIXME: implement proper support for this.
+                */
+               return 0 && mpc83xx_has_pci(type);
        case MPC83XX_CLK_CSB:
                return true;
        case MPC83XX_CLK_I2C2:
@@ -275,6 +280,12 @@ static ulong mpc83xx_clk_get_rate(struct clk *clk)
        return priv->speed[clk->id];
 }
 
+static int mpc83xx_clk_enable(struct clk *clk)
+{
+       /* MPC83xx clocks are always enabled */
+       return 0;
+}
+
 int get_clocks(void)
 {
        /* Empty implementation to keep the prototype in common.h happy */
@@ -301,6 +312,7 @@ int get_serial_clock(void)
 const struct clk_ops mpc83xx_clk_ops = {
        .request = mpc83xx_clk_request,
        .get_rate = mpc83xx_clk_get_rate,
+       .enable = mpc83xx_clk_enable,
 };
 
 static const struct udevice_id mpc83xx_clk_match[] = {