Lines Matching refs:ocm_reg
85 static int ocm_free_region(struct ocm_region *ocm_reg, const void *addr) in ocm_free_region() argument
90 if (!ocm_reg->virt) in ocm_free_region()
93 list_for_each_entry_safe(blk, tmp, &ocm_reg->list, list) { in ocm_free_region()
95 offset = addr - ocm_reg->virt; in ocm_free_region()
96 ocm_reg->memfree += blk->size; in ocm_free_region()
97 rh_free(ocm_reg->rh, offset); in ocm_free_region()
316 struct ocm_region *ocm_reg; in ppc4xx_ocm_alloc() local
327 ocm_reg = &ocm->nc; in ppc4xx_ocm_alloc()
329 ocm_reg = &ocm->c; in ppc4xx_ocm_alloc()
331 if (!ocm_reg->virt) in ppc4xx_ocm_alloc()
337 offset = rh_alloc_align(ocm_reg->rh, size, align, NULL); in ppc4xx_ocm_alloc()
345 rh_free(ocm_reg->rh, offset); in ppc4xx_ocm_alloc()
349 *phys = ocm_reg->phys + offset; in ppc4xx_ocm_alloc()
350 addr = ocm_reg->virt + offset; in ppc4xx_ocm_alloc()
356 list_add_tail(&ocm_blk->list, &ocm_reg->list); in ppc4xx_ocm_alloc()
358 ocm_reg->memfree -= size; in ppc4xx_ocm_alloc()