diff options
Diffstat (limited to 'drivers/bcma/driver_pci.c')
-rw-r--r-- | drivers/bcma/driver_pci.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/bcma/driver_pci.c b/drivers/bcma/driver_pci.c index 25f3ddf33823..81f3d0a4b856 100644 --- a/drivers/bcma/driver_pci.c +++ b/drivers/bcma/driver_pci.c | |||
@@ -173,7 +173,7 @@ static bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) | |||
173 | return false; | 173 | return false; |
174 | 174 | ||
175 | #ifdef CONFIG_SSB_DRIVER_PCICORE | 175 | #ifdef CONFIG_SSB_DRIVER_PCICORE |
176 | if (bus->sprom.boardflags_lo & SSB_PCICORE_BFL_NOPCI) | 176 | if (bus->sprom.boardflags_lo & SSB_BFL_NOPCI) |
177 | return false; | 177 | return false; |
178 | #endif /* CONFIG_SSB_DRIVER_PCICORE */ | 178 | #endif /* CONFIG_SSB_DRIVER_PCICORE */ |
179 | 179 | ||
@@ -189,6 +189,9 @@ static bool bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) | |||
189 | 189 | ||
190 | void bcma_core_pci_init(struct bcma_drv_pci *pc) | 190 | void bcma_core_pci_init(struct bcma_drv_pci *pc) |
191 | { | 191 | { |
192 | if (pc->setup_done) | ||
193 | return; | ||
194 | |||
192 | if (bcma_core_pci_is_in_hostmode(pc)) { | 195 | if (bcma_core_pci_is_in_hostmode(pc)) { |
193 | #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE | 196 | #ifdef CONFIG_BCMA_DRIVER_PCI_HOSTMODE |
194 | bcma_core_pci_hostmode_init(pc); | 197 | bcma_core_pci_hostmode_init(pc); |
@@ -198,6 +201,8 @@ void bcma_core_pci_init(struct bcma_drv_pci *pc) | |||
198 | } else { | 201 | } else { |
199 | bcma_core_pci_clientmode_init(pc); | 202 | bcma_core_pci_clientmode_init(pc); |
200 | } | 203 | } |
204 | |||
205 | pc->setup_done = true; | ||
201 | } | 206 | } |
202 | 207 | ||
203 | int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core, | 208 | int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core, |
@@ -205,7 +210,14 @@ int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, struct bcma_device *core, | |||
205 | { | 210 | { |
206 | struct pci_dev *pdev = pc->core->bus->host_pci; | 211 | struct pci_dev *pdev = pc->core->bus->host_pci; |
207 | u32 coremask, tmp; | 212 | u32 coremask, tmp; |
208 | int err; | 213 | int err = 0; |
214 | |||
215 | if (core->bus->hosttype != BCMA_HOSTTYPE_PCI) { | ||
216 | /* This bcma device is not on a PCI host-bus. So the IRQs are | ||
217 | * not routed through the PCI core. | ||
218 | * So we must not enable routing through the PCI core. */ | ||
219 | goto out; | ||
220 | } | ||
209 | 221 | ||
210 | err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp); | 222 | err = pci_read_config_dword(pdev, BCMA_PCI_IRQMASK, &tmp); |
211 | if (err) | 223 | if (err) |