Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2016 15:35:10 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r308836 - head/sys/arm/ti
Message-ID:  <201611191535.uAJFZAdC026452@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cognet
Date: Sat Nov 19 15:35:10 2016
New Revision: 308836
URL: https://svnweb.freebsd.org/changeset/base/308836

Log:
  Don't attempt to get the chip revision if it's not a supported TI chip

Modified:
  head/sys/arm/ti/ti_cpuid.c

Modified: head/sys/arm/ti/ti_cpuid.c
==============================================================================
--- head/sys/arm/ti/ti_cpuid.c	Sat Nov 19 15:10:10 2016	(r308835)
+++ head/sys/arm/ti/ti_cpuid.c	Sat Nov 19 15:35:10 2016	(r308836)
@@ -43,6 +43,10 @@ __FBSDID("$FreeBSD$");
 #include <machine/resource.h>
 #include <machine/intr.h>
 
+#include <dev/fdt/simplebus.h>
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/ofw_bus_subr.h>
+
 #include <arm/ti/tivar.h>
 #include <arm/ti/ti_cpuid.h>
 
@@ -268,6 +272,12 @@ am335x_get_revision(void)
 static void
 ti_cpu_ident(void *dummy)
 {
+	phandle_t root;
+
+	root = OF_finddevice("/");
+	if (!ofw_bus_node_is_compatible(root, "ti,omap4") &&
+	    !ofw_bus_node_is_compatible(root, "ti,am33xx"))
+		return;
 	switch(ti_chip()) {
 	case CHIP_OMAP_4:
 		omap4_get_revision();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611191535.uAJFZAdC026452>