• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/staging/tidspbridge/pmgr/

Lines Matching defs:dev_obj

93 static int init_cod_mgr(struct dev_object *dev_obj);
106 struct dev_object *dev_obj = (struct dev_object *)arb;
112 if (dev_obj) {
114 DBC_ASSERT(dev_obj->hbridge_context != NULL);
115 status = (*dev_obj->bridge_interface.pfn_brd_write) (
116 dev_obj->hbridge_context, host_buf,
141 struct dev_object *dev_obj = NULL;
169 dev_obj = kzalloc(sizeof(struct dev_object), GFP_KERNEL);
170 if (dev_obj) {
172 dev_obj->dev_node_obj = dev_node_obj;
173 dev_obj->module_obj = module_obj;
174 dev_obj->cod_mgr = NULL;
175 dev_obj->hchnl_mgr = NULL;
176 dev_obj->hdeh_mgr = NULL;
177 dev_obj->lock_owner = NULL;
178 dev_obj->word_size = DSPWORDSIZE;
179 dev_obj->hdrv_obj = hdrv_obj;
180 dev_obj->dev_type = DSP_UNIT;
184 &dev_obj->bridge_interface);
188 status = (dev_obj->bridge_interface.pfn_dev_create)
189 (&dev_obj->hbridge_context, dev_obj,
193 || (dev_obj->hbridge_context != NULL));
200 status = init_cod_mgr(dev_obj);
224 status = chnl_create(&dev_obj->hchnl_mgr, dev_obj, &mgr_attrs);
231 status = cmm_create(&dev_obj->hcmm_mgr,
232 (struct dev_object *)dev_obj, NULL);
234 if (!status && dev_obj->hchnl_mgr) {
235 status = io_create(&dev_obj->hio_mgr, dev_obj,
241 status = bridge_deh_create(&dev_obj->hdeh_mgr, dev_obj);
244 status = dmm_create(&dev_obj->dmm_mgr,
245 (struct dev_object *)dev_obj, NULL);
249 lst_init_elem(&dev_obj->link);
250 status = drv_insert_dev_object(hdrv_obj, dev_obj);
254 dev_obj->proc_list = kzalloc(sizeof(struct lst_list),
256 if (!(dev_obj->proc_list))
259 INIT_LIST_HEAD(&dev_obj->proc_list->head);
265 *device_obj = dev_obj;
267 if (dev_obj) {
268 kfree(dev_obj->proc_list);
269 if (dev_obj->cod_mgr)
270 cod_delete(dev_obj->cod_mgr);
271 if (dev_obj->dmm_mgr)
272 dmm_destroy(dev_obj->dmm_mgr);
273 kfree(dev_obj);
293 struct dev_object *dev_obj = hdev_obj;
299 DBC_ASSERT(!dev_obj->hnode_mgr);
300 status = node_create_mgr(&dev_obj->hnode_mgr, hdev_obj);
302 dev_obj->hnode_mgr = NULL;
304 DBC_ENSURE((!status && dev_obj->hnode_mgr != NULL)
305 || (status && dev_obj->hnode_mgr == NULL));
317 struct dev_object *dev_obj = hdev_obj;
322 if (dev_obj->hnode_mgr) {
323 if (node_delete_mgr(dev_obj->hnode_mgr))
326 dev_obj->hnode_mgr = NULL;
330 DBC_ENSURE((!status && dev_obj->hnode_mgr == NULL) || status);
343 struct dev_object *dev_obj = hdev_obj;
348 if (dev_obj->cod_mgr) {
349 cod_delete(dev_obj->cod_mgr);
350 dev_obj->cod_mgr = NULL;
353 if (dev_obj->hnode_mgr) {
354 node_delete_mgr(dev_obj->hnode_mgr);
355 dev_obj->hnode_mgr = NULL;
359 if (dev_obj->hio_mgr) {
360 io_destroy(dev_obj->hio_mgr);
361 dev_obj->hio_mgr = NULL;
363 if (dev_obj->hchnl_mgr) {
364 chnl_destroy(dev_obj->hchnl_mgr);
365 dev_obj->hchnl_mgr = NULL;
367 if (dev_obj->hmsg_mgr) {
368 msg_delete(dev_obj->hmsg_mgr);
369 dev_obj->hmsg_mgr = NULL;
372 if (dev_obj->hdeh_mgr) {
374 bridge_deh_destroy(dev_obj->hdeh_mgr);
375 dev_obj->hdeh_mgr = NULL;
377 if (dev_obj->hcmm_mgr) {
378 cmm_destroy(dev_obj->hcmm_mgr, true);
379 dev_obj->hcmm_mgr = NULL;
382 if (dev_obj->dmm_mgr) {
383 dmm_destroy(dev_obj->dmm_mgr);
384 dev_obj->dmm_mgr = NULL;
389 if (dev_obj->hbridge_context) {
390 status = (*dev_obj->bridge_interface.pfn_dev_destroy)
391 (dev_obj->hbridge_context);
392 dev_obj->hbridge_context = NULL;
396 kfree(dev_obj->proc_list);
397 dev_obj->proc_list = NULL;
400 drv_remove_dev_object(dev_obj->hdrv_obj, dev_obj);
402 * (dev_obj->module_obj); */
404 kfree(dev_obj);
405 dev_obj = NULL;
424 struct dev_object *dev_obj = hdev_obj;
430 *mgr = dev_obj->hchnl_mgr;
450 struct dev_object *dev_obj = hdev_obj;
456 *mgr = dev_obj->hcmm_mgr;
476 struct dev_object *dev_obj = hdev_obj;
482 *mgr = dev_obj->dmm_mgr;
501 struct dev_object *dev_obj = hdev_obj;
507 *cod_mgr = dev_obj->cod_mgr;
546 struct dev_object *dev_obj = hdev_obj;
552 *dev_nde = dev_obj->dev_node_obj;
570 struct dev_object *dev_obj = NULL;
572 dev_obj = (struct dev_object *)drv_get_first_dev_object();
574 return dev_obj;
587 struct dev_object *dev_obj = hdev_obj;
593 *if_fxns = &dev_obj->bridge_interface;
665 struct dev_object *dev_obj = hdev_obj;
671 *node_man = dev_obj->hnode_mgr;
715 struct dev_object *dev_obj = hdev_obj;
721 *phbridge_context = dev_obj->hbridge_context;
796 struct dev_object *dev_obj = hdev_obj;
799 for (proc_obj = (void *)lst_first(dev_obj->proc_list);
801 proc_obj = (void *)lst_next(dev_obj->proc_list,
815 struct dev_object *dev_obj;
822 dev_obj = (struct dev_object *)hdev_obj;
839 struct dev_object *dev_obj = hdev_obj;
844 dev_obj->hchnl_mgr = hmgr;
848 DBC_ENSURE(status || (dev_obj->hchnl_mgr == hmgr));
926 * dev_obj: Pointer to device object created with
935 static int init_cod_mgr(struct dev_object *dev_obj)
941 DBC_REQUIRE(!dev_obj || (dev_obj->cod_mgr == NULL));
943 status = cod_create(&dev_obj->cod_mgr, sz_dummy_file, NULL);
954 * dev_obj: Ptr to Dev Object where the list is.
971 struct dev_object *dev_obj = (struct dev_object *)hdev_obj;
974 DBC_REQUIRE(dev_obj);
976 DBC_REQUIRE(dev_obj->proc_list != NULL);
978 if (!LST_IS_EMPTY(dev_obj->proc_list))
982 lst_put_tail(dev_obj->proc_list, (struct list_head *)proc_obj);
984 DBC_ENSURE(!status && !LST_IS_EMPTY(dev_obj->proc_list));
996 * dev_obj Ptr to Dev Object where the list is.
1011 struct dev_object *dev_obj = (struct dev_object *)hdev_obj;
1013 DBC_REQUIRE(dev_obj);
1015 DBC_REQUIRE(dev_obj->proc_list != NULL);
1016 DBC_REQUIRE(!LST_IS_EMPTY(dev_obj->proc_list));
1018 /* Search list for dev_obj: */
1019 for (cur_elem = lst_first(dev_obj->proc_list); cur_elem != NULL;
1020 cur_elem = lst_next(dev_obj->proc_list, cur_elem)) {
1023 lst_remove_elem(dev_obj->proc_list, cur_elem);
1035 struct dev_object *dev_obj = (struct dev_object *)device_obj;
1037 *dev_type = dev_obj->dev_type;