AnsweredAssumed Answered

Can we remove the PCIe IO resource for i.MX6 if not using it?

Question asked by GregT on Apr 9, 2017
Latest reply on Apr 10, 2017 by Victor Linnik

I don't think we need the io resource for the PCIe on the i.MX6.  We will not be supporting legacy PCI and we have a dedicated embedded system that only communicates with FPGAs through BARs and MSI interrrupts.  Can we remove the io resource allocation in the pcie.c driver and add 1MB to the memory resource as shown below?

 

So remove this:

/*
* IORESOURCE_IO
*/
snprintf(pp->io_space_name, sizeof(pp->io_space_name),
"PCIe %d I/O", pp->index);
pp->io_space_name[sizeof(pp->io_space_name) - 1] = 0;
pp->res[0].name = pp->io_space_name;
if (pp->index == 0) {
pp->res[0].start = PCIE_ARB_BASE_ADDR + SZ_16M - SZ_2M;
pp->res[0].end = pp->res[0].start + SZ_1M - 1;
}
pp->res[0].flags = IORESOURCE_IO;
if (request_resource(&ioport_resource, &pp->res[0]))
panic("Request PCIe IO resource failed\n");
sys->resource[0] = &pp->res[0];

 

and change the memory resource to:

/*
* IORESOURCE_MEM
*/
snprintf(pp->mem_space_name, sizeof(pp->mem_space_name),
"PCIe %d MEM", pp->index);
pp->mem_space_name[sizeof(pp->mem_space_name) - 1] = 0;
pp->res[0].name = pp->mem_space_name;
if (pp->index == 0) {
pp->res[0].start = PCIE_ARB_BASE_ADDR;
pp->res[0].end = pp->res[0].start + SZ_16M - SZ_1M - 1;
}
pp->res[0].flags = IORESOURCE_MEM;
if (request_resource(&iomem_resource, &pp->res[0]))
panic("Request PCIe Memory resource failed\n");
sys->resource[0] = &pp->res[0];

 

 

Thanks in advance,

Greg

Outcomes