/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright (c) 2012 Gary Mills
*/
#ifndef _ATGE_L1_REG_H
#define _ATGE_L1_REG_H
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(1)
typedef struct l1_cmb {
} l1_cmb_t;
typedef struct l1_rx_desc {
} l1_rx_desc_t;
typedef struct l1_rx_rdesc {
/*
* Statistics counters collected by the MAC
*/
typedef struct l1_smb {
/* Rx stats. */
/* Tx stats. */
#pragma pack()
#define L1_RX_RING_SZ \
(sizeof (struct l1_rx_desc) * L1_RX_RING_CNT)
#define L1_RR_RING_SZ \
(sizeof (struct l1_rx_rdesc) * L1_RR_RING_CNT)
/*
* For RX
*/
#define L1_RRD_NSEGS_SHIFT 0
#define L1_RRD_CSUM_SHIFT 0
#define RRD_PROD_SHIFT 0
/*
*/
#define DESC_RD_CNT_SHIFT 0
/*
* PHY registers.
*/
/*
* DMA CFG registers (L1 specific)
*/
#define L1_RD_LEN_SHIFT 0
#define RXQ_CFG_RD_BURST_SHIFT 0
#define TX_JUMBO_TPD_TH_SHIFT 0
/* CMB DMA Write Threshold Register */
#define CMB_WR_THRESH_RRD_SHIFT 0
/* SMB auto DMA timer register */
#define L1_INTRS \
#define RXQ_RRD_PAUSE_THRESH_HI_SHIFT 0
#define CMB_WR_TIMER_RX_SHIFT 0
/*
* Useful macros.
*/
#define L1_RX_NSEGS(x) \
(((x) & L1_RRD_NSEGS_MASK) >> L1_RRD_NSEGS_SHIFT)
#define L1_RX_CONS(x) \
(((x) & L1_RRD_CONS_MASK) >> L1_RRD_CONS_SHIFT)
#define L1_RX_CSUM(x) \
(((x) & L1_RRD_CSUM_MASK) >> L1_RRD_CSUM_SHIFT)
#define L1_RX_BYTES(x) \
(((x) & L1_RRD_LEN_MASK) >> L1_RRD_LEN_SHIFT)
#ifdef __cplusplus
}
#endif
#endif /* _ATGE_L1_REG_H */