Date: Wed, 25 Nov 2020 15:45:21 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368021 - head/sys/arm/ti Message-ID: <202011251545.0APFjL0h046491@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Wed Nov 25 15:45:20 2020 New Revision: 368021 URL: https://svnweb.freebsd.org/changeset/base/368021 Log: Only attach the ti_scm_syscon driver when running on a compatible TI chip. This prevents attaching on non-TI systems in the GENERIC kernel. Reviewed by: manu@, mmel@ Modified: head/sys/arm/ti/ti_scm_syscon.c Modified: head/sys/arm/ti/ti_scm_syscon.c ============================================================================== --- head/sys/arm/ti/ti_scm_syscon.c Wed Nov 25 15:07:22 2020 (r368020) +++ head/sys/arm/ti/ti_scm_syscon.c Wed Nov 25 15:45:20 2020 (r368021) @@ -54,6 +54,8 @@ __FBSDID("$FreeBSD$"); #include <dev/extres/syscon/syscon.h> #include "clkdev_if.h" +#include <arm/ti/ti_cpuid.h> + #if 0 #define DPRINTF(dev, msg...) device_printf(dev, msg) #else @@ -146,6 +148,9 @@ static int ti_scm_syscon_probe(device_t dev) { if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ti_soc_is_supported()) return (ENXIO); if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011251545.0APFjL0h046491>