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@
This commit is contained in:
Ian Lepore 2020-11-25 15:45:20 +00:00
parent a779388f8b
commit ddd30dd82b

View File

@ -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
@ -148,6 +150,9 @@ 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)
return (ENXIO);