Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/ti/am335x/am335x_dmtimer.c
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | |||||
am335x_dmtimer_probe(device_t dev) | am335x_dmtimer_probe(device_t dev) | ||||
{ | { | ||||
char strbuf[32]; | char strbuf[32]; | ||||
int tmr_num; | int tmr_num; | ||||
if (!ofw_bus_status_okay(dev)) | if (!ofw_bus_status_okay(dev)) | ||||
return (ENXIO); | return (ENXIO); | ||||
if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) | if (!ofw_bus_compatible_lookup(dev, compat_data)) | ||||
return (ENXIO); | return (ENXIO); | ||||
/* | /* | ||||
* Get the hardware unit number (the N from ti,hwmods="timerN"). | * Get the hardware unit number (the N from ti,hwmods="timerN"). | ||||
* If this isn't the hardware unit we're going to use for either the | * If this isn't the hardware unit we're going to use for either the | ||||
* eventtimer or the timecounter, no point in instantiating the device. | * eventtimer or the timecounter, no point in instantiating the device. | ||||
*/ | */ | ||||
tmr_num = ti_hwmods_get_unit(dev, "timer"); | tmr_num = ti_hwmods_get_unit(dev, "timer"); | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |