/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ /* * Copyright (c) 2015-2016, Integrated Device Technology Inc. * Copyright (c) 2015, Prodrive Technologies * Copyright (c) 2015, Texas Instruments Incorporated * Copyright (c) 2015, RapidIO Trade Association * All rights reserved. * * This software is available to you under a choice of one of two licenses. * You may choose to be licensed under the terms of the GNU General Public * License(GPL) Version 2, or the BSD-3 Clause license below: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* RapidIO base address for inbound requests set to value defined below * indicates that no specific RIO-to-local address translation is requested * and driver should use direct (one-to-one) address mapping.
*/ #define RIO_MAP_ANY_ADDR (__u64)(~((__u64) 0))
/* * RapidIO data exchange transactions are lists of individual transfers. Each * transfer exchanges data between two RapidIO devices by remote direct memory * access and has its own completion code. * * The RapidIO specification defines four types of data exchange requests: * NREAD, NWRITE, SWRITE and NWRITE_R. The RapidIO DMA channel interface allows * to specify the required type of write operation or combination of them when * only the last data packet requires response. * * NREAD: read up to 256 bytes from remote device memory into local memory * NWRITE: write up to 256 bytes from local memory to remote device memory * without confirmation * SWRITE: as NWRITE, but all addresses and payloads must be 64-bit aligned * NWRITE_R: as NWRITE, but expect acknowledgment from remote device. * * The default exchange is chosen from NREAD and any of the WRITE modes as the * driver sees fit. For write requests the user can explicitly choose between * any of the write modes for each transaction.
*/ enum rio_exchange {
RIO_EXCHANGE_DEFAULT, /* Default method */
RIO_EXCHANGE_NWRITE, /* All packets using NWRITE */
RIO_EXCHANGE_SWRITE, /* All packets using SWRITE */
RIO_EXCHANGE_NWRITE_R, /* Last packet NWRITE_R, others NWRITE */
RIO_EXCHANGE_SWRITE_R, /* Last packet NWRITE_R, others SWRITE */
RIO_EXCHANGE_NWRITE_R_ALL, /* All packets using NWRITE_R */
};
struct rio_transfer_io {
__u64 rio_addr; /* Address in target's RIO mem space */
__u64 loc_addr;
__u64 handle;
__u64 offset; /* Offset in buffer */
__u64 length; /* Length in bytes */
__u16 rioid; /* Target destID */
__u16 method; /* Data exchange method, one of rio_exchange enum */
__u32 completion_code; /* Completion code for this transfer */
};
struct rio_transaction {
__u64 block; /* Pointer to array of <count> transfers */
__u32 count; /* Number of transfers */
__u32 transfer_mode; /* Data transfer mode */
__u16 sync; /* Synch method, one of rio_transfer_sync enum */
__u16 dir; /* Transfer direction, one of rio_transfer_dir enum */
__u32 pad0;
};
struct rio_async_tx_wait {
__u32 token; /* DMA transaction ID token */
__u32 timeout; /* Wait timeout in msec, if 0 use default TO */
};
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.