/*
* 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 (c) 2012 Gary Mills
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ATGE_L1E_REG_H
#define _ATGE_L1E_REG_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Number of RX Rings (or pages) we use.
*/
#pragma pack(1)
typedef struct rx_rs {
} rx_rs_t;
typedef struct rx_cmb {
} rx_cmb_t;
#pragma pack()
/* Master configuration */
/*
* DMA CFG registers (L1E specific).
*/
#define L1E_RX_PAGE_SZ \
#define L1E_PROC_MAX \
#define L1E_INTRS \
#define INT_TRIG_TX_THRESH_SHIFT 0
#define INT_TRIG_TX_TIMER_SHIFT 0
#define L1E_RD_SEQNO_SHIFT 0
#define L1E_RX_SEQNO(x) \
(((x) & L1E_RD_SEQNO_MASK) >> L1E_RD_SEQNO_SHIFT)
#define L1E_RD_CSUM_SHIFT 0
#define L1E_RX_CSUM(x) \
(((x) & L1E_RD_CSUM_MASK) >> L1E_RD_CSUM_SHIFT)
#define L1E_RX_BYTES(x) \
(((x) & L1E_RD_LEN_MASK) >> L1E_RD_LEN_SHIFT)
#define L1E_RX_CPU(x) \
(((x) & L1E_RD_CPU_MASK) >> L1E_RD_CPU_SHIFT)
/* TX descriptor fields */
#define L1E_TX_VLAN_TAG(x) \
(((x) << 4) | ((x) >> 13) | (((x) >> 9) & 8))
#define L1E_TD_BUFLEN_SHIFT 0
#define TX_JUMBO_THRESH_SHIFT 0
/*
* Statistics counters collected by the MAC.
* AR81xx requires register access to get MAC statistics
* and the format of statistics seems to be the same of L1
* except for tx_abort field in TX stats. So keep it separate for simplicity.
*/
#pragma pack(1)
typedef struct smb {
/* Rx stats. */
/* Tx stats. */
#pragma pack()
#ifdef __cplusplus
}
#endif
#endif /* _ATGE_L1E_REG_H */