18c2ecf20Sopenharmony_ci/***************************************************************************** 28c2ecf20Sopenharmony_ci * * 38c2ecf20Sopenharmony_ci * File: espi.h * 48c2ecf20Sopenharmony_ci * $Revision: 1.7 $ * 58c2ecf20Sopenharmony_ci * $Date: 2005/06/21 18:29:47 $ * 68c2ecf20Sopenharmony_ci * Description: * 78c2ecf20Sopenharmony_ci * part of the Chelsio 10Gb Ethernet Driver. * 88c2ecf20Sopenharmony_ci * * 98c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify * 108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, version 2, as * 118c2ecf20Sopenharmony_ci * published by the Free Software Foundation. * 128c2ecf20Sopenharmony_ci * * 138c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License along * 148c2ecf20Sopenharmony_ci * with this program; if not, see <http://www.gnu.org/licenses/>. * 158c2ecf20Sopenharmony_ci * * 168c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * 178c2ecf20Sopenharmony_ci * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * 188c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * 198c2ecf20Sopenharmony_ci * * 208c2ecf20Sopenharmony_ci * http://www.chelsio.com * 218c2ecf20Sopenharmony_ci * * 228c2ecf20Sopenharmony_ci * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. * 238c2ecf20Sopenharmony_ci * All rights reserved. * 248c2ecf20Sopenharmony_ci * * 258c2ecf20Sopenharmony_ci * Maintainers: maintainers@chelsio.com * 268c2ecf20Sopenharmony_ci * * 278c2ecf20Sopenharmony_ci * Authors: Dimitrios Michailidis <dm@chelsio.com> * 288c2ecf20Sopenharmony_ci * Tina Yang <tainay@chelsio.com> * 298c2ecf20Sopenharmony_ci * Felix Marti <felix@chelsio.com> * 308c2ecf20Sopenharmony_ci * Scott Bardone <sbardone@chelsio.com> * 318c2ecf20Sopenharmony_ci * Kurt Ottaway <kottaway@chelsio.com> * 328c2ecf20Sopenharmony_ci * Frank DiMambro <frank@chelsio.com> * 338c2ecf20Sopenharmony_ci * * 348c2ecf20Sopenharmony_ci * History: * 358c2ecf20Sopenharmony_ci * * 368c2ecf20Sopenharmony_ci ****************************************************************************/ 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#ifndef _CXGB_ESPI_H_ 398c2ecf20Sopenharmony_ci#define _CXGB_ESPI_H_ 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#include "common.h" 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_cistruct espi_intr_counts { 448c2ecf20Sopenharmony_ci unsigned int DIP4_err; 458c2ecf20Sopenharmony_ci unsigned int rx_drops; 468c2ecf20Sopenharmony_ci unsigned int tx_drops; 478c2ecf20Sopenharmony_ci unsigned int rx_ovflw; 488c2ecf20Sopenharmony_ci unsigned int parity_err; 498c2ecf20Sopenharmony_ci unsigned int DIP2_parity_err; 508c2ecf20Sopenharmony_ci}; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_cistruct peespi; 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_cistruct peespi *t1_espi_create(adapter_t *adapter); 558c2ecf20Sopenharmony_civoid t1_espi_destroy(struct peespi *espi); 568c2ecf20Sopenharmony_ciint t1_espi_init(struct peespi *espi, int mac_type, int nports); 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_civoid t1_espi_intr_enable(struct peespi *); 598c2ecf20Sopenharmony_civoid t1_espi_intr_clear(struct peespi *); 608c2ecf20Sopenharmony_civoid t1_espi_intr_disable(struct peespi *); 618c2ecf20Sopenharmony_ciint t1_espi_intr_handler(struct peespi *); 628c2ecf20Sopenharmony_ciconst struct espi_intr_counts *t1_espi_get_intr_counts(struct peespi *espi); 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ciu32 t1_espi_get_mon(adapter_t *adapter, u32 addr, u8 wait); 658c2ecf20Sopenharmony_ciint t1_espi_get_mon_t204(adapter_t *, u32 *, u8); 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#endif /* _CXGB_ESPI_H_ */ 68