Some devices come with the same name as TI devices, so we can't rely on the
"probe" method of those drivers to mean we're on e TI SoC. Introduce a new function, ti_soc_is_supported(), and use it to be sure we're really a TI system. PR: 222250
This commit is contained in:
parent
bcab65cab5
commit
69d14913fc
@ -272,11 +272,7 @@ 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"))
|
||||
if (!ti_soc_is_supported())
|
||||
return;
|
||||
switch(ti_chip()) {
|
||||
case CHIP_OMAP_4:
|
||||
|
@ -80,4 +80,10 @@ static __inline int ti_chip(void)
|
||||
|
||||
uint32_t ti_revision(void);
|
||||
|
||||
static __inline bool ti_soc_is_supported(void)
|
||||
{
|
||||
|
||||
return (_ti_chip != -1);
|
||||
}
|
||||
|
||||
#endif /* _TI_CPUID_H_ */
|
||||
|
@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/fdt/fdt_pinctrl.h>
|
||||
|
||||
#include "ti_scm.h"
|
||||
#include "ti_cpuid.h"
|
||||
|
||||
static struct resource_spec ti_scm_res_spec[] = {
|
||||
{ SYS_RES_MEMORY, 0, RF_ACTIVE }, /* Control memory window */
|
||||
@ -86,6 +87,10 @@ static struct ti_scm_softc *ti_scm_sc;
|
||||
static int
|
||||
ti_scm_probe(device_t dev)
|
||||
{
|
||||
|
||||
if (!ti_soc_is_supported())
|
||||
return (ENXIO);
|
||||
|
||||
if (!ofw_bus_status_okay(dev))
|
||||
return (ENXIO);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user