arch/mips/pci/pci-bcm47xx.c
Source file repositories/reference/linux-study-clean/arch/mips/pci/pci-bcm47xx.c
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/pci/pci-bcm47xx.c- Extension
.c- Size
- 2829 bytes
- Lines
- 99
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/pci.hlinux/ssb/ssb.hlinux/bcma/bcma.hbcm47xx.h
Detected Declarations
function pcibios_map_irqfunction bcm47xx_pcibios_plat_dev_init_ssbfunction bcm47xx_pcibios_plat_dev_init_bcmafunction pcibios_plat_dev_init
Annotated Snippet
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/ssb/ssb.h>
#include <linux/bcma/bcma.h>
#include <bcm47xx.h>
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
return 0;
}
#ifdef CONFIG_BCM47XX_SSB
static int bcm47xx_pcibios_plat_dev_init_ssb(struct pci_dev *dev)
{
int res;
u8 slot, pin;
res = ssb_pcibios_plat_dev_init(dev);
if (res < 0) {
pci_alert(dev, "PCI: Failed to init device\n");
return res;
}
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
slot = PCI_SLOT(dev->devfn);
res = ssb_pcibios_map_irq(dev, slot, pin);
/* IRQ-0 and IRQ-1 are software interrupts. */
if (res < 2) {
pci_alert(dev, "PCI: Failed to map IRQ of device\n");
return res;
}
dev->irq = res;
return 0;
}
#endif
#ifdef CONFIG_BCM47XX_BCMA
static int bcm47xx_pcibios_plat_dev_init_bcma(struct pci_dev *dev)
{
int res;
res = bcma_core_pci_plat_dev_init(dev);
if (res < 0) {
pci_alert(dev, "PCI: Failed to init device\n");
return res;
}
res = bcma_core_pci_pcibios_map_irq(dev);
/* IRQ-0 and IRQ-1 are software interrupts. */
if (res < 2) {
pci_alert(dev, "PCI: Failed to map IRQ of device\n");
return res;
}
dev->irq = res;
return 0;
}
#endif
int pcibios_plat_dev_init(struct pci_dev *dev)
{
#ifdef CONFIG_BCM47XX_SSB
if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_SSB)
return bcm47xx_pcibios_plat_dev_init_ssb(dev);
#endif
#ifdef CONFIG_BCM47XX_BCMA
if (bcm47xx_bus_type == BCM47XX_BUS_TYPE_BCMA)
return bcm47xx_pcibios_plat_dev_init_bcma(dev);
#endif
return 0;
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/pci.h`, `linux/ssb/ssb.h`, `linux/bcma/bcma.h`, `bcm47xx.h`.
- Detected declarations: `function pcibios_map_irq`, `function bcm47xx_pcibios_plat_dev_init_ssb`, `function bcm47xx_pcibios_plat_dev_init_bcma`, `function pcibios_plat_dev_init`.
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.