Home
last modified time | relevance | path

Searched +full:fifo +full:- +full:size (Results 1 – 25 of 1042) sorted by relevance

12345678910>>...42

/linux/lib/
H A Dkfifo.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * A generic kernel FIFO implementation
8 #include <linux/dma-mapping.h>
18 * internal helper to calculate the unused elements in a fifo
20 static inline unsigned int kfifo_unused(struct __kfifo *fifo) in kfifo_unused()
22 return (fifo in kfifo_unused()
19 kfifo_unused(struct __kfifo * fifo) kfifo_unused() argument
24 __kfifo_alloc(struct __kfifo * fifo,unsigned int size,size_t esize,gfp_t gfp_mask) __kfifo_alloc() argument
55 __kfifo_free(struct __kfifo * fifo) __kfifo_free() argument
66 __kfifo_init(struct __kfifo * fifo,void * buffer,unsigned int size,size_t esize) __kfifo_init() argument
67 __kfifo_init(struct __kfifo * fifo,void * buffer,unsigned int size,size_t esize) __kfifo_init() argument
89 kfifo_copy_in(struct __kfifo * fifo,const void * src,unsigned int len,unsigned int off) kfifo_copy_in() argument
92 unsigned int size = fifo->mask + 1; kfifo_copy_in() local
113 __kfifo_in(struct __kfifo * fifo,const void * buf,unsigned int len) __kfifo_in() argument
128 kfifo_copy_out(struct __kfifo * fifo,void * dst,unsigned int len,unsigned int off) kfifo_copy_out() argument
131 unsigned int size = fifo->mask + 1; kfifo_copy_out() local
152 __kfifo_out_peek(struct __kfifo * fifo,void * buf,unsigned int len) __kfifo_out_peek() argument
166 __kfifo_out(struct __kfifo * fifo,void * buf,unsigned int len) __kfifo_out() argument
175 kfifo_copy_from_user(struct __kfifo * fifo,const void __user * from,unsigned int len,unsigned int off,unsigned int * copied) kfifo_copy_from_user() argument
179 unsigned int size = fifo->mask + 1; kfifo_copy_from_user() local
210 __kfifo_from_user(struct __kfifo * fifo,const void __user * from,unsigned long len,unsigned int * copied) __kfifo_from_user() argument
236 kfifo_copy_to_user(struct __kfifo * fifo,void __user * to,unsigned int len,unsigned int off,unsigned int * copied) kfifo_copy_to_user() argument
241 unsigned int size = fifo->mask + 1; kfifo_copy_to_user() local
270 __kfifo_to_user(struct __kfifo * fifo,void __user * to,unsigned long len,unsigned int * copied) __kfifo_to_user() argument
334 setup_sgl(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len,unsigned int off) setup_sgl() argument
337 unsigned int size = fifo->mask + 1; setup_sgl() local
356 __kfifo_dma_in_prepare(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len) __kfifo_dma_in_prepare() argument
369 __kfifo_dma_out_prepare(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len) __kfifo_dma_out_prepare() argument
398 __kfifo_peek_n(struct __kfifo * fifo,size_t recsize) __kfifo_peek_n() argument
421 __kfifo_poke_n(struct __kfifo * fifo,unsigned int n,size_t recsize) __kfifo_poke_n() argument
432 __kfifo_len_r(struct __kfifo * fifo,size_t recsize) __kfifo_len_r() argument
438 __kfifo_in_r(struct __kfifo * fifo,const void * buf,unsigned int len,size_t recsize) __kfifo_in_r() argument
452 kfifo_out_copy_r(struct __kfifo * fifo,void * buf,unsigned int len,size_t recsize,unsigned int * n) kfifo_out_copy_r() argument
464 __kfifo_out_peek_r(struct __kfifo * fifo,void * buf,unsigned int len,size_t recsize) __kfifo_out_peek_r() argument
476 __kfifo_out_r(struct __kfifo * fifo,void * buf,unsigned int len,size_t recsize) __kfifo_out_r() argument
490 __kfifo_skip_r(struct __kfifo * fifo,size_t recsize) __kfifo_skip_r() argument
499 __kfifo_from_user_r(struct __kfifo * fifo,const void __user * from,unsigned long len,unsigned int * copied,size_t recsize) __kfifo_from_user_r() argument
523 __kfifo_to_user_r(struct __kfifo * fifo,void __user * to,unsigned long len,unsigned int * copied,size_t recsize) __kfifo_to_user_r() argument
548 __kfifo_dma_in_prepare_r(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len,size_t recsize) __kfifo_dma_in_prepare_r() argument
562 __kfifo_dma_in_finish_r(struct __kfifo * fifo,unsigned int len,size_t recsize) __kfifo_dma_in_finish_r() argument
571 __kfifo_dma_out_prepare_r(struct __kfifo * fifo,struct scatterlist * sgl,int nents,unsigned int len,size_t recsize) __kfifo_dma_out_prepare_r() argument
585 __kfifo_dma_out_finish_r(struct __kfifo * fifo,size_t recsize) __kfifo_dma_out_finish_r() argument
[all...]
/linux/include/linux/
H A Dkfifo.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * A generic kernel FIFO implementation
12 * How to porting drivers to the new generic FIFO API:
14 * - Modify the declaration of the "struct kfifo *" object into a
15 * in-place "struct kfifo" object
16 * - Init the in-place object with kfifo_alloc() or kfifo_init()
17 * Note: The address of the in-place "struct kfifo" object must be
19 * - Replace the use of __kfifo_put into kfifo_in and __kfifo_get
21 * - Replace the use of kfifo_put into kfifo_in_spinlocked and kfifo_get
26 * - The formerly __kfifo_* functions are renamed into kfifo_*
[all …]
H A Dpxa2xx_ssp.h1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * This driver supports the following PXA CPU/SSP ports:-
49 #define SSCR0_DSS GENMASK(3, 0) /* Data Size Select (mask) */
50 #define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */
60 #define SSCR0_EDSS BIT(20) /* Extended data size select */
62 #define SSCR0_RIM BIT(22) /* Receive FIFO overrun interrupt mask */
63 #define SSCR0_TUM BIT(23) /* Transmit FIFO underrun interrupt mask */
65 #define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */
66 #define SSCR0_FPCKE BIT(29) /* FIFO packing enable */
70 #define SSCR1_RIE BIT(0) /* Receive FIFO Interrupt Enable */
[all …]
/linux/drivers/platform/mellanox/
H A Dmlxbf-tmfifo.c1 // SPDX-License-Identifier: GPL-2.0+
24 #include "mlxbf-tmfifo-regs.h"
26 /* Vring size. */
29 /* Console Tx buffer size. */
35 /* House-keeping timer interval. */
38 /* Virtual devices sharing the TM FIFO. */
53 /* ACPI UID for BlueField-3. */
59 * struct mlxbf_tmfifo_vring - Structure of the TmFifo virtual ring
71 * @num: vring size (number of descriptors)
72 * @align: vring alignment size
[all …]
/linux/drivers/md/bcache/
H A Dutil.h1 /* SPDX-License-Identifier: GPL-2.0 */
35 size_t size, used; \
42 (heap)->used = 0; \
43 (heap)->size = (_size); \
44 _bytes = (heap)->size * sizeof(*(heap)->data); \
45 (heap)->data = kvmalloc(_bytes, (gfp) & GFP_KERNEL); \
46 (heap)->data; \
51 kvfree((heap)->data); \
52 (heap)->data = NULL; \
55 #define heap_swap(h, i, j) swap((h)->data[i], (h)->data[j])
[all …]
/linux/Documentation/devicetree/bindings/powerpc/fsl/
H A Dmpc5121-psc.txt4 ----------------
7 are specified by fsl,mpc5121-psc-uart nodes in the
8 fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
9 Controller node fsl,mpc5121-psc-fifo is required there:
11 fsl,mpc512x-psc-uart nodes
12 --------------------------
15 - compatible : Should contain "fsl,<soc>-psc-uart" and "fsl,<soc>-psc"
17 - reg : Offset and length of the register set for the PSC device
18 - interrupts : <a b> where a is the interrupt number of the
19 PSC FIFO Controller and b is a field that represents an
[all …]
/linux/drivers/net/ethernet/intel/fm10k/
H A Dfm10k_mbx.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2013 - 2019 Intel Corporation. */
7 * fm10k_fifo_init - Initialize a message FIFO
8 * @fifo: pointer to FIFO
9 * @buffer: pointer to memory to be used to store FIFO
10 * @size: maximum message size to store in FIFO, must be 2^n - 1
12 static void fm10k_fifo_init(struct fm10k_mbx_fifo *fifo, u32 *buffer, u16 size) in fm10k_fifo_init() argument
14 fifo->buffer = buffer; in fm10k_fifo_init()
15 fifo->size = size; in fm10k_fifo_init()
16 fifo->head = 0; in fm10k_fifo_init()
[all …]
/linux/sound/soc/meson/
H A Daiu-fifo.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/dma-mapping.h>
11 #include <sound/soc-dai.h>
13 #include "aiu-fifo.h"
37 struct aiu_fifo *fifo = snd_soc_dai_dma_data_get_playback(dai); in aiu_fifo_pointer() local
38 struct snd_pcm_runtime *runtime = substream->runtime; in aiu_fifo_pointer()
41 addr = snd_soc_component_read(component, fifo->mem_offset + AIU_MEM_RD); in aiu_fifo_pointer()
43 return bytes_to_frames(runtime, addr - (unsigned int)runtime->dma_addr); in aiu_fifo_pointer()
48 struct snd_soc_component *component = dai->component; in aiu_fifo_enable()
49 struct aiu_fifo *fifo = snd_soc_dai_dma_data_get_playback(dai); in aiu_fifo_enable() local
[all …]
H A Daxg-fifo.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
15 #include <sound/soc-dai.h>
17 #include "axg-fifo.h"
21 * capture frontend DAI. The logic behind this two types of fifo is very
65 return dai->dev; in axg_fifo_dev()
68 static void __dma_enable(struct axg_fifo *fifo, bool enable) in __dma_enable() argument
70 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_DMA_EN, in __dma_enable()
77 struct axg_fifo *fifo = axg_fifo_data(ss); in axg_fifo_pcm_trigger() local
83 __dma_enable(fifo, true); in axg_fifo_pcm_trigger()
88 __dma_enable(fifo, false); in axg_fifo_pcm_trigger()
[all …]
/linux/Documentation/devicetree/bindings/net/
H A Dibm,emac.txt8 correct clock-frequency property.
13 - device_type : "network"
15 - compatible : compatible list, contains 2 entries, first is
16 "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,
18 "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",
20 - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>
21 - reg : <registers mapping>
22 - local-mac-address : 6 bytes, MAC address
23 - mal-device : phandle of the associated McMAL node
24 - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated
[all …]
/linux/arch/powerpc/boot/dts/
H A Dmpc5121.dtsi1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2007-2008 Freescale Semiconductor Inc.
8 #include <dt-bindings/clock/mpc512x-clock.h>
10 /dts-v1/;
15 #address-cells = <1>;
16 #size-cells = <1>;
17 interrupt-parent = <&ipic>;
25 #address-cells = <1>;
26 #size-cells = <0>;
31 d-cache-line-size = <0x20>; /* 32 bytes */
[all …]
H A Deiger.dts11 /dts-v1/;
14 #address-cells = <2>;
15 #size-cells = <1>;
18 dcr-parent = <&{/cpus/cpu@0}>;
30 #address-cells = <1>;
31 #size-cells = <0>;
37 clock-frequency = <0>; /* Filled in by U-Boot */
38 timebase-frequency = <0>; /* Filled in by U-Boot */
39 i-cache-line-size = <32>;
40 d-cache-line-size = <32>;
[all …]
H A Darches.dts1 // SPDX-License-Identifier: GPL-2.0-or-later
17 /dts-v1/;
20 #address-cells = <2>;
21 #size-cells = <1>;
24 dcr-parent = <&{/cpus/cpu@0}>;
34 #address-cells = <1>;
35 #size-cells = <0>;
41 clock-frequency = <0>; /* Filled in by U-Boot */
42 timebase-frequency = <0>; /* Filled in by U-Boot */
43 i-cache-line-size = <32>;
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/
H A Dfifo.c22 #include <engine/fifo/priv.h>
23 #include <engine/fifo/cgrp.h>
24 #include <engine/fifo/chan.h>
25 #include <engine/fifo/chid.h>
26 #include <engine/fifo/runl.h>
38 #include "nvrm/fifo.h"
44 struct nvkm_gsp *gsp = chan->rm.object.client->gsp; in r535_chan_doorbell_handle()
46 return gsp->rm->gpu->fifo.chan.doorbell_handle(chan); in r535_chan_doorbell_handle()
62 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in r535_chan_ramfc_clear() local
64 nvkm_gsp_rm_free(&chan->rm.object); in r535_chan_ramfc_clear()
[all …]
/linux/drivers/net/wireless/realtek/rtw88/
H A Dmac.c1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
2 /* Copyright(c) 2018-2019 Realtek Corporation
94 return -ETIMEDOUT; in rtw_mac_pre_system_cfg()
107 return -EINVAL; in rtw_mac_pre_system_cfg()
156 if (cmd->base == RTW_PWR_ADDR_SDIO) in rtw_pwr_cmd_polling()
157 offset = cmd->offset | SDIO_LOCAL_OFFSET; in rtw_pwr_cmd_polling()
159 offset = cmd->offset; in rtw_pwr_cmd_polling()
161 if (do_pwr_poll_cmd(rtwdev, offset, cmd->mask, cmd->value)) in rtw_pwr_cmd_polling()
169 if (rtwdev->chip->id == RTW_CHIP_TYPE_8723D) in rtw_pwr_cmd_polling()
173 if (rtwdev->chip->id == RTW_CHIP_TYPE_8723D) in rtw_pwr_cmd_polling()
[all …]
/linux/samples/kfifo/
H A Ddma-example.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Sample fifo dma implementation
12 #include <linux/dma-mapping.h>
15 * This module shows how to handle fifo dma operations.
18 /* fifo size in elements (bytes) */
21 static struct kfifo fifo; variable
30 printk(KERN_INFO "DMA fifo test start\n"); in example_init()
32 if (kfifo_alloc(&fifo, FIFO_SIZE, GFP_KERNEL)) { in example_init()
34 return -ENOMEM; in example_init()
37 printk(KERN_INFO "queue size: %u\n", kfifo_size(&fifo)); in example_init()
[all …]
H A Drecord-example.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Sample dynamic sized record fifo implementation
15 * This module shows how to create a variable sized record fifo.
18 /* fifo size in elements (bytes) */
22 #define PROC_FIFO "record-fifo"
31 * define DYNAMIC in this example for a dynamically allocated fifo.
33 * Otherwise the fifo storage will be a part of the fifo structure.
76 printk(KERN_INFO "record fifo test start\n"); in testfunc()
80 /* show the size of the next record in the fifo */ in testfunc()
81 printk(KERN_INFO "fifo peek len: %u\n", kfifo_peek_len(&test)); in testfunc()
[all …]
/linux/drivers/net/ethernet/google/gve/
H A Dgve_tx.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
4 * Copyright (C) 2015-2021 Google, Inc.
20 iowrite32be(val, &priv->db_bar2[be32_to_cpu(q_resources->db_index)]); in gve_tx_put_doorbell()
26 struct gve_tx_ring *tx = &priv->tx[tx_qid]; in gve_xdp_tx_flush()
28 gve_tx_put_doorbell(priv, tx->q_resources, tx->req); in gve_xdp_tx_flush()
35 * gve_tx_fifo_* manages the Registered Segment as a FIFO - clients must
39 static int gve_tx_fifo_init(struct gve_priv *priv, struct gve_tx_fifo *fifo) in gve_tx_fifo_init() argument
41 fifo->base = vmap(fifo->qpl->pages, fifo->qpl->num_entries, VM_MAP, in gve_tx_fifo_init()
43 if (unlikely(!fifo->base)) { in gve_tx_fifo_init()
44 netif_err(priv, drv, priv->dev, "Failed to vmap fifo, qpl_id = %d\n", in gve_tx_fifo_init()
[all …]
/linux/drivers/char/xilinx_hwicap/
H A Dfifo_icap.c24 * (c) Copyright 2007-2008 Xilinx Inc.
39 #define XHI_WF_OFFSET 0x100 /* Write FIFO */
40 #define XHI_RF_OFFSET 0x104 /* Read FIFO */
41 #define XHI_SZ_OFFSET 0x108 /* Size Register */
44 #define XHI_WFV_OFFSET 0x114 /* Write FIFO Vacancy Register */
45 #define XHI_RFO_OFFSET 0x118 /* Read FIFO Occupancy Register */
66 #define XHI_IPIXR_RFULL_MASK 0x00000008 /* Read FIFO Full */
67 #define XHI_IPIXR_WEMPTY_MASK 0x00000004 /* Write FIFO Empty */
68 #define XHI_IPIXR_RDP_MASK 0x00000002 /* Read FIFO half full */
69 #define XHI_IPIXR_WRP_MASK 0x00000001 /* Write FIFO half full */
[all …]
/linux/arch/powerpc/platforms/512x/
H A Dmpc512x_lpbfifo.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * The driver for Freescale MPC512x LocalPlus Bus FIFO
6 * Copyright (C) 2013-2015 Alexander Popov <alex.popov@linux.com>.
21 #include <linux/dma-direction.h>
22 #include <linux/dma-mapping.h>
30 u32 size; member
61 * mpc512x_lpbfifo_irq - IRQ handler for LPB FIFO
76 if (!req || req->dir == MPC512X_LPBFIFO_REQ_DIR_READ) { in mpc512x_lpbfifo_irq()
81 status = in_be32(&lpbfifo.regs->status); in mpc512x_lpbfifo_irq()
84 out_be32(&lpbfifo.regs->enable, in mpc512x_lpbfifo_irq()
[all …]
/linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs/
H A Dfifo.json7 "fifo"
17 "matchPattern": "qdisc bfifo 1: root.*limit [0-9]+b",
28 "fifo"
38 "matchPattern": "qdisc pfifo 1: root.*limit [0-9]+p",
49 "fifo"
59 "matchPattern": "qdisc bfifo ffff: root.*limit [0-9]+b",
67 "name": "Add bfifo qdisc on egress with queue size of 3000 bytes",
70 "fifo"
88 "name": "Add pfifo qdisc on egress with queue size of 3000 packets",
91 "fifo"
[all …]
/linux/arch/arm/boot/dts/microchip/
H A Dsam9x60.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * sam9x60.dtsi - Device Tree Include file for Microchip SAM9X60 SoC
10 #include <dt-bindings/dma/at91.h>
11 #include <dt-bindings/pinctrl/at91.h>
12 #include <dt-bindings/interrupt-controller/irq.h>
13 #include <dt-bindings/gpio/gpio.h>
14 #include <dt-bindings/clock/at91.h>
15 #include <dt-bindings/mfd/at91-usart.h>
16 #include <dt-bindings/mfd/atmel-flexcom.h>
19 #address-cells = <1>;
[all …]
/linux/drivers/rpmsg/
H A Dqcom_glink_smem.c1 // SPDX-License-Identifier: GPL-2.0
32 #define TX_BLOCKED_CMD_RESERVE 8 /* size of struct read_notif_request */
56 void *fifo; member
66 struct qcom_glink_smem *smem = pipe->smem; in glink_smem_rx_avail()
68 void *fifo; in glink_smem_rx_avail() local
72 if (!pipe->fifo) { in glink_smem_rx_avail()
73 fifo = qcom_smem_get(smem->remote_pid, in glink_smem_rx_avail()
75 if (IS_ERR(fifo)) { in glink_smem_rx_avail()
76 pr_err("failed to acquire RX fifo handle: %ld\n", in glink_smem_rx_avail()
77 PTR_ERR(fifo)); in glink_smem_rx_avail()
[all …]
/linux/drivers/net/ethernet/tehuti/
H A Dtehuti.c1 // SPDX-License-Identifier: GPL-2.0-or-later
12 * 1) RX Free Fifo - RXF - holds descriptors of empty buffers to accept incoming
13 * traffic. This Fifo is filled by SW and is readen by HW. Each descriptor holds
14 * info about buffer's location, size and ID. An ID field is used to identify a
15 * buffer when it's returned with data via RXD Fifo (see below)
16 * 2) RX Data Fifo - RXD - holds descriptors of full buffers. This Fifo is
18 * HW pops descriptor from RXF Fifo, stores ID, fills buffer with incoming data,
20 * pushes it into RXD Fifo and raises interrupt to indicate new RX data.
23 * One holds 1.5K packets and another - 26K packets. Depending on incoming
24 * packet size, HW desides on a RXF Fifo to pop buffer from. When packet is
[all …]
/linux/drivers/net/ethernet/sun/
H A Dsunhme.h1 /* SPDX-License-Identifier: GPL-2.0 */
38 #define GREG_STAT_ACNTEXP 0x00000004 /* Align-error counter expired */
39 #define GREG_STAT_CCNTEXP 0x00000008 /* CRC-error counter expired */
40 #define GREG_STAT_LCNTEXP 0x00000010 /* Length-error counter expired */
41 #define GREG_STAT_RFIFOVF 0x00000020 /* Receive FIFO overflow */
42 #define GREG_STAT_CVCNTEXP 0x00000040 /* Code-violation counter expired */
45 #define GREG_STAT_TFIFO_UND 0x00000200 /* Transmit FIFO underrun */
46 #define GREG_STAT_MAXPKTERR 0x00000400 /* Max-packet size error */
47 #define GREG_STAT_NCNTEXP 0x00000800 /* Normal-collision counter expired */
48 #define GREG_STAT_ECNTEXP 0x00001000 /* Excess-collision counter expired */
[all …]

12345678910>>...42