• Home
  • Raw
  • Download

Lines Matching refs:mgr

177 		dao->mgr->imap_add(dao->mgr, entry);  in dao_set_left_input()
206 dao->mgr->imap_add(dao->mgr, entry); in dao_set_right_input()
228 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_left_input()
232 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_left_input()
252 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_right_input()
256 dao->mgr->imap_delete(dao->mgr, entry); in dao_clear_right_input()
391 struct daio_mgr *mgr) in dao_rsc_init() argument
393 struct hw *hw = mgr->mgr.hw; in dao_rsc_init()
397 err = daio_rsc_init(&dao->daio, desc, mgr->mgr.hw); in dao_rsc_init()
407 dao->mgr = mgr; in dao_rsc_init()
413 hw->daio_mgr_dsb_dao(mgr->mgr.ctrl_blk, in dao_rsc_init()
415 hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); in dao_rsc_init()
418 hw->daio_mgr_dao_init(mgr->mgr.ctrl_blk, in dao_rsc_init()
420 hw->daio_mgr_enb_dao(mgr->mgr.ctrl_blk, in dao_rsc_init()
422 hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); in dao_rsc_init()
455 struct daio_mgr *mgr = dao->mgr; in dao_rsc_reinit() local
462 return dao_rsc_init(dao, &dsc, mgr); in dao_rsc_reinit()
467 struct daio_mgr *mgr) in dai_rsc_init() argument
470 struct hw *hw = mgr->mgr.hw; in dai_rsc_init()
473 err = daio_rsc_init(&dai->daio, desc, mgr->mgr.hw); in dai_rsc_init()
478 dai->hw = mgr->mgr.hw; in dai_rsc_init()
509 static int daio_mgr_get_rsc(struct rsc_mgr *mgr, enum DAIOTYP type) in daio_mgr_get_rsc() argument
511 if (((struct daio_usage *)mgr->rscs)->data & (0x1 << type)) in daio_mgr_get_rsc()
514 ((struct daio_usage *)mgr->rscs)->data |= (0x1 << type); in daio_mgr_get_rsc()
519 static int daio_mgr_put_rsc(struct rsc_mgr *mgr, enum DAIOTYP type) in daio_mgr_put_rsc() argument
521 ((struct daio_usage *)mgr->rscs)->data &= ~(0x1 << type); in daio_mgr_put_rsc()
526 static int get_daio_rsc(struct daio_mgr *mgr, in get_daio_rsc() argument
536 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_daio_rsc()
537 err = daio_mgr_get_rsc(&mgr->mgr, desc->type); in get_daio_rsc()
538 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_daio_rsc()
540 dev_err(mgr->card->dev, in get_daio_rsc()
552 err = dao_rsc_init(dao, desc, mgr); in get_daio_rsc()
564 err = dai_rsc_init(dai, desc, mgr); in get_daio_rsc()
573 mgr->daio_enable(mgr, *rdaio); in get_daio_rsc()
574 mgr->commit_write(mgr); in get_daio_rsc()
579 spin_lock_irqsave(&mgr->mgr_lock, flags); in get_daio_rsc()
580 daio_mgr_put_rsc(&mgr->mgr, desc->type); in get_daio_rsc()
581 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in get_daio_rsc()
585 static int put_daio_rsc(struct daio_mgr *mgr, struct daio *daio) in put_daio_rsc() argument
589 mgr->daio_disable(mgr, daio); in put_daio_rsc()
590 mgr->commit_write(mgr); in put_daio_rsc()
592 spin_lock_irqsave(&mgr->mgr_lock, flags); in put_daio_rsc()
593 daio_mgr_put_rsc(&mgr->mgr, daio->type); in put_daio_rsc()
594 spin_unlock_irqrestore(&mgr->mgr_lock, flags); in put_daio_rsc()
607 static int daio_mgr_enb_daio(struct daio_mgr *mgr, struct daio *daio) in daio_mgr_enb_daio() argument
609 struct hw *hw = mgr->mgr.hw; in daio_mgr_enb_daio()
612 hw->daio_mgr_enb_dao(mgr->mgr.ctrl_blk, in daio_mgr_enb_daio()
615 hw->daio_mgr_enb_dai(mgr->mgr.ctrl_blk, in daio_mgr_enb_daio()
621 static int daio_mgr_dsb_daio(struct daio_mgr *mgr, struct daio *daio) in daio_mgr_dsb_daio() argument
623 struct hw *hw = mgr->mgr.hw; in daio_mgr_dsb_daio()
626 hw->daio_mgr_dsb_dao(mgr->mgr.ctrl_blk, in daio_mgr_dsb_daio()
629 hw->daio_mgr_dsb_dai(mgr->mgr.ctrl_blk, in daio_mgr_dsb_daio()
637 struct rsc_mgr *mgr = &((struct daio_mgr *)data)->mgr; in daio_map_op() local
638 struct hw *hw = mgr->hw; in daio_map_op()
640 hw->daio_mgr_set_imaparc(mgr->ctrl_blk, entry->slot); in daio_map_op()
641 hw->daio_mgr_set_imapnxt(mgr->ctrl_blk, entry->next); in daio_map_op()
642 hw->daio_mgr_set_imapaddr(mgr->ctrl_blk, entry->addr); in daio_map_op()
643 hw->daio_mgr_commit_write(mgr->hw, mgr->ctrl_blk); in daio_map_op()
648 static int daio_imap_add(struct daio_mgr *mgr, struct imapper *entry) in daio_imap_add() argument
653 spin_lock_irqsave(&mgr->imap_lock, flags); in daio_imap_add()
654 if (!entry->addr && mgr->init_imap_added) { in daio_imap_add()
655 input_mapper_delete(&mgr->imappers, mgr->init_imap, in daio_imap_add()
656 daio_map_op, mgr); in daio_imap_add()
657 mgr->init_imap_added = 0; in daio_imap_add()
659 err = input_mapper_add(&mgr->imappers, entry, daio_map_op, mgr); in daio_imap_add()
660 spin_unlock_irqrestore(&mgr->imap_lock, flags); in daio_imap_add()
665 static int daio_imap_delete(struct daio_mgr *mgr, struct imapper *entry) in daio_imap_delete() argument
670 spin_lock_irqsave(&mgr->imap_lock, flags); in daio_imap_delete()
671 err = input_mapper_delete(&mgr->imappers, entry, daio_map_op, mgr); in daio_imap_delete()
672 if (list_empty(&mgr->imappers)) { in daio_imap_delete()
673 input_mapper_add(&mgr->imappers, mgr->init_imap, in daio_imap_delete()
674 daio_map_op, mgr); in daio_imap_delete()
675 mgr->init_imap_added = 1; in daio_imap_delete()
677 spin_unlock_irqrestore(&mgr->imap_lock, flags); in daio_imap_delete()
682 static int daio_mgr_commit_write(struct daio_mgr *mgr) in daio_mgr_commit_write() argument
684 struct hw *hw = mgr->mgr.hw; in daio_mgr_commit_write()
686 hw->daio_mgr_commit_write(hw, mgr->mgr.ctrl_blk); in daio_mgr_commit_write()
701 err = rsc_mgr_init(&daio_mgr->mgr, DAIO, NUM_DAIOTYP, hw); in daio_mgr_create()
728 hw->daio_mgr_dsb_dao(daio_mgr->mgr.ctrl_blk, i); in daio_mgr_create()
729 hw->daio_mgr_dsb_dai(daio_mgr->mgr.ctrl_blk, i); in daio_mgr_create()
731 hw->daio_mgr_commit_write(hw, daio_mgr->mgr.ctrl_blk); in daio_mgr_create()
738 rsc_mgr_uninit(&daio_mgr->mgr); in daio_mgr_create()
753 rsc_mgr_uninit(&daio_mgr->mgr); in daio_mgr_destroy()