Linux Audio

Check our new training course

Loading...
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* Copyright(c) 2013 - 2018 Intel Corporation. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 3
 4#ifndef _I40E_ALLOC_H_
 5#define _I40E_ALLOC_H_
 6
 7#include <linux/types.h>
 8
 9struct i40e_hw;
10
11/* memory allocation tracking */
12struct i40e_dma_mem {
13	void *va;
14	dma_addr_t pa;
15	u32 size;
16};
17
18struct i40e_virt_mem {
19	void *va;
20	u32 size;
 
21};
22
23/* prototype for functions used for dynamic memory allocation */
24int i40e_allocate_dma_mem(struct i40e_hw *hw,
25			  struct i40e_dma_mem *mem,
26			  u64 size, u32 alignment);
27int i40e_free_dma_mem(struct i40e_hw *hw,
28		      struct i40e_dma_mem *mem);
29int i40e_allocate_virt_mem(struct i40e_hw *hw,
30			   struct i40e_virt_mem *mem,
31			   u32 size);
32int i40e_free_virt_mem(struct i40e_hw *hw,
33		       struct i40e_virt_mem *mem);
 
34
35#endif /* _I40E_ALLOC_H_ */
v3.15
 1/*******************************************************************************
 2 *
 3 * Intel Ethernet Controller XL710 Family Linux Driver
 4 * Copyright(c) 2013 - 2014 Intel Corporation.
 5 *
 6 * This program is free software; you can redistribute it and/or modify it
 7 * under the terms and conditions of the GNU General Public License,
 8 * version 2, as published by the Free Software Foundation.
 9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program.  If not, see <http://www.gnu.org/licenses/>.
17 *
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
20 *
21 * Contact Information:
22 * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
23 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
24 *
25 ******************************************************************************/
26
27#ifndef _I40E_ALLOC_H_
28#define _I40E_ALLOC_H_
29
 
 
30struct i40e_hw;
31
32/* Memory allocation types */
33enum i40e_memory_type {
34	i40e_mem_arq_buf = 0,		/* ARQ indirect command buffer */
35	i40e_mem_asq_buf = 1,
36	i40e_mem_atq_buf = 2,		/* ATQ indirect command buffer */
37	i40e_mem_arq_ring = 3,		/* ARQ descriptor ring */
38	i40e_mem_atq_ring = 4,		/* ATQ descriptor ring */
39	i40e_mem_pd = 5,		/* Page Descriptor */
40	i40e_mem_bp = 6,		/* Backing Page - 4KB */
41	i40e_mem_bp_jumbo = 7,		/* Backing Page - > 4KB */
42	i40e_mem_reserved
43};
44
45/* prototype for functions used for dynamic memory allocation */
46i40e_status i40e_allocate_dma_mem(struct i40e_hw *hw,
47					    struct i40e_dma_mem *mem,
48					    enum i40e_memory_type type,
49					    u64 size, u32 alignment);
50i40e_status i40e_free_dma_mem(struct i40e_hw *hw,
51					struct i40e_dma_mem *mem);
52i40e_status i40e_allocate_virt_mem(struct i40e_hw *hw,
53					     struct i40e_virt_mem *mem,
54					     u32 size);
55i40e_status i40e_free_virt_mem(struct i40e_hw *hw,
56					 struct i40e_virt_mem *mem);
57
58#endif /* _I40E_ALLOC_H_ */