hpi_txdma.h revision 3dec9fcdd56adf1b4a563137b4915c8f2d83b881
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _HPI_TXDMA_H
#define _HPI_TXDMA_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <hpi.h>
#include <hxge_txdma_hw.h>
#include <hxge_tdc_hw.h>
typedef enum _txdma_cs_cntl_e {
TXDMA_INIT_RESET = 0x1,
TXDMA_INIT_START = 0x2,
TXDMA_START = 0x3,
TXDMA_RESET = 0x4,
TXDMA_STOP = 0x5,
TXDMA_MBOX_ENABLE = 0x6
#define HXGE_TXDMA_OFFSET(x, v, channel) (x + \
/*
* PIO macros to read and write the transmit registers.
*/
#define HPI_TXDMA_GATHER_INDEX(index) \
/*
* Transmit HPI error codes
*/
#define TXDMA_ID_SHIFT(n) (n << HPI_PORT_CHAN_SHIFT)
#define HPI_TXDMA_OPCODE_INVALID(n) (TXDMA_ID_SHIFT(n) | \
#define HPI_TXDMA_FUNC_INVALID(n) (TXDMA_ID_SHIFT(n) | \
#define HPI_TXDMA_CHANNEL_INVALID(n) (TXDMA_ID_SHIFT(n) | \
#define HPI_TXDMA_PAGE_INVALID(n) (TXDMA_ID_SHIFT(n) | \
/*
* Transmit DMA Channel HPI Prototypes.
*/
int desc_index);
#ifdef __cplusplus
}
#endif
#endif /* _HPI_TXDMA_H */