------_=_NextPart_001_01C096F6.8909DCA0
Content-Type: text/plain;
charset="iso-8859-1"
Hi,
I am using MPC 8240 Kahlua based evaluation board. When I am trying to plug
PM/PPC (artesyn board) into the unused PCI slot of MPC 8240 board, I am not
able to boot MPC 8240 board. I have added code in syslib.c to issue
PCI_CMD_MASTER_ENABLE to PM/PPC who waits for that. Other than this, I have
not included any code for memory space mapping as I am not going to access
any memory from MPC 8240 as of now.
My questions are
1. What are all the minimum initialization which are mandatory to be done
for plugging an PCI device in the bus from bus arbiter point of view.
2. If I need to access memory from both end (from MPC 8240 to PM/PPC and
vice-versa), with MPC8240 as bus arbiter, what are all the steps I need to
follow. What init codes I need to add in both bsp?
Please help me in this regard
bye
ram
------_=_NextPart_001_01C096F6.8909DCA0
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.3207.2500" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<P>Hi,</P>
<P>I am using MPC 8240 Kahlua based evaluation board. When I am trying to plug
PM/PPC (artesyn board) into the unused PCI slot of MPC 8240 board, I am not able
to boot MPC 8240 board. I have added code in syslib.c to issue
PCI_CMD_MASTER_ENABLE to PM/PPC who waits for that. Other than this, I have not
included any code for memory space mapping as I am not going to access any
memory from MPC 8240 as of now. </P>
<P>My questions are</P>
<P>1. What are all the minimum initialization which are mandatory to be done for
plugging an PCI device in the bus from bus arbiter point of view.</P>
<P>2. If I need to access memory from both end (from MPC 8240 to PM/PPC and
vice-versa), with MPC8240 as bus arbiter, what are all the steps I need to
follow. What init codes I need to add in both bsp?</P>
<P>Please help me in this regard</P>
<P>bye</P>
<P>ram</P></FONT></DIV></BODY></HTML>
------_=_NextPart_001_01C096F6.8909DCA0--
> 1. What are all the minimum initialization which are mandatory to be done
> for plugging an PCI device in the bus from bus arbiter point of view.
The WindRiver provides the PCI AutoConfiguration driver w/ source.
During bootup the PCI devices should come up initialized - semi plug and
play.
Anyway, typically to configure the PCI device the Configuration header
is filled which is nothing but the PCI initialization. The steps other
than device specific init are to fill up following headers -
Command Register : Enable IO/Memory, Parity Error. Also see if your
device wants to be bus master.
Cache Line : Typically 32.
Latency : Full, 0xFF.
Interrupts : Almost devices use INTA. Again the PCI library mentioned
above, provides routines to allocate and manage interrupts.
BARs : Remember the PCI BAR values are physical addresses as seen
by PCI device and not virtual addresses seen from CPU. So for example IO
add offset 0x80000000 and to access memory you add offset of 0xC0000000
to the physical address to get virtual address. To get physcial from
virtual, I bet you know what to do! The actual memory map depends on
your board configuration. Refer your config.h it should be somewhere
there.
> 2. If I need to access memory from both end (from MPC 8240 to PM/PPC and
> vice-versa), with MPC8240 as bus arbiter, what are all the steps I need to
> follow. What init codes I need to add in both bsp?
Once you configure the PCI header with appropriate BAR and other values.
The IO and/or Memory access is performed as given in BAR explanation
above.
Also a mundane note but very important, PCI is a Little Endian bus.
HTH.
Girish.
Keep in mind that there is a distinct difference between a PCI Master and a
PCI Monarch. A non-Monarch PCI device can be a PCI bus Master. A PCI bus
Master can REQ the PCI bus, but will not enumerate the PCI bus (unless a PCI
Monarch). A PCI Monarch (should have PCI Master capabilities) and will
enumerate the PCI bus & handle PCI interrupts.
"jagan" <ja...@mediaone.net> wrote in message
news:3A8D575B...@mediaone.net...