/***************************************************************************** * * Author: Xilinx, Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS" * AS A COURTESY TO YOU, SOLELY FOR USE IN DEVELOPING PROGRAMS AND * SOLUTIONS FOR XILINX DEVICES. BY PROVIDING THIS DESIGN, CODE, * OR INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, * APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION * THAT THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT, * AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE * FOR YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY * WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE * IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR * REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * * (c) Copyright 2003-2007 Xilinx Inc. * All rights reserved. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. *
*****************************************************************************/
#ifndef XILINX_HWICAP_H_ /* prevent circular inclusions */ #define XILINX_HWICAP_H_ /* by using protection macros */
struct hwicap_drvdata {
u32 write_buffer_in_use; /* Always in [0,3] */
u8 write_buffer[4];
u32 read_buffer_in_use; /* Always in [0,3] */
u8 read_buffer[4];
resource_size_t mem_start;/* phys. address of the control registers */
resource_size_t mem_end; /* phys. address of the control registers */
resource_size_t mem_size; void __iomem *base_address;/* virt. address of the control registers */
struct hwicap_driver_config { /* Read configuration data given by size into the data buffer. * Return 0 if successful.
*/ int (*get_configuration)(struct hwicap_drvdata *drvdata, u32 *data,
u32 size); /* Write configuration data given by size from the data buffer. * Return 0 if successful.
*/ int (*set_configuration)(struct hwicap_drvdata *drvdata, u32 *data,
u32 size); /* Get the status register, bit pattern given by: * D8 - 0 = configuration error * D7 - 1 = alignment found * D6 - 1 = readback in progress * D5 - 0 = abort in progress * D4 - Always 1 * D3 - Always 1 * D2 - Always 1 * D1 - Always 1 * D0 - 1 = operation completed
*/
u32 (*get_status)(struct hwicap_drvdata *drvdata); /* Reset the hw */ void (*reset)(struct hwicap_drvdata *drvdata);
};
/* Number of times to poll the done register. This has to be large * enough to allow an entire configuration to complete. If an entire * page (4kb) is configured at once, that could take up to 4k cycles * with a byte-wide icap interface. In most cases, this driver is * used with a much smaller fifo, but this should be sufficient in the * worst case.
*/ #define XHI_MAX_RETRIES 5000
/* Constant to use for CRC check when CRC has been disabled */ #define XHI_DISABLED_AUTO_CRC 0x0000DEFCUL
/* Meanings of the bits returned by get_status */ #define XHI_SR_CFGERR_N_MASK 0x00000100 /* Config Error Mask */ #define XHI_SR_DALIGN_MASK 0x00000080 /* Data Alignment Mask */ #define XHI_SR_RIP_MASK 0x00000040 /* Read back Mask */ #define XHI_SR_IN_ABORT_N_MASK 0x00000020 /* Select Map Abort Mask */ #define XHI_SR_DONE_MASK 0x00000001 /* Done bit Mask */
/** * hwicap_type_1_read - Generates a Type 1 read packet header. * @reg: is the address of the register to be read back. * * Return: * Generates a Type 1 read packet header, which is used to indirectly * read registers in the configuration logic. This packet must then * be sent through the icap device, and a return packet received with * the information.
*/ staticinline u32 hwicap_type_1_read(u32 reg)
{ return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |
(reg << XHI_REGISTER_SHIFT) |
(XHI_OP_READ << XHI_OP_SHIFT);
}
/** * hwicap_type_1_write - Generates a Type 1 write packet header * @reg: is the address of the register to be read back. * * Return: Type 1 write packet header
*/ staticinline u32 hwicap_type_1_write(u32 reg)
{ return (XHI_TYPE_1 << XHI_TYPE_SHIFT) |
(reg << XHI_REGISTER_SHIFT) |
(XHI_OP_WRITE << XHI_OP_SHIFT);
}
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.23 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.