Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Attach Tegra124 DVFS to /cpus/cpu0 now that another...
details: https://anonhg.NetBSD.org/src/rev/e42b63618cd6
branches: trunk
changeset: 354028:e42b63618cd6
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Jun 02 00:09:56 2017 +0000
description:
Attach Tegra124 DVFS to /cpus/cpu0 now that another driver is claiming the
/cpus node.
diffstat:
sys/arch/arm/nvidia/files.tegra | 4 ++--
sys/arch/arm/nvidia/tegra124_cpu.c | 20 +++++++++++---------
sys/arch/evbarm/conf/TEGRA | 4 ++--
3 files changed, 15 insertions(+), 13 deletions(-)
diffs (108 lines):
diff -r 4185a91f7ea9 -r e42b63618cd6 sys/arch/arm/nvidia/files.tegra
--- a/sys/arch/arm/nvidia/files.tegra Fri Jun 02 00:01:00 2017 +0000
+++ b/sys/arch/arm/nvidia/files.tegra Fri Jun 02 00:09:56 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.tegra,v 1.39 2017/05/30 22:55:26 jmcneill Exp $
+# $NetBSD: files.tegra,v 1.40 2017/06/02 00:09:56 jmcneill Exp $
#
# Configuration info for NVIDIA Tegra ARM Peripherals
#
@@ -21,7 +21,7 @@
# Tegra T124 (32-bit K1) support
file arch/arm/nvidia/soc_tegra124.c soc_tegra124
device tegra124cpu
-attach tegra124cpu at fdt with tegra124_cpu
+attach tegra124cpu at cpu with tegra124_cpu
file arch/arm/nvidia/tegra124_cpu.c tegra124_cpu
# Tegra T210 (X1) support
diff -r 4185a91f7ea9 -r e42b63618cd6 sys/arch/arm/nvidia/tegra124_cpu.c
--- a/sys/arch/arm/nvidia/tegra124_cpu.c Fri Jun 02 00:01:00 2017 +0000
+++ b/sys/arch/arm/nvidia/tegra124_cpu.c Fri Jun 02 00:09:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra124_cpu.c,v 1.3 2017/04/29 23:00:42 jmcneill Exp $ */
+/* $NetBSD: tegra124_cpu.c,v 1.4 2017/06/02 00:09:56 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: tegra124_cpu.c,v 1.3 2017/04/29 23:00:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra124_cpu.c,v 1.4 2017/06/02 00:09:56 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -70,7 +70,7 @@
static int tegra124_cpu_match(device_t, cfdata_t, void *);
static void tegra124_cpu_attach(device_t, device_t, void *);
-static void tegra124_cpu_init_cpufreq(device_t);
+static int tegra124_cpu_init_cpufreq(device_t);
CFATTACH_DECL_NEW(tegra124_cpu, 0, tegra124_cpu_match, tegra124_cpu_attach,
NULL, NULL);
@@ -125,7 +125,7 @@
const char * const compatible[] = { "nvidia,tegra124", NULL };
struct fdt_attach_args *faa = aux;
- if (OF_finddevice("/cpus") != faa->faa_phandle)
+ if (OF_finddevice("/cpus/cpu@0") != faa->faa_phandle)
return 0;
return of_match_compatible(OF_finddevice("/"), compatible);
@@ -135,12 +135,12 @@
tegra124_cpu_attach(device_t parent, device_t self, void *aux)
{
aprint_naive("\n");
- aprint_normal(": CPU complex\n");
+ aprint_normal(": DVFS\n");
- config_defer(self, tegra124_cpu_init_cpufreq);
+ config_finalize_register(self, tegra124_cpu_init_cpufreq);
}
-static void
+static int
tegra124_cpu_init_cpufreq(device_t dev)
{
tegra124_speedo_init();
@@ -153,14 +153,16 @@
}
if (tegra124_clk_pllx == NULL) {
aprint_error_dev(dev, "couldn't find clock pll_x\n");
- return;
+ return 0;
}
if (tegra124_reg_vddcpu == NULL) {
aprint_error_dev(dev, "couldn't find voltage regulator\n");
- return;
+ return 0;
}
tegra_cpufreq_register(&tegra124_cpufreq_func);
+
+ return 0;
}
static void
diff -r 4185a91f7ea9 -r e42b63618cd6 sys/arch/evbarm/conf/TEGRA
--- a/sys/arch/evbarm/conf/TEGRA Fri Jun 02 00:01:00 2017 +0000
+++ b/sys/arch/evbarm/conf/TEGRA Fri Jun 02 00:09:56 2017 +0000
@@ -1,5 +1,5 @@
#
-# $NetBSD: TEGRA,v 1.22 2017/05/29 23:22:00 jmcneill Exp $
+# $NetBSD: TEGRA,v 1.23 2017/06/02 00:09:56 jmcneill Exp $
#
# NVIDIA Tegra K1 (T124)
#
@@ -36,7 +36,7 @@
cpu* at cpus?
# CPU frequency scaling
-tegra124cpu* at fdt?
+tegra124cpu* at cpu?
fclock* at fdt? pass 4
fregulator* at fdt? pass 4
Home |
Main Index |
Thread Index |
Old Index