Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
buffer_icap.c File Reference
#include "buffer_icap.h"

Go to the source code of this file.

Macros

#define XHI_MAX_BUFFER_BYTES   2048
 
#define XHI_MAX_BUFFER_INTS   (XHI_MAX_BUFFER_BYTES >> 2)
 
#define XHI_DEVICE_READ_ERROR   -1
 
#define XHI_DEVICE_WRITE_ERROR   -2
 
#define XHI_BUFFER_OVERFLOW_ERROR   -3
 
#define XHI_DEVICE_READ   0x1
 
#define XHI_DEVICE_WRITE   0x0
 
#define XHI_CYCLE_DONE   0
 
#define XHI_CYCLE_EXECUTING   1
 
#define XHI_SIZE_REG_OFFSET   0x800L
 
#define XHI_BRAM_OFFSET_REG_OFFSET   0x804L
 
#define XHI_RNC_REG_OFFSET   0x808L
 
#define XHI_STATUS_REG_OFFSET   0x80CL
 
#define XHI_CONFIGURE   0x0UL
 
#define XHI_READBACK   0x1UL
 
#define XHI_NOT_FINISHED   0x0UL
 
#define XHI_FINISHED   0x1UL
 
#define XHI_BUFFER_START   0
 

Functions

u32 buffer_icap_get_status (struct hwicap_drvdata *drvdata)
 
void buffer_icap_reset (struct hwicap_drvdata *drvdata)
 
int buffer_icap_set_configuration (struct hwicap_drvdata *drvdata, u32 *data, u32 size)
 
int buffer_icap_get_configuration (struct hwicap_drvdata *drvdata, u32 *data, u32 size)
 

Macro Definition Documentation

#define XHI_BRAM_OFFSET_REG_OFFSET   0x804L

Definition at line 56 of file buffer_icap.c.

#define XHI_BUFFER_OVERFLOW_ERROR   -3

Definition at line 42 of file buffer_icap.c.

#define XHI_BUFFER_START   0

Definition at line 70 of file buffer_icap.c.

#define XHI_CONFIGURE   0x0UL

Definition at line 63 of file buffer_icap.c.

#define XHI_CYCLE_DONE   0

Definition at line 48 of file buffer_icap.c.

#define XHI_CYCLE_EXECUTING   1

Definition at line 49 of file buffer_icap.c.

#define XHI_DEVICE_READ   0x1

Definition at line 44 of file buffer_icap.c.

#define XHI_DEVICE_READ_ERROR   -1

Definition at line 40 of file buffer_icap.c.

#define XHI_DEVICE_WRITE   0x0

Definition at line 45 of file buffer_icap.c.

#define XHI_DEVICE_WRITE_ERROR   -2

Definition at line 41 of file buffer_icap.c.

#define XHI_FINISHED   0x1UL

Definition at line 68 of file buffer_icap.c.

#define XHI_MAX_BUFFER_BYTES   2048

Definition at line 36 of file buffer_icap.c.

#define XHI_MAX_BUFFER_INTS   (XHI_MAX_BUFFER_BYTES >> 2)

Definition at line 37 of file buffer_icap.c.

#define XHI_NOT_FINISHED   0x0UL

Definition at line 67 of file buffer_icap.c.

#define XHI_READBACK   0x1UL

Definition at line 64 of file buffer_icap.c.

#define XHI_RNC_REG_OFFSET   0x808L

Definition at line 58 of file buffer_icap.c.

#define XHI_SIZE_REG_OFFSET   0x800L

Definition at line 54 of file buffer_icap.c.

#define XHI_STATUS_REG_OFFSET   0x80CL

Definition at line 60 of file buffer_icap.c.

Function Documentation

int buffer_icap_get_configuration ( struct hwicap_drvdata drvdata,
u32 data,
u32  size 
)

buffer_icap_get_configuration - Read configuration data from the device. : a pointer to the drvdata. : Address of the data representing the partial bitstream : the size of the partial bitstream in 32 bit words.

Definition at line 326 of file buffer_icap.c.

u32 buffer_icap_get_status ( struct hwicap_drvdata drvdata)

buffer_icap_get_status - Get the contents of the status register. : a pointer to the drvdata.

The status register contains the ICAP status and the done bit.

D8 - cfgerr D7 - dalign D6 - rip D5 - in_abort_l D4 - Always 1 D3 - Always 1 D2 - Always 1 D1 - Always 1 D0 - Done bit

Definition at line 88 of file buffer_icap.c.

void buffer_icap_reset ( struct hwicap_drvdata drvdata)

buffer_icap_reset - Reset the logic of the icap device. : a pointer to the drvdata.

Writing to the status register resets the ICAP logic in an internal version of the core. For the version of the core published in EDK, this is a noop.

Definition at line 256 of file buffer_icap.c.

int buffer_icap_set_configuration ( struct hwicap_drvdata drvdata,
u32 data,
u32  size 
)

buffer_icap_set_configuration - Load a partial bitstream from system memory. : a pointer to the drvdata. : Kernel address of the partial bitstream. : the size of the partial bitstream in 32 bit words.

Definition at line 267 of file buffer_icap.c.