From owner-svn-src-stable-11@freebsd.org Sun Nov 6 15:25:47 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75A52C32938; Sun, 6 Nov 2016 15:25:47 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C593FD1; Sun, 6 Nov 2016 15:25:47 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uA6FPkb3014414; Sun, 6 Nov 2016 15:25:46 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uA6FPkm7014413; Sun, 6 Nov 2016 15:25:46 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201611061525.uA6FPkm7014413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 6 Nov 2016 15:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r308374 - stable/11/sys/arm/nvidia/tegra124 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2016 15:25:47 -0000 Author: mmel Date: Sun Nov 6 15:25:46 2016 New Revision: 308374 URL: https://svnweb.freebsd.org/changeset/base/308374 Log: MFC r306551,r307557: r306551: TEGRA: Fix bindings for cpufreq and coretemp drivers, it was broken in r306477. Correct a description for coretemp driver. r307557: TEGRA: Attach cpufreq and coretemp drivers only on tegra124 SoC. It's needed by GENERIC kernel. Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c ============================================================================== --- stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sun Nov 6 15:12:05 2016 (r308373) +++ stable/11/sys/arm/nvidia/tegra124/tegra124_coretemp.c Sun Nov 6 15:25:46 2016 (r308374) @@ -178,7 +178,11 @@ tegra124_coretemp_ofw_parse(struct tegra static void tegra124_coretemp_identify(driver_t *driver, device_t parent) { + phandle_t root; + root = OF_finddevice("/"); + if (!ofw_bus_node_is_compatible(root, "nvidia,tegra124")) + return; if (device_find_child(parent, "tegra124_coretemp", -1) != NULL) return; if (BUS_ADD_CHILD(parent, 0, "tegra124_coretemp", -1) == NULL) @@ -189,7 +193,7 @@ static int tegra124_coretemp_probe(device_t dev) { - device_set_desc(dev, "CPU Frequency Control"); + device_set_desc(dev, "CPU Thermal Sensor"); return (0); } @@ -262,7 +266,7 @@ static device_method_t tegra124_coretemp }; static devclass_t tegra124_coretemp_devclass; -static DEFINE_CLASS_0(coretemp, tegra124_coretemp_driver, +static DEFINE_CLASS_0(tegra124_coretemp, tegra124_coretemp_driver, tegra124_coretemp_methods, sizeof(struct tegra124_coretemp_softc)); DRIVER_MODULE(tegra124_coretemp, cpu, tegra124_coretemp_driver, tegra124_coretemp_devclass, NULL, NULL); Modified: stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c ============================================================================== --- stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Sun Nov 6 15:12:05 2016 (r308373) +++ stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c Sun Nov 6 15:25:46 2016 (r308374) @@ -474,7 +474,14 @@ get_fdt_resources(struct tegra124_cpufre static void tegra124_cpufreq_identify(driver_t *driver, device_t parent) { + phandle_t root; + root = OF_finddevice("/"); + if (!ofw_bus_node_is_compatible(root, "nvidia,tegra124")) + return; + + if (device_get_unit(parent) != 0) + return; if (device_find_child(parent, "tegra124_cpufreq", -1) != NULL) return; if (BUS_ADD_CHILD(parent, 0, "tegra124_cpufreq", -1) == NULL) @@ -485,8 +492,6 @@ static int tegra124_cpufreq_probe(device_t dev) { - if (device_get_unit(dev) != 0) - return (ENXIO); device_set_desc(dev, "CPU Frequency Control"); return (0); @@ -587,7 +592,7 @@ static device_method_t tegra124_cpufreq_ }; static devclass_t tegra124_cpufreq_devclass; -static DEFINE_CLASS_0(cpufreq, tegra124_cpufreq_driver, +static DEFINE_CLASS_0(tegra124_cpufreq, tegra124_cpufreq_driver, tegra124_cpufreq_methods, sizeof(struct tegra124_cpufreq_softc)); DRIVER_MODULE(tegra124_cpufreq, cpu, tegra124_cpufreq_driver, tegra124_cpufreq_devclass, NULL, NULL);