Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/nvidia Register clocks with clk_attach



details:   https://anonhg.NetBSD.org/src/rev/198a2adf6a6b
branches:  trunk
changeset: 433670:198a2adf6a6b
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Sep 26 22:32:46 2018 +0000

description:
Register clocks with clk_attach

diffstat:

 sys/arch/arm/nvidia/tegra124_car.c |  9 ++++++---
 sys/arch/arm/nvidia/tegra210_car.c |  9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diffs (66 lines):

diff -r 57146124fd3b -r 198a2adf6a6b sys/arch/arm/nvidia/tegra124_car.c
--- a/sys/arch/arm/nvidia/tegra124_car.c        Wed Sep 26 20:25:51 2018 +0000
+++ b/sys/arch/arm/nvidia/tegra124_car.c        Wed Sep 26 22:32:46 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra124_car.c,v 1.15 2018/09/09 07:21:17 aymeric Exp $ */
+/* $NetBSD: tegra124_car.c,v 1.16 2018/09/26 22:32:46 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra124_car.c,v 1.15 2018/09/09 07:21:17 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra124_car.c,v 1.16 2018/09/26 22:32:46 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -758,10 +758,13 @@
        aprint_naive("\n");
        aprint_normal(": CAR\n");
 
+       sc->sc_clkdom.name = device_xname(self);
        sc->sc_clkdom.funcs = &tegra124_car_clock_funcs;
        sc->sc_clkdom.priv = sc;
-       for (n = 0; n < __arraycount(tegra124_car_clocks); n++)
+       for (n = 0; n < __arraycount(tegra124_car_clocks); n++) {
                tegra124_car_clocks[n].base.domain = &sc->sc_clkdom;
+               clk_attach(&tegra124_car_clocks[n].base);
+       }
 
        fdtbus_register_clock_controller(self, phandle,
            &tegra124_car_fdtclock_funcs);
diff -r 57146124fd3b -r 198a2adf6a6b sys/arch/arm/nvidia/tegra210_car.c
--- a/sys/arch/arm/nvidia/tegra210_car.c        Wed Sep 26 20:25:51 2018 +0000
+++ b/sys/arch/arm/nvidia/tegra210_car.c        Wed Sep 26 22:32:46 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra210_car.c,v 1.19 2018/09/09 07:21:17 aymeric Exp $ */
+/* $NetBSD: tegra210_car.c,v 1.20 2018/09/26 22:32:46 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra210_car.c,v 1.19 2018/09/09 07:21:17 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra210_car.c,v 1.20 2018/09/26 22:32:46 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -764,10 +764,13 @@
        aprint_naive("\n");
        aprint_normal(": CAR\n");
 
+       sc->sc_clkdom.name = device_xname(self);
        sc->sc_clkdom.funcs = &tegra210_car_clock_funcs;
        sc->sc_clkdom.priv = sc;
-       for (n = 0; n < __arraycount(tegra210_car_clocks); n++)
+       for (n = 0; n < __arraycount(tegra210_car_clocks); n++) {
                tegra210_car_clocks[n].base.domain = &sc->sc_clkdom;
+               clk_attach(&tegra210_car_clocks[n].base);
+       }
 
        fdtbus_register_clock_controller(self, phandle,
            &tegra210_car_fdtclock_funcs);



Home | Main Index | Thread Index | Old Index