Home
last modified time | relevance | path

Searched full:fifo (Results 1 – 25 of 2401) sorted by relevance

12345678910>>...97

/Linux-v6.1/lib/
Dkfifo.c3 * A generic kernel FIFO implementation
17 * internal helper to calculate the unused elements in a fifo
19 static inline unsigned int kfifo_unused(struct __kfifo *fifo) in kfifo_unused() argument
21 return (fifo->mask + 1) - (fifo->in - fifo->out); in kfifo_unused()
24 int __kfifo_alloc(struct __kfifo *fifo, unsigned int size, in __kfifo_alloc() argument
33 fifo->in = 0; in __kfifo_alloc()
34 fifo->out = 0; in __kfifo_alloc()
35 fifo->esize = esize; in __kfifo_alloc()
38 fifo->data = NULL; in __kfifo_alloc()
39 fifo->mask = 0; in __kfifo_alloc()
[all …]
/Linux-v6.1/include/linux/
Dkfifo.h3 * A generic kernel FIFO implementation
12 * How to porting drivers to the new generic FIFO API:
31 * and one writer is using the fifo and no kfifo_reset() will be called.
98 * helper macro to distinguish between real in place fifo where the fifo
99 * array is a part of the structure and the fifo type where the array is
100 * outside of the fifo structure.
102 #define __is_kfifo_ptr(fifo) \ argument
103 (sizeof(*fifo) == sizeof(STRUCT_KFIFO_PTR(typeof(*(fifo)->type))))
106 * DECLARE_KFIFO_PTR - macro to declare a fifo pointer object
107 * @fifo: name of the declared fifo
[all …]
/Linux-v6.1/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
Dbase.c37 nvkm_fifo_recover_chan(struct nvkm_fifo *fifo, int chid) in nvkm_fifo_recover_chan() argument
40 if (WARN_ON(!fifo->func->recover_chan)) in nvkm_fifo_recover_chan()
42 spin_lock_irqsave(&fifo->lock, flags); in nvkm_fifo_recover_chan()
43 fifo->func->recover_chan(fifo, chid); in nvkm_fifo_recover_chan()
44 spin_unlock_irqrestore(&fifo->lock, flags); in nvkm_fifo_recover_chan()
48 nvkm_fifo_pause(struct nvkm_fifo *fifo, unsigned long *flags) in nvkm_fifo_pause() argument
50 return fifo->func->pause(fifo, flags); in nvkm_fifo_pause()
54 nvkm_fifo_start(struct nvkm_fifo *fifo, unsigned long *flags) in nvkm_fifo_start() argument
56 return fifo->func->start(fifo, flags); in nvkm_fifo_start()
60 nvkm_fifo_fault(struct nvkm_fifo *fifo, struct nvkm_fault_data *info) in nvkm_fifo_fault() argument
[all …]
DKbuild2 nvkm-y += nvkm/engine/fifo/base.o
3 nvkm-y += nvkm/engine/fifo/nv04.o
4 nvkm-y += nvkm/engine/fifo/nv10.o
5 nvkm-y += nvkm/engine/fifo/nv17.o
6 nvkm-y += nvkm/engine/fifo/nv40.o
7 nvkm-y += nvkm/engine/fifo/nv50.o
8 nvkm-y += nvkm/engine/fifo/g84.o
9 nvkm-y += nvkm/engine/fifo/gf100.o
10 nvkm-y += nvkm/engine/fifo/gk104.o
11 nvkm-y += nvkm/engine/fifo/gk110.o
[all …]
Dgk104.c40 gk104_fifo_engine_status(struct gk104_fifo *fifo, int engn, in gk104_fifo_engine_status() argument
43 struct nvkm_engine *engine = fifo->engine[engn].engine; in gk104_fifo_engine_status()
44 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; in gk104_fifo_engine_status()
90 struct gk104_fifo *fifo = gk104_fifo(base); in gk104_fifo_class_new() local
91 if (oclass->engn == &fifo->func->chan) { in gk104_fifo_class_new()
93 return user->ctor(fifo, oclass, argv, argc, pobject); in gk104_fifo_class_new()
95 if (oclass->engn == &fifo->func->user) { in gk104_fifo_class_new()
107 struct gk104_fifo *fifo = gk104_fifo(base); in gk104_fifo_class_get() local
110 if (fifo->func->user.ctor && c++ == index) { in gk104_fifo_class_get()
111 oclass->base = fifo->func->user.user; in gk104_fifo_class_get()
[all …]
Dgf100.c37 gf100_fifo_uevent_init(struct nvkm_fifo *fifo) in gf100_fifo_uevent_init() argument
39 struct nvkm_device *device = fifo->engine.subdev.device; in gf100_fifo_uevent_init()
44 gf100_fifo_uevent_fini(struct nvkm_fifo *fifo) in gf100_fifo_uevent_fini() argument
46 struct nvkm_device *device = fifo->engine.subdev.device; in gf100_fifo_uevent_fini()
51 gf100_fifo_runlist_commit(struct gf100_fifo *fifo) in gf100_fifo_runlist_commit() argument
54 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; in gf100_fifo_runlist_commit()
60 mutex_lock(&fifo->base.mutex); in gf100_fifo_runlist_commit()
61 cur = fifo->runlist.mem[fifo->runlist.active]; in gf100_fifo_runlist_commit()
62 fifo->runlist.active = !fifo->runlist.active; in gf100_fifo_runlist_commit()
65 list_for_each_entry(chan, &fifo->chan, head) { in gf100_fifo_runlist_commit()
[all …]
Dtu102.c38 tu102_fifo_runlist_commit(struct gk104_fifo *fifo, int runl, in tu102_fifo_runlist_commit() argument
41 struct nvkm_device *device = fifo->base.engine.subdev.device; in tu102_fifo_runlist_commit()
89 tu102_fifo_pbdma_init(struct gk104_fifo *fifo) in tu102_fifo_pbdma_init() argument
91 struct nvkm_device *device = fifo->base.engine.subdev.device; in tu102_fifo_pbdma_init()
92 const u32 mask = (1 << fifo->pbdma_nr) - 1; in tu102_fifo_pbdma_init()
121 struct gk104_fifo *fifo = container_of(w, typeof(*fifo), recover.work); in tu102_fifo_recover_work() local
122 struct nvkm_device *device = fifo->base.engine.subdev.device; in tu102_fifo_recover_work()
128 spin_lock_irqsave(&fifo->base.lock, flags); in tu102_fifo_recover_work()
129 runm = fifo->recover.runm; in tu102_fifo_recover_work()
130 engm = fifo->recover.engm; in tu102_fifo_recover_work()
[all …]
Dnv50.c30 nv50_fifo_runlist_update_locked(struct nv50_fifo *fifo) in nv50_fifo_runlist_update_locked() argument
32 struct nvkm_device *device = fifo->base.engine.subdev.device; in nv50_fifo_runlist_update_locked()
36 cur = fifo->runlist[fifo->cur_runlist]; in nv50_fifo_runlist_update_locked()
37 fifo->cur_runlist = !fifo->cur_runlist; in nv50_fifo_runlist_update_locked()
40 for (i = 0, p = 0; i < fifo->base.nr; i++) { in nv50_fifo_runlist_update_locked()
52 nv50_fifo_runlist_update(struct nv50_fifo *fifo) in nv50_fifo_runlist_update() argument
54 mutex_lock(&fifo->base.mutex); in nv50_fifo_runlist_update()
55 nv50_fifo_runlist_update_locked(fifo); in nv50_fifo_runlist_update()
56 mutex_unlock(&fifo->base.mutex); in nv50_fifo_runlist_update()
62 struct nv50_fifo *fifo = nv50_fifo(base); in nv50_fifo_oneinit() local
[all …]
Ddmanv04.c39 struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem; in nv04_fifo_dma_object_dtor()
41 mutex_lock(&chan->fifo->base.mutex); in nv04_fifo_dma_object_dtor()
43 mutex_unlock(&chan->fifo->base.mutex); in nv04_fifo_dma_object_dtor()
51 struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem; in nv04_fifo_dma_object_ctor()
66 mutex_lock(&chan->fifo->base.mutex); in nv04_fifo_dma_object_ctor()
69 mutex_unlock(&chan->fifo->base.mutex); in nv04_fifo_dma_object_ctor()
77 struct nv04_fifo *fifo = chan->fifo; in nv04_fifo_dma_fini() local
78 struct nvkm_device *device = fifo->base.engine.subdev.device; in nv04_fifo_dma_fini()
82 u32 mask = fifo->base.nr - 1; in nv04_fifo_dma_fini()
86 /* prevent fifo context switches */ in nv04_fifo_dma_fini()
[all …]
/Linux-v6.1/sound/soc/meson/
Daxg-fifo.c16 #include "axg-fifo.h"
20 * capture frontend DAI. The logic behind this two types of fifo is very
67 static void __dma_enable(struct axg_fifo *fifo, bool enable) in __dma_enable() argument
69 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_DMA_EN, in __dma_enable()
76 struct axg_fifo *fifo = axg_fifo_data(ss); in axg_fifo_pcm_trigger() local
82 __dma_enable(fifo, true); in axg_fifo_pcm_trigger()
87 __dma_enable(fifo, false); in axg_fifo_pcm_trigger()
100 struct axg_fifo *fifo = axg_fifo_data(ss); in axg_fifo_pcm_pointer() local
104 regmap_read(fifo->map, FIFO_STATUS2, &addr); in axg_fifo_pcm_pointer()
115 struct axg_fifo *fifo = axg_fifo_data(ss); in axg_fifo_pcm_hw_params() local
[all …]
Daiu-fifo.c13 #include "aiu-fifo.h"
37 struct aiu_fifo *fifo = dai->playback_dma_data; in aiu_fifo_pointer() local
41 addr = snd_soc_component_read(component, fifo->mem_offset + AIU_MEM_RD); in aiu_fifo_pointer()
49 struct aiu_fifo *fifo = dai->playback_dma_data; in aiu_fifo_enable() local
54 fifo->mem_offset + AIU_MEM_CONTROL, in aiu_fifo_enable()
83 struct aiu_fifo *fifo = dai->playback_dma_data; in aiu_fifo_prepare() local
86 fifo->mem_offset + AIU_MEM_CONTROL, in aiu_fifo_prepare()
90 fifo->mem_offset + AIU_MEM_CONTROL, in aiu_fifo_prepare()
101 struct aiu_fifo *fifo = dai->playback_dma_data; in aiu_fifo_hw_params() local
104 /* Setup the fifo boundaries */ in aiu_fifo_hw_params()
[all …]
/Linux-v6.1/drivers/staging/axis-fifo/
Daxis-fifo.c3 * Xilinx AXIS FIFO: interface to the Xilinx AXI-Stream FIFO IP core
93 #define XLLF_INT_TFPF_MASK 0x00400000 /* Tx FIFO Programmable Full */
94 #define XLLF_INT_TFPE_MASK 0x00200000 /* Tx FIFO Programmable Empty */
95 #define XLLF_INT_RFPF_MASK 0x00100000 /* Rx FIFO Programmable Full */
96 #define XLLF_INT_RFPE_MASK 0x00080000 /* Rx FIFO Programmable Empty */
128 unsigned int rx_fifo_depth; /* max words in the receive fifo */
129 unsigned int tx_fifo_depth; /* max words in the transmit fifo */
130 int has_rx_fifo; /* whether the IP has the rx fifo enabled */
131 int has_tx_fifo; /* whether the IP has the tx fifo enabled */
152 struct axis_fifo *fifo = dev_get_drvdata(dev); in sysfs_write() local
[all …]
/Linux-v6.1/drivers/usb/renesas_usbhs/
Dfifo.c98 struct usbhs_fifo *fifo);
99 static struct dma_chan *usbhsf_dma_chan_get(struct usbhs_fifo *fifo,
109 struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe); in usbhs_pkt_pop() local
123 if (fifo) in usbhs_pkt_pop()
124 chan = usbhsf_dma_chan_get(fifo, pkt); in usbhs_pkt_pop()
141 if (fifo) in usbhs_pkt_pop()
142 usbhsf_fifo_unselect(pipe, fifo); in usbhs_pkt_pop()
255 * FIFO ctrl
258 struct usbhs_fifo *fifo) in usbhsf_send_terminator() argument
262 usbhs_bset(priv, fifo->ctr, BVAL, BVAL); in usbhsf_send_terminator()
[all …]
/Linux-v6.1/drivers/iio/imu/inv_icm42600/
Dinv_icm42600_buffer.c19 /* FIFO header: 1 byte */
51 /* FIFO empty */ in inv_icm42600_fifo_decode_packet()
104 if (st->fifo.en & INV_ICM42600_SENSOR_GYRO) in inv_icm42600_buffer_update_fifo_period()
109 if (st->fifo.en & INV_ICM42600_SENSOR_ACCEL) in inv_icm42600_buffer_update_fifo_period()
119 st->fifo.period = period; in inv_icm42600_buffer_update_fifo_period()
128 /* update only FIFO EN bits */ in inv_icm42600_buffer_set_fifo_en()
146 st->fifo.en = fifo_en; in inv_icm42600_buffer_set_fifo_en()
181 * inv_icm42600_buffer_update_watermark - update watermark FIFO threshold
186 * FIFO watermark threshold is computed based on the required watermark values
199 * to the FIFO frequency. Beware that this is only true because we are not
[all …]
/Linux-v6.1/drivers/platform/mellanox/
Dmlxbf-tmfifo.c38 /* Virtual devices sharing the TM FIFO. */
67 * @fifo: pointer to the tmfifo structure
83 struct mlxbf_tmfifo *fifo; member
113 * @tx_buf: tx buffer used to buffer data before writing into the FIFO
129 * @fifo: pointer to the tmfifo structure
134 struct mlxbf_tmfifo *fifo; member
143 * @rx_base: mapped register base address for the Rx FIFO
144 * @tx_base: mapped register base address for the Tx FIFO
145 * @rx_fifo_size: number of entries of the Rx FIFO
146 * @tx_fifo_size: number of entries of the Tx FIFO
[all …]
/Linux-v6.1/drivers/md/bcache/
Dutil.h120 #define fifo_for_each(c, fifo, iter) \ argument
121 for (iter = (fifo)->front; \
122 c = (fifo)->data[iter], iter != (fifo)->back; \
123 iter = (iter + 1) & (fifo)->mask)
125 #define __init_fifo(fifo, gfp) \ argument
128 BUG_ON(!(fifo)->size); \
130 _allocated_size = roundup_pow_of_two((fifo)->size + 1); \
131 _bytes = _allocated_size * sizeof(*(fifo)->data); \
133 (fifo)->mask = _allocated_size - 1; \
134 (fifo)->front = (fifo)->back = 0; \
[all …]
/Linux-v6.1/drivers/usb/gadget/udc/
Dfotg210.h47 /* Cx configuration and FIFO Empty Status register(0x120) */
49 #define DCFESR_FIFO_EMPTY(fifo) (1 << 8 << (fifo)) argument
76 #define DMISGR1_MF_IN_INT(fifo) (1 << (16 + (fifo))) argument
85 #define DMISGR1_MF_OUTSPK_INT(fifo) (0x3 << (fifo) * 2) argument
109 #define DISGR1_OUT_INT(fifo) (1 << ((fifo) * 2)) argument
110 #define DISGR1_SPK_INT(fifo) (1 << 1 << ((fifo) * 2)) argument
111 #define DISGR1_IN_INT(fifo) (1 << 16 << (fifo)) argument
163 /* Device FIFO Map Register (0x1A8) */
165 #define FIFOMAP_DIROUT(fifo) (0x0 << 4 << (fifo) * 8) argument
166 #define FIFOMAP_DIRIN(fifo) (0x1 << 4 << (fifo) * 8) argument
[all …]
/Linux-v6.1/sound/core/seq/
Dseq_fifo.h3 * ALSA sequencer FIFO
13 /* === FIFO === */
16 struct snd_seq_pool *pool; /* FIFO pool */
17 struct snd_seq_event_cell *head; /* pointer to head of fifo */
18 struct snd_seq_event_cell *tail; /* pointer to tail of fifo */
27 /* create new fifo (constructor) */
30 /* delete fifo (destructor) */
34 /* enqueue event to fifo */
37 /* lock fifo from release */
38 #define snd_seq_fifo_lock(fifo) snd_use_lock_use(&(fifo)->use_lock) argument
[all …]
/Linux-v6.1/drivers/net/ethernet/intel/fm10k/
Dfm10k_mbx.c7 * 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()
17 fifo->tail = 0; in fm10k_fifo_init()
21 * fm10k_fifo_used - Retrieve used space in FIFO
[all …]
/Linux-v6.1/arch/powerpc/platforms/powernv/
Dvas-fault.c21 * The maximum FIFO size for fault window can be 8MB
22 * (VAS_RX_FIFO_SIZE_MAX). Using 4MB FIFO since each VAS
24 * 8MB FIFO can be used if expects more faults for each VAS
32 unsigned long *fifo = entry; in dump_fifo() local
35 pr_err("Fault fifo size %d, Max crbs %d\n", vinst->fault_fifo_size, in dump_fifo()
38 /* Dump 10 CRB entries or until end of FIFO */ in dump_fifo()
39 pr_err("Fault FIFO Dump:\n"); in dump_fifo()
40 for (i = 0; i < 10*(CRB_SIZE/8) && fifo < end; i += 4, fifo += 4) { in dump_fifo()
42 i, fifo, *fifo, *(fifo+1), *(fifo+2), *(fifo+3)); in dump_fifo()
47 * Process valid CRBs in fault FIFO.
[all …]
/Linux-v6.1/drivers/isdn/hardware/mISDN/
Dhfcsusb.c693 conhdlc = 8; /* enable FIFO */ in hfcsusb_setup_bch()
799 hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len, in hfcsusb_rx_frame() argument
802 struct hfcsusb *hw = fifo->hw; in hfcsusb_rx_frame()
805 int fifon = fifo->fifonum; in hfcsusb_rx_frame()
811 printk(KERN_DEBUG "%s: %s: fifo(%i) len(%i) " in hfcsusb_rx_frame()
814 fifo->dch, fifo->bch, fifo->ech); in hfcsusb_rx_frame()
819 if ((!!fifo->dch + !!fifo->bch + !!fifo->ech) != 1) { in hfcsusb_rx_frame()
826 if (fifo->dch) { in hfcsusb_rx_frame()
827 rx_skb = fifo->dch->rx_skb; in hfcsusb_rx_frame()
828 maxlen = fifo->dch->maxlen; in hfcsusb_rx_frame()
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/powerpc/fsl/
Dmpc5121-psc.txt8 fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
9 Controller node fsl,mpc5121-psc-fifo is required there:
19 PSC FIFO Controller and b is a field that represents an
23 - fsl,rx-fifo-size : the size of the RX fifo slice (a multiple of 4)
24 - fsl,tx-fifo-size : the size of the TX fifo slice (a multiple of 4)
30 for that is fsl,mpc5121-psc-spi. It requires a fsl,mpc5121-psc-fifo as well.
35 fsl,mpc512x-psc-fifo node
39 - compatible : Should be "fsl,<soc>-psc-fifo"
42 FIFO Controller
44 PSC FIFO Controller and b is a field that represents an
[all …]
/Linux-v6.1/sound/arm/
Dpxa2xx-ac97-regs.h10 #define POCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
11 #define POCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
14 #define PICR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
15 #define PICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
18 #define MCCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
19 #define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
38 #define POSR_FIFOE (1 << 4) /* FIFO error */
39 #define POSR_FSR (1 << 2) /* FIFO Service Request */
42 #define PISR_FIFOE (1 << 4) /* FIFO error */
44 #define PISR_FSR (1 << 2) /* FIFO Service Request */
[all …]
/Linux-v6.1/drivers/spi/
Dspi-mpc512x-psc.c59 struct mpc512x_psc_fifo __iomem *fifo; member
163 struct mpc512x_psc_fifo __iomem *fifo = mps->fifo; in mpc512x_psc_spi_transfer_rxtx() local
183 fifosz = MPC512x_PSC_FIFO_SZ(in_be32(&fifo->txsz)); in mpc512x_psc_spi_transfer_rxtx()
185 fifosz = MPC512x_PSC_FIFO_SZ(in_be32(&fifo->rxsz)); in mpc512x_psc_spi_transfer_rxtx()
186 fifosz -= in_be32(&fifo->rxcnt) + 1; in mpc512x_psc_spi_transfer_rxtx()
190 /* fill the TX FIFO */ in mpc512x_psc_spi_transfer_rxtx()
194 setbits32(&fifo->txcmd, in mpc512x_psc_spi_transfer_rxtx()
196 out_8(&fifo->txdata_8, data); in mpc512x_psc_spi_transfer_rxtx()
200 /* have the ISR trigger when the TX FIFO is empty */ in mpc512x_psc_spi_transfer_rxtx()
202 out_be32(&fifo->txisr, MPC512x_PSC_FIFO_EMPTY); in mpc512x_psc_spi_transfer_rxtx()
[all …]
/Linux-v6.1/drivers/net/ethernet/google/gve/
Dgve_tx.c26 * gve_tx_fifo_* manages the Registered Segment as a FIFO - clients must
30 static int gve_tx_fifo_init(struct gve_priv *priv, struct gve_tx_fifo *fifo) in gve_tx_fifo_init() argument
32 fifo->base = vmap(fifo->qpl->pages, fifo->qpl->num_entries, VM_MAP, in gve_tx_fifo_init()
34 if (unlikely(!fifo->base)) { in gve_tx_fifo_init()
35 netif_err(priv, drv, priv->dev, "Failed to vmap fifo, qpl_id = %d\n", in gve_tx_fifo_init()
36 fifo->qpl->id); in gve_tx_fifo_init()
40 fifo->size = fifo->qpl->num_entries * PAGE_SIZE; in gve_tx_fifo_init()
41 atomic_set(&fifo->available, fifo->size); in gve_tx_fifo_init()
42 fifo->head = 0; in gve_tx_fifo_init()
46 static void gve_tx_fifo_release(struct gve_priv *priv, struct gve_tx_fifo *fifo) in gve_tx_fifo_release() argument
[all …]

12345678910>>...97