MPC83xx PCI Memory Access causes system hang

I have an MPC83xx based system. We have PCI device connected. I am currently working on the bootloader to setup and test the PCI subsystem onboard.

Following things are done.

  1. Enabled PCI
  2. configured and identified all the PCI devices onboard.
  3. Identified the Memory space needed for each of the device.
  4. Following setting are done

- system registers are located @ 0xE0000000

- hence configured PIMMR reg to 0xE0000000

- enabled PCI clock in OCCR reg

- set the PCILAWBAR0 to 0x80000000 (memory space)

- set the PCILAWBAR1 to 0xA0000000 (prefetch memory)

- set Outbound translation registers as follows: Outbound BAR0 - 0x00080000 (Memory) Outbound BAR1 - 0x000A0000 (Prefetch) Outbound BAR0 - 0x000A8000 (I/O)

- set Inbound translation registers as follows: Inbound BAR0 - 0 Inbound BAR1 - disabled Inbound BAR2 - disabled

- after this, reset the PCI thru GCR register

- enabled the Memory / IO in command register of the MPC83xx PCI controller

- identified the various PCI devices in the system and configured the memory bars (Memory Mapped BARS) from address 0x80000000

Problem I am facing:

  1. After this particular setting, I expected accessing memory from
0x80000000 will get the particular devices memory. but, when i accessed the memory the system is hanging. so, i want to what maybe the issue in my configuration ?

some of the pointers that might help me are:

  1. Do I need to configure the DBAT registers ?
  2. For the processor to understand that 0x80000000 + memory is PCI memory, is the above configuration sufficient ?

  1. Also, if somebody can throw somelight on how the memory maps are exactly defined for MPC83xx ( is it just the IBAT and DBAT or something else as well) ???

Reply to
spv
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.