BSP User Guide

Add to my manuals
152 Pages

advertisement

BSP User Guide | Manualzz

pciLocalToPciAdrs (replaced with sysLocalToBusAdrs)

Synopsis.

int pciLocalToPciAdrs ( int adrsSpace, char *localAdrs, char **busAdrs, int busId) adrsSpace - specifies which PCI address space. Must be one of the following defined constants:

PCI_MEMORY_SPACE (1) or PCI_IO_SPACE (2).

localAdrs - local address to convert.

busAdrs - where the converted address is returned.

busId - This parameter is not used.

Say the application code allocates a buffer in the PPC440 DRAM. In order for other PCI masters to access this buffer, the buffer's PCI address must be obtained from its corresponding local address.

Description.

Returns.

Example.

OK

, or

ERROR

.

char *localAdrs, *busAdrs;

/* Allocate a 1KB buffer in MPC8240 DRAM */ localAdrs = malloc (1024); if (localAdrs == NULL)

return (ERROR);

/* Find PCI address of buffer */ if (pciLocalToPciAdrs (PCI_MEMORY_SPACE, localAdrs, &busAdrs, 0) == ERROR)

return (ERROR); printf ("buffer local addr=0x%x, buffer PCI

bus address=0x%x\n", localAdrs, busAdrs);

Issued June 20, 2007 M5000 Series: BSP User Guide

147

Deprecated Functions

148

M5000 Series: BSP User Guide Issued June 20, 2007

C

Built In Self Test

(BIST) API.

Issued June 20, 2007

M5000 Series: BSP User Guide

149

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement

Table of contents