tegra: PCI Express support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 3 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] [ARM] tegra: PCI Express support
Quoted 34 lines · Mike Rapoport
From what you are saying I understand that the region reservation should look like:
static struct resource res_mmio = { .name = "PCI IO" .start = 0x80400000, .end = 0x80400000 + IO_SIZE, .flags = IORESOURCE_MEM, };static struct resource pcie_res[] = { [0] = { .name = "PCIe IO", .start = 0x1000, .end = 0x1000 + IO_SIZE - 1, .flags = IORESOURCE_IO, }, [1] = { .name = "PCIe MEM", .start = MEM_BASE, .end = MEM_BASE + MEM_SIZE - 1, .flags = IORESOURCE_MEM, }, };static int
tegra_pcie_setup(int nr, struct pci_sys_data *sys){ request_region(&iomem_resource, &res_mmio); request_region(&iomem_resource, &pcie_res[1]); request_region(&ioport_resource, &pcie_res[0]); sys->resource[0] = &pcie_res[0]; sys->resource[1] = &pcie_res[1]; }
Quoted 2 lines
I've used
0x1000as IO resources start because having it 0 would causepcibios_enable_deviceto fail.
More or less. You can avoid the ioport resource (&pcie_res[0]) and replace it with &ioport_resource if you set PCIBIOS_MIN_IO to 0x1000. This will have the effect of preventing BARs being allocated below 0x1000.
Don't also forget to check the return value from request_region()...