Now, I am using TMS320C6670, and I am puzzled when use PCIESS. On page 39 of sprugs6c said:
“In 32-bit addressing, BAR0 is dedicated to Address Space 0 and BAR1-BAR5 are dedicated to Address Space 1. Regions 0~3 should be associated only with BAR1~BAR5”.
But when I use the PCIE boot_loader example of mcsdk_2_01_02_05, I find some codes are conflicted with it.
/* Configure IB_BAR0 to BAR0 for PCIE registers;
Configure IB_BAR1 to BAR1 for LL2 for core 0
Configure IB_BAR2 to BAR2 for MSMC;
Configure IB_BAR3 to BAR3 for DDR */
for (i = 0; i < 4; i++)
{
iowrite32(i, ptrReg + IB_BAR(i)/4);
iowrite32(PCIE_DEV->resource[i].start, ptrReg + IB_START_LO(i)/4);
iowrite32(0, ptrReg + IB_START_HI(i)/4);
}
iowrite32(PCIE_BASE_ADDRESS, ptrReg + IB_OFFSET(0)/4);
iowrite32(LL2_START + (1 << 28), ptrReg + IB_OFFSET(1)/4);
iowrite32(MSMC_START, ptrReg + IB_OFFSET(2)/4);
iowrite32(DDR_START, ptrReg + IB_OFFSET(3)/4);
Is there something wrong with it?
Thank you very much!