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/9369a063cad9
branches:  trunk
changeset: 460616:9369a063cad9
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 dc81a0bc19ef -r 9369a063cad9 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