brintos

brintos / linux-shallow public Read only

0
0
Text · 717 B · fec549d Raw
35 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/*3 * Copyright (C) STMicroelectronics SA 20154 * Authors: Yannick Fertre <yannick.fertre@st.com>5 *          Hugues Fruchet <hugues.fruchet@st.com>6 */7 8#ifndef HVA_MEM_H9#define HVA_MEM_H10 11/**12 * struct hva_buffer - hva buffer13 *14 * @name:  name of requester15 * @paddr: physical address (for hardware)16 * @vaddr: virtual address (kernel can read/write)17 * @size:  size of buffer18 */19struct hva_buffer {20	const char		*name;21	dma_addr_t		paddr;22	void			*vaddr;23	u32			size;24};25 26int hva_mem_alloc(struct hva_ctx *ctx,27		  __u32 size,28		  const char *name,29		  struct hva_buffer **buf);30 31void hva_mem_free(struct hva_ctx *ctx,32		  struct hva_buffer *buf);33 34#endif /* HVA_MEM_H */35