Lines Matching defs:mgr

15 #include <linux/fpga/fpga-mgr.h>
75 struct fpga_manager *mgr;
90 int (*wait_credit)(struct fpga_manager *mgr, u32 blocks);
117 static enum fpga_mgr_states altera_cvp_state(struct fpga_manager *mgr)
119 struct altera_cvp_conf *conf = mgr->priv;
182 static int altera_cvp_chk_error(struct fpga_manager *mgr, size_t bytes)
184 struct altera_cvp_conf *conf = mgr->priv;
191 dev_err(&mgr->dev, "CVP_CONFIG_ERROR after %zu bytes!\n",
229 static int altera_cvp_v2_wait_for_credit(struct fpga_manager *mgr,
233 struct altera_cvp_conf *conf = mgr->priv;
249 ret = altera_cvp_chk_error(mgr, blocks * ALTERA_CVP_V2_SIZE);
285 static int altera_cvp_teardown(struct fpga_manager *mgr,
288 struct altera_cvp_conf *conf = mgr->priv;
313 dev_err(&mgr->dev, "CFG_RDY == 0 timeout\n");
318 static int altera_cvp_write_init(struct fpga_manager *mgr,
322 struct altera_cvp_conf *conf = mgr->priv;
329 dev_err(&mgr->dev, "Partial reconfiguration not supported.\n");
344 dev_err(&mgr->dev, "CVP mode off: 0x%04x\n", val);
349 dev_warn(&mgr->dev, "CvP already started, tear down first\n");
350 ret = altera_cvp_teardown(mgr, info);
379 dev_err(&mgr->dev, "Problem clearing out state\n");
397 dev_warn(&mgr->dev, "CFG_RDY == 1 timeout\n");
409 ret = altera_cvp_chk_error(mgr, 0);
411 dev_warn(&mgr->dev, "CFG_RDY == 1 timeout\n");
431 static int altera_cvp_write(struct fpga_manager *mgr, const char *buf,
434 struct altera_cvp_conf *conf = mgr->priv;
447 status = conf->priv->wait_credit(mgr, done);
472 status = altera_cvp_chk_error(mgr, done);
479 status = altera_cvp_chk_error(mgr, count);
484 static int altera_cvp_write_complete(struct fpga_manager *mgr,
487 struct altera_cvp_conf *conf = mgr->priv;
491 ret = altera_cvp_teardown(mgr, info);
498 dev_err(&mgr->dev, "detected CVP_CONFIG_ERROR_LATCHED!\n");
513 dev_err(&mgr->dev, "PLD_CLK_IN_USE|USERMODE timeout\n");
580 struct fpga_manager *mgr;
655 mgr = fpga_mgr_register(&pdev->dev, conf->mgr_name,
657 if (IS_ERR(mgr)) {
658 ret = PTR_ERR(mgr);
662 pci_set_drvdata(pdev, mgr);
678 struct fpga_manager *mgr = pci_get_drvdata(pdev);
679 struct altera_cvp_conf *conf = mgr->priv;
682 fpga_mgr_unregister(mgr);