Lines Matching +full:multi +full:- +full:address

1 // SPDX-License-Identifier: GPL-2.0-only
7 * Copyright 2007-2008,2010 Freescale Semiconductor, Inc.
11 * Copyright (c) 1999-2001 Dan Malek <dan@embeddedalley.com>
41 /* max address size we deal with */
58 np = of_find_compatible_node(NULL, NULL, "fsl,cpm-muram-data"); in cpm_muram_init()
61 np = of_find_node_by_name(NULL, "data-only"); in cpm_muram_init()
64 ret = -ENODEV; in cpm_muram_init()
69 muram_pool = gen_pool_create(0, -1); in cpm_muram_init()
72 ret = -ENOMEM; in cpm_muram_init()
78 ret = -ENODEV; in cpm_muram_init()
85 ret = gen_pool_add(muram_pool, r.start - muram_pbase + in cpm_muram_init()
86 GENPOOL_OFFSET, resource_size(&r), -1); in cpm_muram_init()
93 muram_vbase = ioremap(muram_pbase, max - muram_pbase + 1); in cpm_muram_init()
96 ret = -ENOMEM; in cpm_muram_init()
108 * cpm_muram_alloc_common - cpm_muram_alloc common code
113 * This function returns a non-negative offset into the muram area, or
124 return -ENOMEM; in cpm_muram_alloc_common()
128 return -ENOMEM; in cpm_muram_alloc_common()
130 start = start - GENPOOL_OFFSET; in cpm_muram_alloc_common()
132 entry->start = start; in cpm_muram_alloc_common()
133 entry->size = size; in cpm_muram_alloc_common()
134 list_add(&entry->head, &muram_block_list); in cpm_muram_alloc_common()
140 * cpm_muram_alloc - allocate the requested size worth of multi-user ram
144 * This function returns a non-negative offset into the muram area, or
146 * Use cpm_dpram_addr() to get the virtual address of the area.
165 * cpm_muram_free - free a chunk of multi-user ram
180 if (tmp->start == offset) { in cpm_muram_free()
181 size = tmp->size; in cpm_muram_free()
182 list_del(&tmp->head); in cpm_muram_free()
193 * cpm_muram_alloc_fixed - reserve a specific region of multi-user ram
194 * @offset: offset of allocation start address
198 * Use cpm_dpram_addr() to get the virtual address of the area.
217 * cpm_muram_addr - turn a muram offset into a virtual address
228 return addr - (void __iomem *)muram_vbase; in cpm_muram_offset()
233 * cpm_muram_dma - turn a muram virtual address into a DMA address
234 * @offset: virtual address from cpm_muram_addr() to convert
238 return muram_pbase + ((u8 __iomem *)addr - muram_vbase); in cpm_muram_dma()