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 DT ode path to i2c controller with ams37...



details:   https://anonhg.NetBSD.org/src/rev/dc56d7f28066
branches:  trunk
changeset: 352898:dc56d7f28066
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Apr 13 21:20:44 2017 +0000

description:
DT ode path to i2c controller with ams3722 has changed from /i2c@0,7000d000
to /i2c@7000d000 in newer dts files. Support both paths for cpufreq
scaling.

diffstat:

 sys/arch/arm/nvidia/soc_tegra124.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 4f1bb310871b -r dc56d7f28066 sys/arch/arm/nvidia/soc_tegra124.c
--- a/sys/arch/arm/nvidia/soc_tegra124.c        Thu Apr 13 20:18:22 2017 +0000
+++ b/sys/arch/arm/nvidia/soc_tegra124.c        Thu Apr 13 21:20:44 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: soc_tegra124.c,v 1.12 2015/12/22 22:10:36 jmcneill Exp $ */
+/* $NetBSD: soc_tegra124.c,v 1.13 2017/04/13 21:20:44 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.12 2015/12/22 22:10:36 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.13 2017/04/13 21:20:44 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -116,9 +116,11 @@
 void
 tegra124_cpuinit(void)
 {
-       const int node = OF_finddevice("/i2c@0,7000d000");
+       int node = OF_finddevice("/i2c@7000d000");
+       if (node == -1)
+               node = OF_finddevice("/i2c@0,7000d000"); /* old DTB */
        if (node == -1) {
-               aprint_error("cpufreq: ERROR: couldn't find i2c@0,7000d000\n");
+               aprint_error("cpufreq: ERROR: couldn't find i2c@7000d000\n");
                return;
        }
        i2c_tag_t ic = fdtbus_get_i2c_tag(node);



Home | Main Index | Thread Index | Old Index