* @base: IO Mapped Register Base
* @io: IO resource
* @mem: non-prefetchable memory resource
- * @busn: bus range
* @offset: IO / Memory offset
* @dev: Pointer to PCIe device
* @io_map_base: virtual memory base address for io
struct device *dev;
struct resource io;
struct resource mem;
- struct resource busn;
struct {
resource_size_t mem;
resource_size_t io;
struct device_node *node = dev->of_node;
struct of_pci_range_parser parser;
struct of_pci_range range;
- int err;
if (of_pci_range_parser_init(&parser, node)) {
dev_err(dev, "missing \"ranges\" property\n");
}
}
- err = of_pci_parse_bus_range(node, &pcie->busn);
- if (err < 0) {
- dev_err(dev, "failed to parse bus ranges property: %d\n", err);
- pcie->busn.name = node->name;
- pcie->busn.start = 0;
- pcie->busn.end = 0xff;
- pcie->busn.flags = IORESOURCE_BUS;
- }
-
set_io_port_base(pcie->io_map_base);
return 0;
struct mt7621_pcie *pcie = pci_host_bridge_priv(host);
list_splice_init(res, &host->windows);
- host->busnr = pcie->busn.start;
host->dev.parent = pcie->dev;
host->ops = &mt7621_pci_ops;
host->map_irq = mt7621_map_irq;