Lines Matching full:bus

18 #include "bus.h"
54 struct wfx_sdio_priv *bus = priv; in wfx_sdio_copy_from_io() local
64 sdio_addr |= (bus->buf_id_rx + 1) << 7; in wfx_sdio_copy_from_io()
65 ret = sdio_memcpy_fromio(bus->func, dst, sdio_addr, count); in wfx_sdio_copy_from_io()
67 bus->buf_id_rx = (bus->buf_id_rx + 1) % 4; in wfx_sdio_copy_from_io()
74 struct wfx_sdio_priv *bus = priv; in wfx_sdio_copy_to_io() local
84 sdio_addr |= bus->buf_id_tx << 7; in wfx_sdio_copy_to_io()
86 ret = sdio_memcpy_toio(bus->func, sdio_addr, (void *)src, count); in wfx_sdio_copy_to_io()
88 bus->buf_id_tx = (bus->buf_id_tx + 1) % 32; in wfx_sdio_copy_to_io()
95 struct wfx_sdio_priv *bus = priv; in wfx_sdio_lock() local
97 sdio_claim_host(bus->func); in wfx_sdio_lock()
102 struct wfx_sdio_priv *bus = priv; in wfx_sdio_unlock() local
104 sdio_release_host(bus->func); in wfx_sdio_unlock()
109 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_irq_handler() local
111 wfx_bh_request_rx(bus->core); in wfx_sdio_irq_handler()
116 struct wfx_sdio_priv *bus = priv; in wfx_sdio_irq_handler_ext() local
118 sdio_claim_host(bus->func); in wfx_sdio_irq_handler_ext()
119 wfx_bh_request_rx(bus->core); in wfx_sdio_irq_handler_ext()
120 sdio_release_host(bus->func); in wfx_sdio_irq_handler_ext()
126 struct wfx_sdio_priv *bus = priv; in wfx_sdio_irq_subscribe() local
131 if (!bus->of_irq) { in wfx_sdio_irq_subscribe()
132 sdio_claim_host(bus->func); in wfx_sdio_irq_subscribe()
133 ret = sdio_claim_irq(bus->func, wfx_sdio_irq_handler); in wfx_sdio_irq_subscribe()
134 sdio_release_host(bus->func); in wfx_sdio_irq_subscribe()
138 flags = irq_get_trigger_type(bus->of_irq); in wfx_sdio_irq_subscribe()
142 ret = devm_request_threaded_irq(&bus->func->dev, bus->of_irq, NULL, in wfx_sdio_irq_subscribe()
143 wfx_sdio_irq_handler_ext, flags, "wfx", bus); in wfx_sdio_irq_subscribe()
146 sdio_claim_host(bus->func); in wfx_sdio_irq_subscribe()
147 cccr = sdio_f0_readb(bus->func, SDIO_CCCR_IENx, NULL); in wfx_sdio_irq_subscribe()
149 cccr |= BIT(bus->func->num); in wfx_sdio_irq_subscribe()
150 sdio_f0_writeb(bus->func, cccr, SDIO_CCCR_IENx, NULL); in wfx_sdio_irq_subscribe()
151 sdio_release_host(bus->func); in wfx_sdio_irq_subscribe()
157 struct wfx_sdio_priv *bus = priv; in wfx_sdio_irq_unsubscribe() local
160 if (bus->of_irq) in wfx_sdio_irq_unsubscribe()
161 devm_free_irq(&bus->func->dev, bus->of_irq, bus); in wfx_sdio_irq_unsubscribe()
162 sdio_claim_host(bus->func); in wfx_sdio_irq_unsubscribe()
163 ret = sdio_release_irq(bus->func); in wfx_sdio_irq_unsubscribe()
164 sdio_release_host(bus->func); in wfx_sdio_irq_unsubscribe()
170 struct wfx_sdio_priv *bus = priv; in wfx_sdio_align_size() local
172 return sdio_align_size(bus->func, size); in wfx_sdio_align_size()
198 struct wfx_sdio_priv *bus; in wfx_sdio_probe() local
212 bus = devm_kzalloc(&func->dev, sizeof(*bus), GFP_KERNEL); in wfx_sdio_probe()
213 if (!bus) in wfx_sdio_probe()
216 bus->func = func; in wfx_sdio_probe()
217 bus->of_irq = irq_of_parse_and_map(np, 0); in wfx_sdio_probe()
218 sdio_set_drvdata(func, bus); in wfx_sdio_probe()
228 bus->core = wfx_init_common(&func->dev, pdata, &wfx_sdio_hwbus_ops, bus); in wfx_sdio_probe()
229 if (!bus->core) { in wfx_sdio_probe()
234 ret = wfx_probe(bus->core); in wfx_sdio_probe()
249 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_remove() local
251 wfx_release(bus->core); in wfx_sdio_remove()