Lines Matching +full:tcsr +full:- +full:mutex

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
36 #include <sys/mutex.h>
60 * The linux-msm branches that support IPQ4018 use "ipq,tcsr".
61 * The openwrt addons use qcom,tcsr. So for now support both.
70 { "qcom,tcsr", 1 },
71 { "ipq,tcsr", 1 },
82 if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) in qcom_tcsr_probe()
96 sc->sc_dev = dev; in qcom_tcsr_attach()
101 sc->hw_version = in qcom_tcsr_attach()
102 ofw_bus_search_compatible(dev, compat_data)->ocd_data; in qcom_tcsr_attach()
104 mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); in qcom_tcsr_attach()
107 sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, in qcom_tcsr_attach()
109 if (!sc->sc_mem_res) { in qcom_tcsr_attach()
123 * For linux-msm on the IPQ401x, it actually calls into the SCM in qcom_tcsr_attach()
127 if (OF_getencprop(ofw_bus_get_node(dev), "qcom,usb-ctrl-select", in qcom_tcsr_attach()
130 device_printf(sc->sc_dev, in qcom_tcsr_attach()
139 if (OF_getencprop(ofw_bus_get_node(dev), "qcom,usb-hsphy-mode-select", in qcom_tcsr_attach()
142 device_printf(sc->sc_dev, in qcom_tcsr_attach()
151 if (OF_getencprop(ofw_bus_get_node(dev), "qcom,ess-interface-select", in qcom_tcsr_attach()
156 device_printf(sc->sc_dev, in qcom_tcsr_attach()
171 device_printf(sc->sc_dev, in qcom_tcsr_attach()
185 device_printf(sc->sc_dev, in qcom_tcsr_attach()
194 if (sc->sc_mem_res) in qcom_tcsr_attach()
195 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); in qcom_tcsr_attach()
196 mtx_destroy(&sc->sc_mtx); in qcom_tcsr_attach()
205 if (sc->sc_mem_res) in qcom_tcsr_detach()
206 bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); in qcom_tcsr_detach()
208 mtx_destroy(&sc->sc_mtx); in qcom_tcsr_detach()