1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#ifndef	_SYS_NXGE_NXGE_FZC_H
28#define	_SYS_NXGE_NXGE_FZC_H
29
30#ifdef	__cplusplus
31extern "C" {
32#endif
33
34#include <npi_vir.h>
35
36nxge_status_t nxge_fzc_intr_init(p_nxge_t);
37nxge_status_t nxge_fzc_intr_ldg_num_set(p_nxge_t);
38nxge_status_t nxge_fzc_intr_tmres_set(p_nxge_t);
39nxge_status_t nxge_fzc_intr_sid_set(p_nxge_t);
40
41nxge_status_t nxge_fzc_dmc_rx_log_page_vld(p_nxge_t, uint16_t,
42	uint32_t, boolean_t);
43nxge_status_t nxge_fzc_dmc_rx_log_page_mask(p_nxge_t, uint16_t,
44	uint32_t, uint32_t, uint32_t);
45
46void nxge_init_fzc_txdma_channels(p_nxge_t);
47
48nxge_status_t nxge_init_fzc_tdc(p_nxge_t, uint16_t);
49nxge_status_t nxge_init_fzc_txdma_channel(p_nxge_t, uint16_t,
50	p_tx_ring_t, p_tx_mbox_t);
51nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
52
53nxge_status_t nxge_init_fzc_rxdma_channel(p_nxge_t, uint16_t);
54
55nxge_status_t nxge_init_fzc_rdc(p_nxge_t, uint16_t);
56nxge_status_t nxge_init_fzc_rx_common(p_nxge_t);
57nxge_status_t nxge_init_fzc_rxdma_port(p_nxge_t);
58
59nxge_status_t nxge_init_fzc_rdc_tbl(nxge_t *, nxge_rdc_grp_t *, int);
60
61int nxge_fzc_rdc_tbl_bind(nxge_t *, int, int);
62int nxge_fzc_rdc_tbl_unbind(p_nxge_t, int);
63
64nxge_status_t nxge_init_fzc_rxdma_channel_pages(p_nxge_t,
65	uint16_t, p_rx_rbr_ring_t);
66
67nxge_status_t nxge_init_fzc_rxdma_channel_red(p_nxge_t,
68	uint16_t, p_rx_rcr_ring_t);
69
70nxge_status_t nxge_init_fzc_rxdma_channel_clrlog(p_nxge_t,
71	uint16_t, p_rx_rbr_ring_t);
72
73nxge_status_t nxge_init_fzc_txdma_channel_pages(p_nxge_t,
74	uint16_t, p_tx_ring_t);
75
76nxge_status_t nxge_init_fzc_txdma_channel_drr(p_nxge_t, uint16_t,
77	p_tx_ring_t);
78
79nxge_status_t nxge_init_fzc_txdma_port(p_nxge_t);
80
81void nxge_init_fzc_ldg_num(p_nxge_t);
82void nxge_init_fzc_sys_int_data(p_nxge_t);
83void nxge_init_fzc_ldg_int_timer(p_nxge_t);
84nxge_status_t nxge_fzc_sys_err_mask_set(p_nxge_t, uint64_t);
85
86#if	defined(sun4v) && defined(NIU_LP_WORKAROUND)
87nxge_status_t nxge_init_hv_fzc_rxdma_channel_pages(p_nxge_t,
88	uint16_t, p_rx_rbr_ring_t);
89nxge_status_t nxge_init_hv_fzc_txdma_channel_pages(p_nxge_t,
90	uint16_t, p_tx_ring_t);
91#endif
92
93#ifdef	__cplusplus
94}
95#endif
96
97#endif	/* _SYS_NXGE_NXGE_FZC_H */
98