/* not sure if this is ever needed */ unsigned long qe_muram_alloc_fixed(unsigned long offset, int size) { unsigned long start; unsigned long flags; spin_lock_irqsave(&qe_muram_lock, flags); start = rh_alloc_fixed(&qe_muram_info, offset, size, "commproc"); spin_unlock_irqrestore(&qe_muram_lock, flags); return start; }
/** * cpm_muram_alloc_fixed - reserve a specific region of multi-user ram * @offset: the offset into the muram area to reserve * @size: the number of bytes to reserve * * This function returns "start" on success, -ENOMEM on failure. * Use cpm_dpram_addr() to get the virtual address of the area. * Use cpm_muram_free() to free the allocation. */ unsigned long cpm_muram_alloc_fixed(unsigned long offset, unsigned long size) { unsigned long start; unsigned long flags; spin_lock_irqsave(&cpm_muram_lock, flags); cpm_muram_info.alignment = 1; start = rh_alloc_fixed(&cpm_muram_info, offset, size, "commproc"); spin_unlock_irqrestore(&cpm_muram_lock, flags); return start; }
unsigned long cpm_dpalloc_fixed(unsigned long offset, uint size, uint align) { unsigned long start; unsigned long flags; spin_lock_irqsave(&cpm_dpmem_lock, flags); cpm_dpmem_info.alignment = align; start = rh_alloc_fixed(&cpm_dpmem_info, offset, size, "commproc"); spin_unlock_irqrestore(&cpm_dpmem_lock, flags); return start; }