Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/amlogic Always honour MESON_CLK_DIV_SET_RATE_PA...



details:   https://anonhg.NetBSD.org/src/rev/7e6a9e1a9437
branches:  trunk
changeset: 448065:7e6a9e1a9437
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Jan 20 17:27:30 2019 +0000

description:
Always honour MESON_CLK_DIV_SET_RATE_PARENT

diffstat:

 sys/arch/arm/amlogic/meson_clk_div.c |  15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diffs (36 lines):

diff -r 98def5edfb92 -r 7e6a9e1a9437 sys/arch/arm/amlogic/meson_clk_div.c
--- a/sys/arch/arm/amlogic/meson_clk_div.c      Sun Jan 20 16:55:21 2019 +0000
+++ b/sys/arch/arm/amlogic/meson_clk_div.c      Sun Jan 20 17:27:30 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_clk_div.c,v 1.1 2019/01/19 20:56:03 jmcneill Exp $ */
+/* $NetBSD: meson_clk_div.c,v 1.2 2019/01/20 17:27:30 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017-2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: meson_clk_div.c,v 1.1 2019/01/19 20:56:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_clk_div.c,v 1.2 2019/01/20 17:27:30 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -90,12 +90,11 @@
        if (clkp_parent == NULL)
                return ENXIO;
 
-       if (div->div == 0) {
-               if ((div->flags & MESON_CLK_DIV_SET_RATE_PARENT) != 0)
-                       return clk_set_rate(clkp_parent, new_rate);
-               else
-                       return ENXIO;
-       }
+       if ((div->flags & MESON_CLK_DIV_SET_RATE_PARENT) != 0)
+               return clk_set_rate(clkp_parent, new_rate);
+
+       if (div->div == 0)
+               return ENXIO;
 
        val = CLK_READ(sc, div->reg);
 



Home | Main Index | Thread Index | Old Index