Lines Matching refs:mvfrey
267 writel(0, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in iop_intr_mvfrey()
269 status = readl(&(hba->u.mvfrey.mu->f0_doorbell)); in iop_intr_mvfrey()
271 writel(status, &(hba->u.mvfrey.mu->f0_doorbell)); in iop_intr_mvfrey()
273 u32 msg = readl(&(hba->u.mvfrey.mu->cpu_to_f0_msg_a)); in iop_intr_mvfrey()
280 status = readl(&(hba->u.mvfrey.mu->isr_cause)); in iop_intr_mvfrey()
282 writel(status, &(hba->u.mvfrey.mu->isr_cause)); in iop_intr_mvfrey()
284 cptr = *hba->u.mvfrey.outlist_cptr & 0xff; in iop_intr_mvfrey()
285 cur_rptr = hba->u.mvfrey.outlist_rptr; in iop_intr_mvfrey()
288 if (cur_rptr == hba->u.mvfrey.list_count) in iop_intr_mvfrey()
291 _tag = hba->u.mvfrey.outlist[cur_rptr].val; in iop_intr_mvfrey()
296 hba->u.mvfrey.outlist_rptr = cur_rptr; in iop_intr_mvfrey()
297 } while (cptr != (*hba->u.mvfrey.outlist_cptr & 0xff)); in iop_intr_mvfrey()
301 writel(0x1010, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in iop_intr_mvfrey()
352 hba->u.mvfrey.internal_req.req_virt; in iop_send_sync_request_mvfrey()
357 hba->ops->post_req(hba, &(hba->u.mvfrey.internal_req)); in iop_send_sync_request_mvfrey()
383 writel(msg, &(hba->u.mvfrey.mu->f0_to_cpu_msg_a)); in hptiop_post_msg_mvfrey()
384 readl(&(hba->u.mvfrey.mu->f0_to_cpu_msg_a)); in hptiop_post_msg_mvfrey()
461 struct hpt_iop_request_get_config *info = hba->u.mvfrey.config; in iop_get_config_mvfrey()
538 hba->u.mvfrey.internal_req.req_virt; in iop_set_config_mvfrey()
571 writel(CPU_TO_F0_DRBL_MSG_BIT, &(hba->u.mvfrey.mu->f0_doorbell_enable)); in hptiop_enable_intr_mvfrey()
572 writel(0x1, &(hba->u.mvfrey.mu->isr_enable)); in hptiop_enable_intr_mvfrey()
573 writel(0x1010, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in hptiop_enable_intr_mvfrey()
660 hba->u.mvfrey.config = hptiop_map_pci_bar(hba, 0); in hptiop_map_pci_bar_mvfrey()
661 if (hba->u.mvfrey.config == NULL) in hptiop_map_pci_bar_mvfrey()
664 hba->u.mvfrey.mu = hptiop_map_pci_bar(hba, 2); in hptiop_map_pci_bar_mvfrey()
665 if (hba->u.mvfrey.mu == NULL) { in hptiop_map_pci_bar_mvfrey()
666 iounmap(hba->u.mvfrey.config); in hptiop_map_pci_bar_mvfrey()
681 iounmap(hba->u.mvfrey.config); in hptiop_unmap_pci_bar_mvfrey()
682 iounmap(hba->u.mvfrey.mu); in hptiop_unmap_pci_bar_mvfrey()
949 hba->u.mvfrey.inlist_wptr++; in hptiop_post_req_mvfrey()
950 index = hba->u.mvfrey.inlist_wptr & 0x3fff; in hptiop_post_req_mvfrey()
952 if (index == hba->u.mvfrey.list_count) { in hptiop_post_req_mvfrey()
954 hba->u.mvfrey.inlist_wptr &= ~0x3fff; in hptiop_post_req_mvfrey()
955 hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; in hptiop_post_req_mvfrey()
958 hba->u.mvfrey.inlist[index].addr = in hptiop_post_req_mvfrey()
960 hba->u.mvfrey.inlist[index].intrfc_len = (reqhdr->size + 3) / 4; in hptiop_post_req_mvfrey()
961 writel(hba->u.mvfrey.inlist_wptr, in hptiop_post_req_mvfrey()
962 &(hba->u.mvfrey.mu->inbound_write_ptr)); in hptiop_post_req_mvfrey()
963 readl(&(hba->u.mvfrey.mu->inbound_write_ptr)); in hptiop_post_req_mvfrey()
978 u32 list_count = hba->u.mvfrey.list_count; in hptiop_reset_comm_mvfrey()
986 writel(cpu_to_le32(hba->u.mvfrey.inlist_phy & 0xffffffff), in hptiop_reset_comm_mvfrey()
987 &(hba->u.mvfrey.mu->inbound_base)); in hptiop_reset_comm_mvfrey()
988 writel(cpu_to_le32((hba->u.mvfrey.inlist_phy >> 16) >> 16), in hptiop_reset_comm_mvfrey()
989 &(hba->u.mvfrey.mu->inbound_base_high)); in hptiop_reset_comm_mvfrey()
991 writel(cpu_to_le32(hba->u.mvfrey.outlist_phy & 0xffffffff), in hptiop_reset_comm_mvfrey()
992 &(hba->u.mvfrey.mu->outbound_base)); in hptiop_reset_comm_mvfrey()
993 writel(cpu_to_le32((hba->u.mvfrey.outlist_phy >> 16) >> 16), in hptiop_reset_comm_mvfrey()
994 &(hba->u.mvfrey.mu->outbound_base_high)); in hptiop_reset_comm_mvfrey()
996 writel(cpu_to_le32(hba->u.mvfrey.outlist_cptr_phy & 0xffffffff), in hptiop_reset_comm_mvfrey()
997 &(hba->u.mvfrey.mu->outbound_shadow_base)); in hptiop_reset_comm_mvfrey()
998 writel(cpu_to_le32((hba->u.mvfrey.outlist_cptr_phy >> 16) >> 16), in hptiop_reset_comm_mvfrey()
999 &(hba->u.mvfrey.mu->outbound_shadow_base_high)); in hptiop_reset_comm_mvfrey()
1001 hba->u.mvfrey.inlist_wptr = (list_count - 1) | CL_POINTER_TOGGLE; in hptiop_reset_comm_mvfrey()
1002 *hba->u.mvfrey.outlist_cptr = (list_count - 1) | CL_POINTER_TOGGLE; in hptiop_reset_comm_mvfrey()
1003 hba->u.mvfrey.outlist_rptr = list_count - 1; in hptiop_reset_comm_mvfrey()
1203 u32 list_count = readl(&hba->u.mvfrey.mu->inbound_conf_ctl); in hptiop_internal_memalloc_mvfrey()
1216 hba->u.mvfrey.list_count = list_count; in hptiop_internal_memalloc_mvfrey()
1217 hba->u.mvfrey.internal_mem_size = 0x800 + in hptiop_internal_memalloc_mvfrey()
1223 hba->u.mvfrey.internal_mem_size, &phy, GFP_KERNEL); in hptiop_internal_memalloc_mvfrey()
1227 hba->u.mvfrey.internal_req.req_virt = p; in hptiop_internal_memalloc_mvfrey()
1228 hba->u.mvfrey.internal_req.req_shifted_phy = phy >> 5; in hptiop_internal_memalloc_mvfrey()
1229 hba->u.mvfrey.internal_req.scp = NULL; in hptiop_internal_memalloc_mvfrey()
1230 hba->u.mvfrey.internal_req.next = NULL; in hptiop_internal_memalloc_mvfrey()
1235 hba->u.mvfrey.inlist = (struct mvfrey_inlist_entry *)p; in hptiop_internal_memalloc_mvfrey()
1236 hba->u.mvfrey.inlist_phy = phy; in hptiop_internal_memalloc_mvfrey()
1241 hba->u.mvfrey.outlist = (struct mvfrey_outlist_entry *)p; in hptiop_internal_memalloc_mvfrey()
1242 hba->u.mvfrey.outlist_phy = phy; in hptiop_internal_memalloc_mvfrey()
1247 hba->u.mvfrey.outlist_cptr = (__le32 *)p; in hptiop_internal_memalloc_mvfrey()
1248 hba->u.mvfrey.outlist_cptr_phy = phy; in hptiop_internal_memalloc_mvfrey()
1270 if (hba->u.mvfrey.internal_req.req_virt) { in hptiop_internal_memfree_mvfrey()
1272 hba->u.mvfrey.internal_mem_size, in hptiop_internal_memfree_mvfrey()
1273 hba->u.mvfrey.internal_req.req_virt, in hptiop_internal_memfree_mvfrey()
1275 hba->u.mvfrey.internal_req.req_shifted_phy << 5); in hptiop_internal_memfree_mvfrey()
1537 writel(0, &(hba->u.mvfrey.mu->f0_doorbell_enable)); in hptiop_disable_intr_mvfrey()
1538 readl(&(hba->u.mvfrey.mu->f0_doorbell_enable)); in hptiop_disable_intr_mvfrey()
1539 writel(0, &(hba->u.mvfrey.mu->isr_enable)); in hptiop_disable_intr_mvfrey()
1540 readl(&(hba->u.mvfrey.mu->isr_enable)); in hptiop_disable_intr_mvfrey()
1541 writel(0, &(hba->u.mvfrey.mu->pcie_f0_int_enable)); in hptiop_disable_intr_mvfrey()
1542 readl(&(hba->u.mvfrey.mu->pcie_f0_int_enable)); in hptiop_disable_intr_mvfrey()