linux/drivers/scsi/bfa/bfa_ioc_ct.c

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

#include "bfad_drv.h"
#include "bfa_ioc.h"
#include "bfi_reg.h"
#include "bfa_defs.h"

BFA_TRC_FILE();

#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 bfa_boolean_t bfa_ioc_ct_firmware_lock(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_notify_fail(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_ownership_reset(struct bfa_ioc_s *ioc);
static bfa_boolean_t bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc);
static bfa_boolean_t bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_set_cur_ioc_fwstate(
			struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
static enum bfi_ioc_state bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc);
static void bfa_ioc_ct_set_alt_ioc_fwstate(
			struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
static enum bfi_ioc_state bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc);

static struct bfa_ioc_hwif_s hwif_ct;
static struct bfa_ioc_hwif_s hwif_ct2;

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

static void
bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc)
{}

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

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

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

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

static struct {}
	ct2_reg[] =;

static void
bfa_ioc_ct_reg_init(struct bfa_ioc_s *ioc)
{}

static void
bfa_ioc_ct2_reg_init(struct bfa_ioc_s *ioc)
{}

/*
 * Initialize IOC to port mapping.
 */

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

static void
bfa_ioc_ct2_map_port(struct bfa_ioc_s *ioc)
{}

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

static bfa_boolean_t
bfa_ioc_ct2_lpu_read_stat(struct bfa_ioc_s *ioc)
{}

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

static bfa_boolean_t
bfa_ioc_ct_sync_start(struct bfa_ioc_s *ioc)
{}

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

static void
bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc)
{}

static void
bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc)
{}

static bfa_boolean_t
bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc)
{}

/*
 * Called from bfa_ioc_attach() to map asic specific calls.
 */
static void
bfa_ioc_set_ctx_hwif(struct bfa_ioc_s *ioc, struct bfa_ioc_hwif_s *hwif)
{}

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

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

/*
 * Workaround for MSI-X resource allocation for catapult-2 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_ioc_ct2_poweron(struct bfa_ioc_s *ioc)
{}

bfa_status_t
bfa_ioc_ct_pll_init(void __iomem *rb, enum bfi_asic_mode 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)
{}

static void
bfa_ioc_ct2_enable_flash(void __iomem *rb)
{}

#define CT2_NFC_MAX_DELAY
#define CT2_NFC_PAUSE_MAX_DELAY
#define CT2_NFC_VER_VALID
#define CT2_NFC_STATE_RUNNING
#define BFA_IOC_PLL_POLL

static bfa_boolean_t
bfa_ioc_ct2_nfc_halted(void __iomem *rb)
{}

static void
bfa_ioc_ct2_nfc_halt(void __iomem *rb)
{}

static void
bfa_ioc_ct2_nfc_resume(void __iomem *rb)
{}

static void
bfa_ioc_ct2_clk_reset(void __iomem *rb)
{}

static void
bfa_ioc_ct2_nfc_clk_reset(void __iomem *rb)
{}

static void
bfa_ioc_ct2_wait_till_nfc_running(void __iomem *rb)
{}

bfa_status_t
bfa_ioc_ct2_pll_init(void __iomem *rb, enum bfi_asic_mode mode)
{}

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

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

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

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