Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/ti enumerate devices under child "clocks" node



details:   https://anonhg.NetBSD.org/src/rev/6950e91a6aab
branches:  trunk
changeset: 966406:6950e91a6aab
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Oct 28 21:16:10 2019 +0000

description:
enumerate devices under child "clocks" node

diffstat:

 sys/arch/arm/ti/am3_prcm.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 3e5ac449add4 -r 6950e91a6aab sys/arch/arm/ti/am3_prcm.c
--- a/sys/arch/arm/ti/am3_prcm.c        Mon Oct 28 21:15:34 2019 +0000
+++ b/sys/arch/arm/ti/am3_prcm.c        Mon Oct 28 21:16:10 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: am3_prcm.c,v 1.4 2019/10/27 19:11:07 jmcneill Exp $ */
+/* $NetBSD: am3_prcm.c,v 1.5 2019/10/28 21:16:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: am3_prcm.c,v 1.4 2019/10/27 19:11:07 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: am3_prcm.c,v 1.5 2019/10/28 21:16:10 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -134,6 +134,7 @@
 {
        struct ti_prcm_softc * const sc = device_private(self);
        struct fdt_attach_args * const faa = aux;
+       int clocks;
 
        sc->sc_dev = self;
        sc->sc_phandle = faa->faa_phandle;
@@ -147,4 +148,8 @@
 
        aprint_naive("\n");
        aprint_normal(": AM3xxx PRCM\n");
+
+       clocks = of_find_firstchild_byname(sc->sc_phandle, "clocks");
+       if (clocks > 0)
+               fdt_add_bus(self, clocks, faa);
 }



Home | Main Index | Thread Index | Old Index