Lines Matching refs:mvfrey
259 writel(0, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in iop_intr_mvfrey()
261 status = readl(&(hba->u.mvfrey.mu->f0_doorbell)); in iop_intr_mvfrey()
263 writel(status, &(hba->u.mvfrey.mu->f0_doorbell)); in iop_intr_mvfrey()
265 u32 msg = readl(&(hba->u.mvfrey.mu->cpu_to_f0_msg_a)); in iop_intr_mvfrey()
272 status = readl(&(hba->u.mvfrey.mu->isr_cause)); in iop_intr_mvfrey()
274 writel(status, &(hba->u.mvfrey.mu->isr_cause)); in iop_intr_mvfrey()
276 cptr = *hba->u.mvfrey.outlist_cptr & 0xff; in iop_intr_mvfrey()
277 cur_rptr = hba->u.mvfrey.outlist_rptr; in iop_intr_mvfrey()
280 if (cur_rptr == hba->u.mvfrey.list_count) in iop_intr_mvfrey()
283 _tag = hba->u.mvfrey.outlist[cur_rptr].val; in iop_intr_mvfrey()
288 hba->u.mvfrey.outlist_rptr = cur_rptr; in iop_intr_mvfrey()
289 } while (cptr != (*hba->u.mvfrey.outlist_cptr & 0xff)); in iop_intr_mvfrey()
293 writel(0x1010, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in iop_intr_mvfrey()
344 hba->u.mvfrey.internal_req.req_virt; in iop_send_sync_request_mvfrey()
349 hba->ops->post_req(hba, &(hba->u.mvfrey.internal_req)); in iop_send_sync_request_mvfrey()
375 writel(msg, &(hba->u.mvfrey.mu->f0_to_cpu_msg_a)); in hptiop_post_msg_mvfrey()
376 readl(&(hba->u.mvfrey.mu->f0_to_cpu_msg_a)); in hptiop_post_msg_mvfrey()
453 struct hpt_iop_request_get_config *info = hba->u.mvfrey.config; in iop_get_config_mvfrey()
530 hba->u.mvfrey.internal_req.req_virt; in iop_set_config_mvfrey()
563 writel(CPU_TO_F0_DRBL_MSG_BIT, &(hba->u.mvfrey.mu->f0_doorbell_enable)); in hptiop_enable_intr_mvfrey()
564 writel(0x1, &(hba->u.mvfrey.mu->isr_enable)); in hptiop_enable_intr_mvfrey()
565 writel(0x1010, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in hptiop_enable_intr_mvfrey()
652 hba->u.mvfrey.config = hptiop_map_pci_bar(hba, 0); in hptiop_map_pci_bar_mvfrey()
653 if (hba->u.mvfrey.config == NULL) in hptiop_map_pci_bar_mvfrey()
656 hba->u.mvfrey.mu = hptiop_map_pci_bar(hba, 2); in hptiop_map_pci_bar_mvfrey()
657 if (hba->u.mvfrey.mu == NULL) { in hptiop_map_pci_bar_mvfrey()
658 iounmap(hba->u.mvfrey.config); in hptiop_map_pci_bar_mvfrey()
673 iounmap(hba->u.mvfrey.config); in hptiop_unmap_pci_bar_mvfrey()
674 iounmap(hba->u.mvfrey.mu); in hptiop_unmap_pci_bar_mvfrey()
939 hba->u.mvfrey.inlist_wptr++; in hptiop_post_req_mvfrey()
940 index = hba->u.mvfrey.inlist_wptr & 0x3fff; in hptiop_post_req_mvfrey()
942 if (index == hba->u.mvfrey.list_count) { in hptiop_post_req_mvfrey()
944 hba->u.mvfrey.inlist_wptr &= ~0x3fff; in hptiop_post_req_mvfrey()
945 hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; in hptiop_post_req_mvfrey()
948 hba->u.mvfrey.inlist[index].addr = in hptiop_post_req_mvfrey()
950 hba->u.mvfrey.inlist[index].intrfc_len = (reqhdr->size + 3) / 4; in hptiop_post_req_mvfrey()
951 writel(hba->u.mvfrey.inlist_wptr, in hptiop_post_req_mvfrey()
952 &(hba->u.mvfrey.mu->inbound_write_ptr)); in hptiop_post_req_mvfrey()
953 readl(&(hba->u.mvfrey.mu->inbound_write_ptr)); in hptiop_post_req_mvfrey()
968 u32 list_count = hba->u.mvfrey.list_count; in hptiop_reset_comm_mvfrey()
976 writel(cpu_to_le32(hba->u.mvfrey.inlist_phy & 0xffffffff), in hptiop_reset_comm_mvfrey()
977 &(hba->u.mvfrey.mu->inbound_base)); in hptiop_reset_comm_mvfrey()
978 writel(cpu_to_le32((hba->u.mvfrey.inlist_phy >> 16) >> 16), in hptiop_reset_comm_mvfrey()
979 &(hba->u.mvfrey.mu->inbound_base_high)); in hptiop_reset_comm_mvfrey()
981 writel(cpu_to_le32(hba->u.mvfrey.outlist_phy & 0xffffffff), in hptiop_reset_comm_mvfrey()
982 &(hba->u.mvfrey.mu->outbound_base)); in hptiop_reset_comm_mvfrey()
983 writel(cpu_to_le32((hba->u.mvfrey.outlist_phy >> 16) >> 16), in hptiop_reset_comm_mvfrey()
984 &(hba->u.mvfrey.mu->outbound_base_high)); in hptiop_reset_comm_mvfrey()
986 writel(cpu_to_le32(hba->u.mvfrey.outlist_cptr_phy & 0xffffffff), in hptiop_reset_comm_mvfrey()
987 &(hba->u.mvfrey.mu->outbound_shadow_base)); in hptiop_reset_comm_mvfrey()
988 writel(cpu_to_le32((hba->u.mvfrey.outlist_cptr_phy >> 16) >> 16), in hptiop_reset_comm_mvfrey()
989 &(hba->u.mvfrey.mu->outbound_shadow_base_high)); in hptiop_reset_comm_mvfrey()
991 hba->u.mvfrey.inlist_wptr = (list_count - 1) | CL_POINTER_TOGGLE; in hptiop_reset_comm_mvfrey()
992 *hba->u.mvfrey.outlist_cptr = (list_count - 1) | CL_POINTER_TOGGLE; in hptiop_reset_comm_mvfrey()
993 hba->u.mvfrey.outlist_rptr = list_count - 1; in hptiop_reset_comm_mvfrey()
1199 u32 list_count = readl(&hba->u.mvfrey.mu->inbound_conf_ctl); in hptiop_internal_memalloc_mvfrey()
1212 hba->u.mvfrey.list_count = list_count; in hptiop_internal_memalloc_mvfrey()
1213 hba->u.mvfrey.internal_mem_size = 0x800 + in hptiop_internal_memalloc_mvfrey()
1219 hba->u.mvfrey.internal_mem_size, &phy, GFP_KERNEL); in hptiop_internal_memalloc_mvfrey()
1223 hba->u.mvfrey.internal_req.req_virt = p; in hptiop_internal_memalloc_mvfrey()
1224 hba->u.mvfrey.internal_req.req_shifted_phy = phy >> 5; in hptiop_internal_memalloc_mvfrey()
1225 hba->u.mvfrey.internal_req.scp = NULL; in hptiop_internal_memalloc_mvfrey()
1226 hba->u.mvfrey.internal_req.next = NULL; in hptiop_internal_memalloc_mvfrey()
1231 hba->u.mvfrey.inlist = (struct mvfrey_inlist_entry *)p; in hptiop_internal_memalloc_mvfrey()
1232 hba->u.mvfrey.inlist_phy = phy; in hptiop_internal_memalloc_mvfrey()
1237 hba->u.mvfrey.outlist = (struct mvfrey_outlist_entry *)p; in hptiop_internal_memalloc_mvfrey()
1238 hba->u.mvfrey.outlist_phy = phy; in hptiop_internal_memalloc_mvfrey()
1243 hba->u.mvfrey.outlist_cptr = (__le32 *)p; in hptiop_internal_memalloc_mvfrey()
1244 hba->u.mvfrey.outlist_cptr_phy = phy; in hptiop_internal_memalloc_mvfrey()
1266 if (hba->u.mvfrey.internal_req.req_virt) { in hptiop_internal_memfree_mvfrey()
1268 hba->u.mvfrey.internal_mem_size, in hptiop_internal_memfree_mvfrey()
1269 hba->u.mvfrey.internal_req.req_virt, in hptiop_internal_memfree_mvfrey()
1271 hba->u.mvfrey.internal_req.req_shifted_phy << 5); in hptiop_internal_memfree_mvfrey()
1542 writel(0, &(hba->u.mvfrey.mu->f0_doorbell_enable)); in hptiop_disable_intr_mvfrey()
1543 readl(&(hba->u.mvfrey.mu->f0_doorbell_enable)); in hptiop_disable_intr_mvfrey()
1544 writel(0, &(hba->u.mvfrey.mu->isr_enable)); in hptiop_disable_intr_mvfrey()
1545 readl(&(hba->u.mvfrey.mu->isr_enable)); in hptiop_disable_intr_mvfrey()
1546 writel(0, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in hptiop_disable_intr_mvfrey()
1547 readl(&(hba->u.mvfrey.mu->pcie_f0_int_enable)); in hptiop_disable_intr_mvfrey()