Re: [U-Boot] [PATCH] mpc83xx_clk: Add enable method

2019-03-29 Thread Mario Six
On Mon, Jan 28, 2019 at 9:41 AM Mario Six  wrote:
>
> Some DM drivers have hardcoded clk_enable calls when handling
> clocks (for example the fsl_esdhc driver).
>
> To work with these drivers, add an enable method to the MCP83xx clock
> driver (which does nothing, because the clocks are always enabled).
>
> Signed-off-by: Mario Six 
> ---
>  drivers/clk/mpc83xx_clk.c | 7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
> index 489004190eb..32d2db9edad 100644
> --- a/drivers/clk/mpc83xx_clk.c
> +++ b/drivers/clk/mpc83xx_clk.c
> @@ -275,6 +275,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 +307,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[] = {
> --
> 2.20.1
>
>

Applied to u-boot-mpc83xx/next.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] mpc83xx_clk: Add enable method

2019-01-28 Thread Mario Six
Some DM drivers have hardcoded clk_enable calls when handling
clocks (for example the fsl_esdhc driver).

To work with these drivers, add an enable method to the MCP83xx clock
driver (which does nothing, because the clocks are always enabled).

Signed-off-by: Mario Six 
---
 drivers/clk/mpc83xx_clk.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index 489004190eb..32d2db9edad 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -275,6 +275,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 +307,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[] = {
-- 
2.20.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot