arch/mips/pci/pci-bcm63xx.c

Source file repositories/reference/linux-study-clean/arch/mips/pci/pci-bcm63xx.c

File Facts

System
Linux kernel
Corpus path
arch/mips/pci/pci-bcm63xx.c
Extension
.c
Size
9868 bytes
Lines
352
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <asm/bootinfo.h>

#include <bcm63xx_reset.h>

#include "pci-bcm63xx.h"

/*
 * Allow PCI to be disabled at runtime depending on board nvram
 * configuration
 */
int bcm63xx_pci_enabled;

static struct resource bcm_pci_mem_resource = {
	.name	= "bcm63xx PCI memory space",
	.start	= BCM_PCI_MEM_BASE_PA,
	.end	= BCM_PCI_MEM_END_PA,
	.flags	= IORESOURCE_MEM
};

static struct resource bcm_pci_io_resource = {
	.name	= "bcm63xx PCI IO space",
	.start	= BCM_PCI_IO_BASE_PA,
#ifdef CONFIG_CARDBUS
	.end	= BCM_PCI_IO_HALF_PA,
#else
	.end	= BCM_PCI_IO_END_PA,
#endif
	.flags	= IORESOURCE_IO
};

struct pci_controller bcm63xx_controller = {
	.pci_ops	= &bcm63xx_pci_ops,
	.io_resource	= &bcm_pci_io_resource,
	.mem_resource	= &bcm_pci_mem_resource,
};

/*
 * We handle cardbus  via a fake Cardbus bridge,  memory and io spaces
 * have to be  clearly separated from PCI one  since we have different
 * memory decoder.
 */
#ifdef CONFIG_CARDBUS
static struct resource bcm_cb_mem_resource = {
	.name	= "bcm63xx Cardbus memory space",
	.start	= BCM_CB_MEM_BASE_PA,
	.end	= BCM_CB_MEM_END_PA,
	.flags	= IORESOURCE_MEM
};

static struct resource bcm_cb_io_resource = {
	.name	= "bcm63xx Cardbus IO space",
	.start	= BCM_PCI_IO_HALF_PA + 1,
	.end	= BCM_PCI_IO_END_PA,
	.flags	= IORESOURCE_IO
};

struct pci_controller bcm63xx_cb_controller = {
	.pci_ops	= &bcm63xx_cb_ops,
	.io_resource	= &bcm_cb_io_resource,
	.mem_resource	= &bcm_cb_mem_resource,
};
#endif

static struct resource bcm_pcie_mem_resource = {
	.name	= "bcm63xx PCIe memory space",
	.start	= BCM_PCIE_MEM_BASE_PA,
	.end	= BCM_PCIE_MEM_END_PA,
	.flags	= IORESOURCE_MEM,
};

static struct resource bcm_pcie_io_resource = {
	.name	= "bcm63xx PCIe IO space",
	.start	= 0,
	.end	= 0,
	.flags	= 0,
};

struct pci_controller bcm63xx_pcie_controller = {
	.pci_ops	= &bcm63xx_pcie_ops,
	.io_resource	= &bcm_pcie_io_resource,
	.mem_resource	= &bcm_pcie_mem_resource,
};

static u32 bcm63xx_int_cfg_readl(u32 reg)

Annotation

Implementation Notes