Lines Matching +full:data +full:- +full:transfer

24  *     (c) Copyright 2003-2008 Xilinx Inc.
40 #define XHI_DEVICE_READ_ERROR -1
41 #define XHI_DEVICE_WRITE_ERROR -2
42 #define XHI_BUFFER_OVERFLOW_ERROR -3
47 /* Constants for checking transfer status */
53 /* Size of transfer, read & write */
57 /* Read not Configure, direction of transfer. Write only */
59 /* Indicates transfer complete. Read only */
73 * buffer_icap_get_status - Get the contents of the status register.
78 * D8 - cfgerr
79 * D7 - dalign
80 * D6 - rip
81 * D5 - in_abort_l
82 * D4 - Always 1
83 * D3 - Always 1
84 * D2 - Always 1
85 * D1 - Always 1
86 * D0 - Done bit
90 return in_be32(drvdata->base_address + XHI_STATUS_REG_OFFSET); in buffer_icap_get_status()
94 * buffer_icap_get_bram - Reads data from the storage buffer bram.
96 * @offset: The word offset from which the data should be read.
98 * A bram is used as a configuration memory cache. One frame of data can
108 * buffer_icap_busy - Return true if the icap device is busy
122 * buffer_icap_set_size - Set the size register.
124 * @data: The size in bytes.
126 * The size register holds the number of 8 bit bytes to transfer between
130 u32 data) in buffer_icap_set_size() argument
132 out_be32(base_address + XHI_SIZE_REG_OFFSET, data); in buffer_icap_set_size()
136 * buffer_icap_set_offset - Set the bram offset register.
138 * @data: is the value to be written to the data register.
140 * The bram offset register holds the starting bram address to transfer
141 * data from during configuration or write data to during readback.
144 u32 data) in buffer_icap_set_offset() argument
146 out_be32(base_address + XHI_BRAM_OFFSET_REG_OFFSET, data); in buffer_icap_set_offset()
150 * buffer_icap_set_rnc - Set the RNC (Readback not Configure) register.
152 * @data: is the value to be written to the data register.
154 * The RNC register determines the direction of the data transfer. It
156 * this register initiates the transfer. A value of 1 initiates a
160 u32 data) in buffer_icap_set_rnc() argument
162 out_be32(base_address + XHI_RNC_REG_OFFSET, data); in buffer_icap_set_rnc()
166 * buffer_icap_set_bram - Write data to the storage buffer bram.
168 * @offset: The word offset at which the data should be written.
169 * @data: The value to be written to the bram offset.
171 * A bram is used as a configuration memory cache. One frame of data can
175 u32 offset, u32 data) in buffer_icap_set_bram() argument
177 out_be32(base_address + (offset << 2), data); in buffer_icap_set_bram()
181 * buffer_icap_device_read - Transfer bytes from ICAP to the storage buffer.
192 void __iomem *base_address = drvdata->base_address; in buffer_icap_device_read()
195 return -EBUSY; in buffer_icap_device_read()
198 return -EINVAL; in buffer_icap_device_read()
208 return -EBUSY; in buffer_icap_device_read()
215 * buffer_icap_device_write - Transfer bytes from ICAP to the storage buffer.
226 void __iomem *base_address = drvdata->base_address; in buffer_icap_device_write()
229 return -EBUSY; in buffer_icap_device_write()
232 return -EINVAL; in buffer_icap_device_write()
242 return -EBUSY; in buffer_icap_device_write()
249 * buffer_icap_reset - Reset the logic of the icap device.
258 out_be32(drvdata->base_address + XHI_STATUS_REG_OFFSET, 0xFEFE); in buffer_icap_reset()
262 * buffer_icap_set_configuration - Load a partial bitstream from system memory.
264 * @data: Kernel address of the partial bitstream.
267 int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data, in buffer_icap_set_configuration() argument
274 void __iomem *base_address = drvdata->base_address; in buffer_icap_set_configuration()
276 /* Loop through all the data */ in buffer_icap_set_configuration()
279 /* Copy data to bram */ in buffer_icap_set_configuration()
280 buffer_icap_set_bram(base_address, buffer_count, data[i]); in buffer_icap_set_configuration()
283 if (buffer_count < XHI_MAX_BUFFER_INTS - 1) { in buffer_icap_set_configuration()
288 /* Write data to ICAP */ in buffer_icap_set_configuration()
303 /* Write unwritten data to ICAP */ in buffer_icap_set_configuration()
305 /* Write data to ICAP */ in buffer_icap_set_configuration()
319 * buffer_icap_get_configuration - Read configuration data from the device.
321 * @data: Address of the data representing the partial bitstream
324 int buffer_icap_get_configuration(struct hwicap_drvdata *drvdata, u32 *data, in buffer_icap_get_configuration() argument
330 void __iomem *base_address = drvdata->base_address; in buffer_icap_get_configuration()
332 /* Loop through all the data */ in buffer_icap_get_configuration()
335 u32 words_remaining = size - i; in buffer_icap_get_configuration()
341 /* Read data from ICAP */ in buffer_icap_get_configuration()
355 /* Copy data from bram */ in buffer_icap_get_configuration()
356 data[i] = buffer_icap_get_bram(base_address, buffer_count); in buffer_icap_get_configuration()