linux/drivers/net/ethernet/brocade/bna/bfa_ioc_ct.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Linux network driver for QLogic BR-series Converged Network Adapter.
 */
/*
 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
 * Copyright (c) 2014-2015 QLogic Corporation
 * All rights reserved
 * www.qlogic.com
 */

#include "bfa_ioc.h"
#include "cna.h"
#include "bfi.h"
#include "bfi_reg.h"
#include "bfa_defs.h"

#define bfa_ioc_ct_sync_pos(__ioc)
#define BFA_IOC_SYNC_REQD_SH
#define bfa_ioc_ct_get_sync_ackd(__val)
#define bfa_ioc_ct_clear_sync_ackd(__val)
#define bfa_ioc_ct_get_sync_reqd(__val)
#define bfa_ioc_ct_sync_reqd_pos(__ioc)

/*
 * forward declarations
 */
static bool bfa_ioc_ct_firmware_lock(struct bfa_ioc *ioc);
static void bfa_ioc_ct_firmware_unlock(struct bfa_ioc *ioc);
static void bfa_ioc_ct_reg_init(struct bfa_ioc *ioc);
static void bfa_ioc_ct2_reg_init(struct bfa_ioc *ioc);
static void bfa_ioc_ct_map_port(struct bfa_ioc *ioc);
static void bfa_ioc_ct2_map_port(struct bfa_ioc *ioc);
static void bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix);
static void bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc);
static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc);
static bool bfa_ioc_ct_sync_start(struct bfa_ioc *ioc);
static void bfa_ioc_ct_sync_join(struct bfa_ioc *ioc);
static void bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc);
static void bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc);
static bool bfa_ioc_ct_sync_complete(struct bfa_ioc *ioc);
static void bfa_ioc_ct_set_cur_ioc_fwstate(
			struct bfa_ioc *ioc, enum bfi_ioc_state fwstate);
static enum bfi_ioc_state bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc *ioc);
static void bfa_ioc_ct_set_alt_ioc_fwstate(
			struct bfa_ioc *ioc, enum bfi_ioc_state fwstate);
static enum bfi_ioc_state bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc *ioc);
static enum bfa_status bfa_ioc_ct_pll_init(void __iomem *rb,
				enum bfi_asic_mode asic_mode);
static enum bfa_status bfa_ioc_ct2_pll_init(void __iomem *rb,
				enum bfi_asic_mode asic_mode);
static bool bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc *ioc);

static const struct bfa_ioc_hwif nw_hwif_ct =;

static const struct bfa_ioc_hwif nw_hwif_ct2 =;

/* Called from bfa_ioc_attach() to map asic specific calls. */
void
bfa_nw_ioc_set_ct_hwif(struct bfa_ioc *ioc)
{}

void
bfa_nw_ioc_set_ct2_hwif(struct bfa_ioc *ioc)
{}

/* Return true if firmware of current driver matches the running firmware. */
static bool
bfa_ioc_ct_firmware_lock(struct bfa_ioc *ioc)
{}

static void
bfa_ioc_ct_firmware_unlock(struct bfa_ioc *ioc)
{}

/* Notify other functions on HB failure. */
static void
bfa_ioc_ct_notify_fail(struct bfa_ioc *ioc)
{}

/* Host to LPU mailbox message addresses */
static const struct {} ct_fnreg[] =;

/* Host <-> LPU mailbox command/status registers - port 0 */
static const struct {} ct_p0reg[] =;

/* Host <-> LPU mailbox command/status registers - port 1 */
static const struct {} ct_p1reg[] =;

static const struct {} ct2_reg[] =;

static void
bfa_ioc_ct_reg_init(struct bfa_ioc *ioc)
{}

static void
bfa_ioc_ct2_reg_init(struct bfa_ioc *ioc)
{}

/* Initialize IOC to port mapping. */

#define FNC_PERS_FN_SHIFT(__fn)
static void
bfa_ioc_ct_map_port(struct bfa_ioc *ioc)
{}

static void
bfa_ioc_ct2_map_port(struct bfa_ioc *ioc)
{}

/* Set interrupt mode for a function: INTX or MSIX */
static void
bfa_ioc_ct_isr_mode_set(struct bfa_ioc *ioc, bool msix)
{}

static bool
bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc *ioc)
{}

/* MSI-X resource allocation for 1860 with no asic block */
#define HOSTFN_MSIX_DEFAULT
#define HOSTFN_MSIX_VT_INDEX_MBOX_ERR
#define HOSTFN_MSIX_VT_OFST_NUMVT
#define __MSIX_VT_NUMVT__MK
#define __MSIX_VT_NUMVT__SH
#define __MSIX_VT_NUMVT_(_v)
#define __MSIX_VT_OFST_
void
bfa_nw_ioc_ct2_poweron(struct bfa_ioc *ioc)
{}

/* Cleanup hw semaphore and usecnt registers */
static void
bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc)
{}

/* Synchronized IOC failure processing routines */
static bool
bfa_ioc_ct_sync_start(struct bfa_ioc *ioc)
{}
/* Synchronized IOC failure processing routines */
static void
bfa_ioc_ct_sync_join(struct bfa_ioc *ioc)
{}

static void
bfa_ioc_ct_sync_leave(struct bfa_ioc *ioc)
{}

static void
bfa_ioc_ct_sync_ack(struct bfa_ioc *ioc)
{}

static bool
bfa_ioc_ct_sync_complete(struct bfa_ioc *ioc)
{}

static void
bfa_ioc_ct_set_cur_ioc_fwstate(struct bfa_ioc *ioc,
			       enum bfi_ioc_state fwstate)
{}

static enum bfi_ioc_state
bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc *ioc)
{}

static void
bfa_ioc_ct_set_alt_ioc_fwstate(struct bfa_ioc *ioc,
			       enum bfi_ioc_state fwstate)
{}

static enum bfi_ioc_state
bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc *ioc)
{}

static enum bfa_status
bfa_ioc_ct_pll_init(void __iomem *rb, enum bfi_asic_mode asic_mode)
{}

static void
bfa_ioc_ct2_sclk_init(void __iomem *rb)
{}

static void
bfa_ioc_ct2_lclk_init(void __iomem *rb)
{}

static void
bfa_ioc_ct2_mem_init(void __iomem *rb)
{}

static void
bfa_ioc_ct2_mac_reset(void __iomem *rb)
{}

#define CT2_NFC_MAX_DELAY
#define CT2_NFC_VER_VALID
#define BFA_IOC_PLL_POLL

static bool
bfa_ioc_ct2_nfc_halted(void __iomem *rb)
{}

static void
bfa_ioc_ct2_nfc_resume(void __iomem *rb)
{}

static enum bfa_status
bfa_ioc_ct2_pll_init(void __iomem *rb, enum bfi_asic_mode asic_mode)
{}