xref: /linux/drivers/net/ethernet/freescale/fman/fman_muram.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */
2 /*
3  * Copyright 2008 - 2015 Freescale Semiconductor Inc.
4  */
5 
6 #ifndef __FM_MURAM_EXT
7 #define __FM_MURAM_EXT
8 
9 #include <linux/types.h>
10 
11 #define FM_MURAM_INVALID_ALLOCATION	-1
12 
13 /* Structure for FM MURAM information */
14 struct muram_info;
15 
16 struct muram_info *fman_muram_init(phys_addr_t base, size_t size);
17 
18 unsigned long fman_muram_offset_to_vbase(struct muram_info *muram,
19 					 unsigned long offset);
20 
21 unsigned long fman_muram_alloc(struct muram_info *muram, size_t size);
22 
23 void fman_muram_free_mem(struct muram_info *muram, unsigned long offset,
24 			 size_t size);
25 
26 #endif /* __FM_MURAM_EXT */
27