Software Drivers

xbram.c File Reference

#include "xbram.h"
#include "xstatus.h"

Functions

int XBram_CfgInitialize (XBram *InstancePtr, XBram_Config *Config, u32 EffectiveAddr)

Detailed Description

The implementation of the XBram driver's basic functionality. See xbram.h for more information about the driver.

Note:

None

 MODIFICATION HISTORY:
 Ver   Who  Date     Changes
 ----- ---- -------- -----------------------------------------------
 1.00a sa   05/11/10 First release
 3.01a sa   13/01/12 Added CorrectableFailingDataRegs and
                     UncorrectableFailingDataRegs in
					  XBram_CfgInitialize API.

Function Documentation

int XBram_CfgInitialize ( XBram InstancePtr,
XBram_Config Config,
u32  EffectiveAddr 
)

Initialize the XBram instance provided by the caller based on the given configuration data.

Nothing is done except to initialize the InstancePtr.

Parameters:
InstancePtr is a pointer to an XBram instance. The memory the pointer references must be pre-allocated by the caller. Further calls to manipulate the driver through the XBram API must be made with this pointer.
Config is a reference to a structure containing information about a specific BRAM device. This function initializes an InstancePtr object for a specific device specified by the contents of Config. This function can initialize multiple instance objects with the use of multiple calls giving different Config information on each call.
EffectiveAddr is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, use Config->BaseAddress for this parameters, passing the physical address instead.
Returns:
  • XST_SUCCESS Initialization was successful.
Note:
None.