Commit 1de520f4 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville
Browse files

bcma: pci: implement interrupts control

Signed-off-by: default avatarRafał Miłecki <>
Signed-off-by: default avatarJohn W. Linville <>
parent 33e6ef4e
......@@ -161,3 +161,26 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core,
bool enable)
struct pci_dev *pdev = pc->core->bus->host_pci;
u32 coremask, tmp;
int err;
err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp);
if (err)
goto out;
coremask = BIT(core->core_index) << 8;
if (enable)
tmp |= coremask;
tmp &= ~coremask;
err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
return err;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment