aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/altera-cvp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/fpga/altera-cvp.c')
-rw-r--r--drivers/fpga/altera-cvp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
index 144fa2a4d4cc..73950851e404 100644
--- a/drivers/fpga/altera-cvp.c
+++ b/drivers/fpga/altera-cvp.c
@@ -403,6 +403,7 @@ static int altera_cvp_probe(struct pci_dev *pdev,
403 struct altera_cvp_conf *conf; 403 struct altera_cvp_conf *conf;
404 struct fpga_manager *mgr; 404 struct fpga_manager *mgr;
405 u16 cmd, val; 405 u16 cmd, val;
406 u32 regval;
406 int ret; 407 int ret;
407 408
408 /* 409 /*
@@ -416,6 +417,14 @@ static int altera_cvp_probe(struct pci_dev *pdev,
416 return -ENODEV; 417 return -ENODEV;
417 } 418 }
418 419
420 pci_read_config_dword(pdev, VSE_CVP_STATUS, &regval);
421 if (!(regval & VSE_CVP_STATUS_CVP_EN)) {
422 dev_err(&pdev->dev,
423 "CVP is disabled for this device: CVP_STATUS Reg 0x%x\n",
424 regval);
425 return -ENODEV;
426 }
427
419 conf = devm_kzalloc(&pdev->dev, sizeof(*conf), GFP_KERNEL); 428 conf = devm_kzalloc(&pdev->dev, sizeof(*conf), GFP_KERNEL);
420 if (!conf) 429 if (!conf)
421 return -ENOMEM; 430 return -ENOMEM;