mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-16 11:44:52 +00:00
bcma: pci: implement interrupts control
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
33e6ef4e82
commit
1de520f476
1 changed files with 23 additions and 0 deletions
|
|
@ -161,3 +161,26 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc)
|
||||||
{
|
{
|
||||||
bcma_pcicore_serdes_workaround(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;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue