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:
parent
a779388f8b
commit
ddd30dd82b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368021
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user