projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
33e6ef4
)
bcma: pci: implement interrupts control
author
Rafał Miłecki
<
[email protected]
>
Thu, 19 May 2011 12:08:22 +0000
(14:08 +0200)
committer
John W. Linville
<
[email protected]
>
Wed, 1 Jun 2011 19:11:01 +0000
(15:11 -0400)
Signed-off-by: Rafał Miłecki <
[email protected]
>
Signed-off-by: John W. Linville <
[email protected]
>
drivers/bcma/driver_pci.c
patch
|
blob
|
history
diff --git
a/drivers/bcma/driver_pci.c
b/drivers/bcma/driver_pci.c
index e757e4e3c7e29959808376c7d7e5491ffe1e9fcf..789d68b4858baa56872e290e7d4780b258702092 100644
(file)
--- a/
drivers/bcma/driver_pci.c
+++ b/
drivers/bcma/driver_pci.c
@@
-161,3
+161,26
@@
void bcma_core_pci_init(struct bcma_drv_pci *pc)
{
bcma_pcicore_serdes_workaround(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;
+ else
+ tmp &= ~coremask;
+
+ err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp);
+
+out:
+ return err;
+}