u_boot
PCI:
pci_init_board->pci_hose_scan->pci_hose_scan_bus->
pciauto_config_device->pciauto_setup_device
data:
volatile pciconf83xx_t *pci_conf;
PCI_BASE_ADDRESS_0
static struct pci_region pci_regions[] = {
{
bus_start: CFG_PCI1_MEM_BASE, //从这里分
phys_start: CFG_PCI1_MEM_PHYS,
size: CFG_PCI1_MEM_SIZE,
flags: PCI_REGION_MEM | PCI_REGION_PREFETCH
},
{
bus_start: CFG_PCI1_MMIO_BASE,
phys_start: CFG_PCI1_MMIO_PHYS,
size: CFG_PCI1_MMIO_SIZE,
flags: PCI_REGION_MEM
},
{
bus_start: CFG_PCI1_IO_BASE,
phys_start: CFG_PCI1_IO_PHYS,
size: CFG_PCI1_IO_SIZE,
flags: PCI_REGION_IO
}
};
/*
* General PCI
* Addresses are mapped 1-1.
*/
#define CFG_PCI1_MEM_BASE 0x80000000
#define CFG_PCI1_MEM_PHYS CFG_PCI1_MEM_BASE
#define CFG_PCI1_MEM_SIZE 0x10000000 /* 256M */
#define CFG_PCI1_MMIO_BASE 0x90000000
#define CFG_PCI1_MMIO_PHYS CFG_PCI1_MMIO_BASE
#define CFG_PCI1_MMIO_SIZE 0x10000000 /* 256M */
#define CFG_PCI1_IO_BASE 0x00000000
#define CFG_PCI1_IO_PHYS 0xE2000000
#define CFG_PCI1_IO_SIZE 0x00100000 /* 1M */
KERNEL:
pcibios_init->pci_scan_bus_parented->pci_scan_child_bus->pci_scan_bridge
->pci_scan_child_bus->pci_scan_slot->pci_scan_single_device
->pci_scan_device->pci_bus_read_config_dword
//////////////////
//get device addr
pci_scan_single_device->pci_scan_device->pci_setup_device->pci_read_bases
pci_assign_resource->pci_update_resource
阅读(1956) | 评论(0) | 转发(0) |