bcma: pci: implement enabling interrupts
Rafał Miłecki
maintainerPATCH 1/1 bcma: pci: implement enabling interrupts
--- drivers/bcma/driver_pci.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/bcma/driver_pci.c +18 -0
@@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) {bcma_pcicore_serdes_workaround (pc); } + +int bcma_core_pci_irq_enable (struct bcma_drv_pci *pc,struct bcma_device *core) +{ +struct pci_dev *pdev = pc->core->bus->host_pci; +u32 coremask, tmp; +int err; + + coremask =BIT (core->core_index); + + err =pci_read_config_dword (pdev,BCMA_PCI_IRQMASK , &tmp); +if (err) + goto out; + tmp |= coremask <<8 ; + err =pci_write_config_dword (pdev,BCMA_PCI_IRQMASK , tmp); + +out: +return err; +}
Signature · 1 line
1.7.3.4
Quoted 21 lines · Rafał Miłecki
Signed-off-by Rafał Miłecki<[email protected]>--- drivers/bcma/driver_pci.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)drivers/bcma/driver_pci.c +8
-0@@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) {bcma_pcicore_serdes_workaround (pc); } + +int bcma_core_pci_irq_enable (struct bcma_drv_pci *pc,struct bcma_device *core) +{ +struct pci_dev *pdev = pc->core->bus->host_pci; +u32 coremask, tmp; +int err; + + coremask =BIT (core->core_index);
drivers/bcma/driver_pci.c void bcma_core_pci_init(struct bcma_drv_pci *pc) · line 181
Quoted 10 lines
drivers/bcma/driver_pci.c +10
-0+ + err =pci_read_config_dword (pdev,BCMA_PCI_IRQMASK ,&tmp); +if (err) + goto out; + tmp |= coremask<<8 ; + err =pci_write_config_dword (pdev,BCMA_PCI_IRQMASK , tmp); + +out: +return err; +}
Hi Rafał,
Do you intend to have a disable as well?
Gr. AvS
Signature · 2 lines
Almost nobody dances sober, unless they happen to be insane. -- H.P. Lovecraft --
Rafał Miłecki
maintainerW dniu 18 maja 2011 12:39 użytkownik Arend van Spriel
Quoted 37 lines · <[email protected]> napisał:
Quoted 23 lines · Rafał Miłecki
Signed-off-by Rafał Miłecki<[email protected]>---
drivers/bcma/driver_pci.c | 18 ++++++++++++++++++1 files changed, 18 insertions(+), 0 deletions(-)drivers/bcma/driver_pci.c +2
-0@@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) { bcma_pcicore_serdes_workaround(pc); } + +int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct bcma_device*core)
drivers/bcma/driver_pci.c +6
-0+{ + struct pci_dev *pdev = pc->core->bus->host_pci; + u32 coremask, tmp; + int err; + + coremask = BIT(core->core_index);drivers/bcma/driver_pci.c void bcma_core_pci_init(struct bcma_drv_pci *pc) · line 181
Quoted 10 lines
drivers/bcma/driver_pci.c +10
-0+ + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK,&tmp); + if (err) + goto out; + tmp |= coremask<< 8; + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp); + +out: + return err; +}Hi Rafał,
Quoted 1 line
Do you intend to have a disable as well?
Sure. I just didn't test disabling function yet, that's why I didn't publish it.
Signature · 1 line
Rafał
Quoted 37 lines · Rafał Miłecki
W dniu 18 maja 2011 12:39 użytkownik Arend van Spriel
Quoted 35 lines · <[email protected]> napisał:
Quoted 22 lines · Rafał Miłecki
Signed-off-by Rafał Miłecki<[email protected]>--- drivers/bcma/driver_pci.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)drivers/bcma/driver_pci.c +2
-0@@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) {bcma_pcicore_serdes_workaround (pc); } + +int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct bcma_device*core)
drivers/bcma/driver_pci.c +6
-0+{ +struct pci_dev *pdev = pc->core->bus->host_pci; +u32 coremask, tmp; +int err; + + coremask =BIT (core->core_index);drivers/bcma/driver_pci.c void bcma_core_pci_init(struct bcma_drv_pci *pc) · line 181
Quoted 10 lines
drivers/bcma/driver_pci.c +10
-0+ + err =pci_read_config_dword (pdev,BCMA_PCI_IRQMASK ,&tmp); +if (err) + goto out; + tmp |= coremask<<8 ; + err =pci_write_config_dword (pdev,BCMA_PCI_IRQMASK , tmp); + +out: +return err; +}Hi Rafał,
Quoted 2 lines
Quoted 1 line
Do you intend to have a disable as well?
Sure. I just didn't test disabling function yet, that's why I didn't publish it.
Thanks,
I was just wondering whether there would be a yang for this yin ;-)
Gr. AvS
Signature · 2 lines
Almost nobody dances sober, unless they happen to be insane. -- H.P. Lovecraft --
Rafał Miłecki
maintainerW dniu 18 maja 2011 13:31 użytkownik Arend van Spriel
Quoted 43 lines · <[email protected]> napisał:
Quoted 42 lines · Rafał Miłecki
W dniu 18 maja 2011 12:39 użytkownik Arend van Spriel
Quoted 39 lines · <[email protected]> napisał:
Quoted 24 lines · Rafał Miłecki
Signed-off-by Rafał Miłecki<[email protected]>---
drivers/bcma/driver_pci.c | 18 ++++++++++++++++++1 files changed, 18 insertions(+), 0 deletions(-)drivers/bcma/driver_pci.c +2
-0@@ -161,3 +161,21 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) { bcma_pcicore_serdes_workaround(pc); } + +int bcma_core_pci_irq_enable(struct bcma_drv_pci *pc, struct
bcma_device
*core)drivers/bcma/driver_pci.c +6
-0+{ + struct pci_dev *pdev = pc->core->bus->host_pci; + u32 coremask, tmp; + int err; + + coremask = BIT(core->core_index);drivers/bcma/driver_pci.c void bcma_core_pci_init(struct bcma_drv_pci *pc) · line 181
Quoted 10 lines
drivers/bcma/driver_pci.c +10
-0+ + err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK,&tmp); + if (err) + goto out; + tmp |= coremask<< 8; + err = pci_write_config_dword(pdev, BCMA_PCI_IRQMASK, tmp); + +out: + return err; +}Hi Rafał,
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Do you intend to have a disable as well?
Sure. I just didn't test disabling function yet, that's why I didn't publish it.
Thanks,
I was just wondering whether there would be a yang for this yin ;-)
Actually, we could use the same function to enable and disable interrupts. Only one additional argument and one condition is needed.
John: can you drop this patch? In case one function will not be an option, I'll just resend it.
Signature · 1 line
Rafał