aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_ioc_ct.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/bfa/bfa_ioc_ct.c')
-rw-r--r--drivers/scsi/bfa/bfa_ioc_ct.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c
index a8e52a108710..bd53150e4ee0 100644
--- a/drivers/scsi/bfa/bfa_ioc_ct.c
+++ b/drivers/scsi/bfa/bfa_ioc_ct.c
@@ -43,6 +43,12 @@ static void bfa_ioc_ct_sync_join(struct bfa_ioc_s *ioc);
43static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc); 43static void bfa_ioc_ct_sync_leave(struct bfa_ioc_s *ioc);
44static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc); 44static void bfa_ioc_ct_sync_ack(struct bfa_ioc_s *ioc);
45static bfa_boolean_t bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc); 45static bfa_boolean_t bfa_ioc_ct_sync_complete(struct bfa_ioc_s *ioc);
46static void bfa_ioc_ct_set_cur_ioc_fwstate(
47 struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
48static enum bfi_ioc_state bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc);
49static void bfa_ioc_ct_set_alt_ioc_fwstate(
50 struct bfa_ioc_s *ioc, enum bfi_ioc_state fwstate);
51static enum bfi_ioc_state bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc);
46 52
47static struct bfa_ioc_hwif_s hwif_ct; 53static struct bfa_ioc_hwif_s hwif_ct;
48static struct bfa_ioc_hwif_s hwif_ct2; 54static struct bfa_ioc_hwif_s hwif_ct2;
@@ -512,6 +518,10 @@ bfa_ioc_set_ctx_hwif(struct bfa_ioc_s *ioc, struct bfa_ioc_hwif_s *hwif)
512 hwif->ioc_sync_leave = bfa_ioc_ct_sync_leave; 518 hwif->ioc_sync_leave = bfa_ioc_ct_sync_leave;
513 hwif->ioc_sync_ack = bfa_ioc_ct_sync_ack; 519 hwif->ioc_sync_ack = bfa_ioc_ct_sync_ack;
514 hwif->ioc_sync_complete = bfa_ioc_ct_sync_complete; 520 hwif->ioc_sync_complete = bfa_ioc_ct_sync_complete;
521 hwif->ioc_set_fwstate = bfa_ioc_ct_set_cur_ioc_fwstate;
522 hwif->ioc_get_fwstate = bfa_ioc_ct_get_cur_ioc_fwstate;
523 hwif->ioc_set_alt_fwstate = bfa_ioc_ct_set_alt_ioc_fwstate;
524 hwif->ioc_get_alt_fwstate = bfa_ioc_ct_get_alt_ioc_fwstate;
515} 525}
516 526
517/** 527/**
@@ -959,3 +969,29 @@ bfa_ioc_ct2_pll_init(void __iomem *rb, enum bfi_asic_mode mode)
959 969
960 return BFA_STATUS_OK; 970 return BFA_STATUS_OK;
961} 971}
972
973static void
974bfa_ioc_ct_set_cur_ioc_fwstate(struct bfa_ioc_s *ioc,
975 enum bfi_ioc_state fwstate)
976{
977 writel(fwstate, ioc->ioc_regs.ioc_fwstate);
978}
979
980static enum bfi_ioc_state
981bfa_ioc_ct_get_cur_ioc_fwstate(struct bfa_ioc_s *ioc)
982{
983 return (enum bfi_ioc_state)readl(ioc->ioc_regs.ioc_fwstate);
984}
985
986static void
987bfa_ioc_ct_set_alt_ioc_fwstate(struct bfa_ioc_s *ioc,
988 enum bfi_ioc_state fwstate)
989{
990 writel(fwstate, ioc->ioc_regs.alt_ioc_fwstate);
991}
992
993static enum bfi_ioc_state
994bfa_ioc_ct_get_alt_ioc_fwstate(struct bfa_ioc_s *ioc)
995{
996 return (enum bfi_ioc_state) readl(ioc->ioc_regs.alt_ioc_fwstate);
997}