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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

1,207件の閲覧回数
GregT
Contributor III

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

ラベル(2)
タグ(1)
0 件の賞賛
返信
2 返答(返信)

1,080件の閲覧回数
GregT
Contributor III

I've made the above changes and our system is still running correctly.  Looks like an easy way to get an extra MB for PCIe BAR space if you don't need to support legacy PCI devices that use I/O resources.

0 件の賞賛
返信

1,080件の閲覧回数
b36401
NXP Employee
NXP Employee

Yes. It can be tuned with BAR configuration.
However officially it is not recommended.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------