Lines Matching refs:admin

114 	struct adf_admin_comms *admin = accel_dev->admin;  in adf_put_admin_msg_sync()  local
116 void __iomem *mailbox = admin->mailbox_addr; in adf_put_admin_msg_sync()
120 mutex_lock(&admin->lock); in adf_put_admin_msg_sync()
123 mutex_unlock(&admin->lock); in adf_put_admin_msg_sync()
127 memcpy(admin->virt_addr + offset, in, ADF_ADMINMSG_LEN); in adf_put_admin_msg_sync()
143 memcpy(out, admin->virt_addr + offset + in adf_put_admin_msg_sync()
147 mutex_unlock(&admin->lock); in adf_put_admin_msg_sync()
192 req.init_cfg_ptr = accel_dev->admin->const_tbl_addr; in adf_set_fw_constants()
279 if (!accel_dev->admin) { in adf_init_admin_pm()
293 struct adf_admin_comms *admin; in adf_init_admin_comms() local
301 admin = kzalloc_node(sizeof(*accel_dev->admin), GFP_KERNEL, in adf_init_admin_comms()
303 if (!admin) in adf_init_admin_comms()
305 admin->virt_addr = dma_alloc_coherent(&GET_DEV(accel_dev), PAGE_SIZE, in adf_init_admin_comms()
306 &admin->phy_addr, GFP_KERNEL); in adf_init_admin_comms()
307 if (!admin->virt_addr) { in adf_init_admin_comms()
309 kfree(admin); in adf_init_admin_comms()
313 admin->virt_tbl_addr = dma_alloc_coherent(&GET_DEV(accel_dev), in adf_init_admin_comms()
315 &admin->const_tbl_addr, in adf_init_admin_comms()
317 if (!admin->virt_tbl_addr) { in adf_init_admin_comms()
320 admin->virt_addr, admin->phy_addr); in adf_init_admin_comms()
321 kfree(admin); in adf_init_admin_comms()
325 memcpy(admin->virt_tbl_addr, const_tab, sizeof(const_tab)); in adf_init_admin_comms()
333 reg_val = (u64)admin->phy_addr; in adf_init_admin_comms()
337 mutex_init(&admin->lock); in adf_init_admin_comms()
338 admin->mailbox_addr = mailbox; in adf_init_admin_comms()
339 accel_dev->admin = admin; in adf_init_admin_comms()
346 struct adf_admin_comms *admin = accel_dev->admin; in adf_exit_admin_comms() local
348 if (!admin) in adf_exit_admin_comms()
351 if (admin->virt_addr) in adf_exit_admin_comms()
353 admin->virt_addr, admin->phy_addr); in adf_exit_admin_comms()
354 if (admin->virt_tbl_addr) in adf_exit_admin_comms()
356 admin->virt_tbl_addr, admin->const_tbl_addr); in adf_exit_admin_comms()
358 mutex_destroy(&admin->lock); in adf_exit_admin_comms()
359 kfree(admin); in adf_exit_admin_comms()
360 accel_dev->admin = NULL; in adf_exit_admin_comms()