Lines Matching +full:spin +full:- +full:up

1 /* SPDX-License-Identifier: BSD-3-Clause */
54 MALLOC_DEFINE(M_ICE_OSDEP, "ice-osdep", "Intel(R) 100Gb Network Driver osdep allocations");
69 * ice_hw_to_dev - Given a hw private struct, find the associated device_t
84 return sc->dev;
88 * ice_debug - Log a debug message if the type is enabled
93 * Check if hw->debug_mask has enabled the given message type. If so, log the
103 if (!(mask & hw->debug_mask))
113 * ice_debug_array - Format and print an array of values to the console
134 if (!(mask & hw->debug_mask))
140 /* Make sure the row-size isn't too large */
148 * ice_info_fwlog - Format and print an array of values to the console
176 /* Make sure the row-size isn't too large */
184 * rd32 - Read a 32bit hardware register value
195 return bus_space_read_4(sc->bar0.tag, sc->bar0.handle, reg);
199 * rd64 - Read a 64bit hardware register value
205 * @pre For 32-bit builds, assumes that the 64bit register read can be
206 * safely broken up into two 32-bit register reads.
215 data = bus_space_read_8(sc->bar0.tag, sc->bar0.handle, reg);
221 data = bus_space_read_4(sc->bar0.tag, sc->bar0.handle, reg);
222 data |= ((uint64_t)bus_space_read_4(sc->bar0.tag, sc->bar0.handle, reg + 4)) << 32;
229 * wr32 - Write a 32bit hardware register
241 bus_space_write_4(sc->bar0.tag, sc->bar0.handle, reg, val);
245 * wr64 - Write a 64bit hardware register
252 * @pre For 32-bit builds, assumes that the 64bit register write can be safely
253 * broken up into two 32-bit register writes.
261 bus_space_write_8(sc->bar0.tag, sc->bar0.handle, reg, val);
271 bus_space_write_4(sc->bar0.tag, sc->bar0.handle, reg, lo_val);
272 bus_space_write_4(sc->bar0.tag, sc->bar0.handle, reg + 4, hi_val);
277 * ice_usec_delay - Delay for the specified number of microseconds
282 * that another thread can execute. Otherwise, use DELAY to spin the thread
295 * ice_msec_delay - Delay for the specified number of milliseconds
300 * that another thread can execute. Otherwise, use DELAY to spin the thread
313 * ice_msec_pause - pause (sleep) the thread for a time in milliseconds
325 * ice_msec_spin - Spin the thread for a time in milliseconds
341 * ice_dmamap_cb - Callback function DMA maps
354 *(bus_addr_t *) arg = segs->ds_addr;
359 * ice_alloc_dma_mem - Request OS to allocate DMA memory
386 &mem->tag);
393 err = bus_dmamem_alloc(mem->tag, (void **)&mem->va,
394 BUS_DMA_NOWAIT | BUS_DMA_ZERO, &mem->map);
401 err = bus_dmamap_load(mem->tag, mem->map, mem->va,
404 &mem->pa,
412 mem->size = size;
413 bus_dmamap_sync(mem->tag, mem->map,
415 return (mem->va);
417 bus_dmamem_free(mem->tag, mem->va, mem->map);
419 bus_dma_tag_destroy(mem->tag);
421 mem->map = NULL;
422 mem->tag = NULL;
427 * ice_free_dma_mem - Free DMA memory allocated by ice_alloc_dma_mem
437 bus_dmamap_sync(mem->tag, mem->map,
439 bus_dmamap_unload(mem->tag, mem->map);
440 bus_dmamem_free(mem->tag, mem->va, mem->map);
441 bus_dma_tag_destroy(mem->tag);
442 mem->map = NULL;
443 mem->tag = NULL;