Lines Matching +full:am3352 +full:- +full:ecap
1 /*-
57 #define ECAP_READ2(_sc, reg) bus_read_2((_sc)->sc_mem_res, reg);
59 bus_write_2((_sc)->sc_mem_res, reg, value);
60 #define ECAP_READ4(_sc, reg) bus_read_4((_sc)->sc_mem_res, reg);
62 bus_write_4((_sc)->sc_mem_res, reg, value);
64 #define PWM_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
65 #define PWM_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
66 #define PWM_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \
67 device_get_nameunit(_sc->sc_dev), "am335x_ecap softc", MTX_DEF)
68 #define PWM_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
82 {"ti,am3352-ecap", true},
83 {"ti,am33xx-ecap", true},
130 ECAP_WRITE4(sc, ECAP_CAP3, period - 1); in am335x_pwm_config_ecap()
149 if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) in am335x_ecap_probe()
152 device_set_desc(dev, "AM335x eCAP"); in am335x_ecap_probe()
163 sc->sc_dev = dev; in am335x_ecap_attach()
167 sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in am335x_ecap_attach()
168 &sc->sc_mem_rid, RF_ACTIVE); in am335x_ecap_attach()
169 if (sc->sc_mem_res == NULL) { in am335x_ecap_attach()
189 if (sc->sc_mem_res) in am335x_ecap_detach()
191 sc->sc_mem_rid, sc->sc_mem_res); in am335x_ecap_detach()