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()
219 struct adf_admin_comms *admin; in adf_init_admin_comms() local
229 admin = kzalloc_node(sizeof(*accel_dev->admin), GFP_KERNEL, in adf_init_admin_comms()
231 if (!admin) in adf_init_admin_comms()
233 admin->virt_addr = dma_alloc_coherent(&GET_DEV(accel_dev), PAGE_SIZE, in adf_init_admin_comms()
234 &admin->phy_addr, GFP_KERNEL); in adf_init_admin_comms()
235 if (!admin->virt_addr) { in adf_init_admin_comms()
237 kfree(admin); in adf_init_admin_comms()
241 admin->virt_tbl_addr = dma_alloc_coherent(&GET_DEV(accel_dev), in adf_init_admin_comms()
243 &admin->const_tbl_addr, in adf_init_admin_comms()
245 if (!admin->virt_tbl_addr) { in adf_init_admin_comms()
248 admin->virt_addr, admin->phy_addr); in adf_init_admin_comms()
249 kfree(admin); in adf_init_admin_comms()
253 memcpy(admin->virt_tbl_addr, const_tab, sizeof(const_tab)); in adf_init_admin_comms()
261 reg_val = (u64)admin->phy_addr; in adf_init_admin_comms()
265 mutex_init(&admin->lock); in adf_init_admin_comms()
266 admin->mailbox_addr = mailbox; in adf_init_admin_comms()
267 accel_dev->admin = admin; in adf_init_admin_comms()
274 struct adf_admin_comms *admin = accel_dev->admin; in adf_exit_admin_comms() local
276 if (!admin) in adf_exit_admin_comms()
279 if (admin->virt_addr) in adf_exit_admin_comms()
281 admin->virt_addr, admin->phy_addr); in adf_exit_admin_comms()
282 if (admin->virt_tbl_addr) in adf_exit_admin_comms()
284 admin->virt_tbl_addr, admin->const_tbl_addr); in adf_exit_admin_comms()
286 mutex_destroy(&admin->lock); in adf_exit_admin_comms()
287 kfree(admin); in adf_exit_admin_comms()
288 accel_dev->admin = NULL; in adf_exit_admin_comms()