bcom_sram
rh_attach_region(bcom_sram->rh, zbase - bcom_sram->base_phys, regaddr_p[1]);
spin_lock_init(&bcom_sram->lock);
kfree(bcom_sram);
bcom_sram = NULL;
if (bcom_sram) {
rh_destroy(bcom_sram->rh);
iounmap((void __iomem *)bcom_sram->base_virt);
release_mem_region(bcom_sram->base_phys, bcom_sram->size);
kfree(bcom_sram);
bcom_sram = NULL;
spin_lock(&bcom_sram->lock);
offset = rh_alloc_align(bcom_sram->rh, size, align, NULL);
spin_unlock(&bcom_sram->lock);
*phys = bcom_sram->base_phys + offset;
return bcom_sram->base_virt + offset;
offset = ptr - bcom_sram->base_virt;
spin_lock(&bcom_sram->lock);
rh_free(bcom_sram->rh, offset);
spin_unlock(&bcom_sram->lock);
struct bcom_sram *bcom_sram = NULL;
EXPORT_SYMBOL_GPL(bcom_sram); /* needed for inline functions */
if (bcom_sram) {
bcom_sram = kmalloc_obj(struct bcom_sram);
if (!bcom_sram) {
bcom_sram->base_phys = res.start;
bcom_sram->size = resource_size(&res);
bcom_sram->base_virt = (void *)ioremap(res.start, resource_size(&res));
if (!bcom_sram->base_virt) {
owner, (long)bcom_sram->base_phys, bcom_sram->size );
bcom_sram->rh = rh_create(4);
rh_attach_region(bcom_sram->rh, 0, bcom_sram->size);
extern struct bcom_sram *bcom_sram;
return bcom_sram->base_phys +
(unsigned long)(va - bcom_sram->base_virt);
return bcom_sram->base_virt +
(unsigned long)(pa - bcom_sram->base_phys);