#ifndef _QIB_7220_H #define _QIB_7220_H /* * Copyright (c) 2007, 2009, 2010 QLogic Corporation. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this source tree, or the * OpenIB.org BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the following * disclaimer. * * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* grab register-defs auto-generated by HW */ #include "qib_7220_regs.h" /* The number of eager receive TIDs for context zero. */ #define IBA7220_KRCVEGRCNT … #define IB_7220_LT_STATE_CFGRCVFCFG … #define IB_7220_LT_STATE_CFGWAITRMT … #define IB_7220_LT_STATE_TXREVLANES … #define IB_7220_LT_STATE_CFGENH … struct qib_chip_specific { … }; struct qib_chippport_specific { … }; /* * This header file provides the declarations and common definitions * for (mostly) manipulation of the SerDes blocks within the IBA7220. * the functions declared should only be called from within other * 7220-related files such as qib_iba7220.c or qib_sd7220.c. */ int qib_sd7220_presets(struct qib_devdata *dd); int qib_sd7220_init(struct qib_devdata *dd); void qib_sd7220_clr_ibpar(struct qib_devdata *); /* * Below used for sdnum parameter, selecting one of the two sections * used for PCIe, or the single SerDes used for IB, which is the * only one currently used */ #define IB_7220_SERDES … static inline u32 qib_read_kreg32(const struct qib_devdata *dd, const u16 regno) { … } static inline u64 qib_read_kreg64(const struct qib_devdata *dd, const u16 regno) { … } static inline void qib_write_kreg(const struct qib_devdata *dd, const u16 regno, u64 value) { … } void set_7220_relock_poll(struct qib_devdata *, int); void shutdown_7220_relock_poll(struct qib_devdata *); void toggle_7220_rclkrls(struct qib_devdata *); #endif /* _QIB_7220_H */