Lines Matching refs:pslot
505 int ibmphp_hpc_readslot(struct slot *pslot, u8 cmd, u8 *pstatus) in ibmphp_hpc_readslot() argument
513 debug_polling("%s - Entry pslot[%p] cmd[%x] pstatus[%p]\n", __func__, pslot, cmd, pstatus); in ibmphp_hpc_readslot()
515 if ((pslot == NULL) in ibmphp_hpc_readslot()
523 busindex = ibmphp_get_bus_index(pslot->bus); in ibmphp_hpc_readslot()
531 index = pslot->ctlr_index; in ibmphp_hpc_readslot()
541 ctlr_ptr = pslot->ctrl; in ibmphp_hpc_readslot()
559 pslot->ctrl->status = status; in ibmphp_hpc_readslot()
560 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
564 pslot->ext_status = ctrl_read(ctlr_ptr, wpg_bbar, index + WPG_1ST_EXTSLOT_INDEX); in ibmphp_hpc_readslot()
584 pslot->busstatus = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
599 list_for_each_entry(pslot, &ibmphp_slot_head, in ibmphp_hpc_readslot()
601 index = pslot->ctlr_index; in ibmphp_hpc_readslot()
605 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
609 pslot->ext_status = in ibmphp_hpc_readslot()
643 int ibmphp_hpc_writeslot(struct slot *pslot, u8 cmd) in ibmphp_hpc_writeslot() argument
653 debug_polling("%s - Entry pslot[%p] cmd[%x]\n", __func__, pslot, cmd); in ibmphp_hpc_writeslot()
654 if (pslot == NULL) { in ibmphp_hpc_writeslot()
663 busindex = ibmphp_get_bus_index(pslot->bus); in ibmphp_hpc_writeslot()
671 index = pslot->ctlr_index; in ibmphp_hpc_writeslot()
681 ctlr_ptr = pslot->ctrl; in ibmphp_hpc_writeslot()
790 struct slot *pslot = NULL; in poll_hpc() local
808 list_for_each_entry(pslot, &ibmphp_slot_head, in poll_hpc()
812 if (pslot->ctrl->ctlr_relative_id == ctrl_count) { in poll_hpc()
814 if (READ_SLOT_LATCH(pslot->ctrl)) { in poll_hpc()
815 rc = ibmphp_hpc_readslot(pslot, in poll_hpc()
821 pslot->ctrl); in poll_hpc()
829 list_for_each_entry(pslot, &ibmphp_slot_head, in poll_hpc()
832 memcpy((void *) &myslot, (void *) pslot, in poll_hpc()
834 rc = ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL); in poll_hpc()
835 if ((myslot.status != pslot->status) in poll_hpc()
836 || (myslot.ext_status != pslot->ext_status)) in poll_hpc()
837 process_changeinstatus(pslot, &myslot); in poll_hpc()
840 list_for_each_entry(pslot, &ibmphp_slot_head, in poll_hpc()
844 if (pslot->ctrl->ctlr_relative_id == ctrl_count) { in poll_hpc()
846 if (READ_SLOT_LATCH(pslot->ctrl)) in poll_hpc()
847 rc = ibmphp_hpc_readslot(pslot, in poll_hpc()
899 static int process_changeinstatus(struct slot *pslot, struct slot *poldslot) in process_changeinstatus() argument
906 debug("process_changeinstatus - Entry pslot[%p], poldslot[%p]\n", pslot, poldslot); in process_changeinstatus()
909 if ((pslot->status & 0x01) != (poldslot->status & 0x01)) in process_changeinstatus()
916 if ((pslot->status & 0x04) != (poldslot->status & 0x04)) in process_changeinstatus()
921 if (((pslot->status & 0x08) != (poldslot->status & 0x08)) in process_changeinstatus()
922 || ((pslot->status & 0x10) != (poldslot->status & 0x10))) in process_changeinstatus()
926 if ((pslot->status & 0x20) != (poldslot->status & 0x20)) in process_changeinstatus()
935 if ((pslot->status & 0x80) != (poldslot->status & 0x80)) { in process_changeinstatus()
938 if (pslot->status & 0x80) { in process_changeinstatus()
939 if (SLOT_PWRGD(pslot->status)) { in process_changeinstatus()
943 rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS, &status); in process_changeinstatus()
947 pslot->status &= ~HPC_SLOT_POWER; in process_changeinstatus()
958 if ((pslot->ext_status & 0x08) != (poldslot->ext_status & 0x08)) in process_changeinstatus()
963 pslot->flag = 0; in process_changeinstatus()
964 rc = ibmphp_do_disable_slot(pslot); in process_changeinstatus()
968 ibmphp_update_slot_info(pslot); in process_changeinstatus()
987 struct slot myslot, *pslot; in process_changeinlatch() local
998 pslot = ibmphp_get_slot_from_physical_num(i); in process_changeinlatch()
999 if (pslot) { in process_changeinlatch()
1000 memcpy((void *) &myslot, (void *) pslot, sizeof(struct slot)); in process_changeinlatch()
1001 rc = ibmphp_hpc_readslot(pslot, READ_ALLSTAT, NULL); in process_changeinlatch()
1003 process_changeinstatus(pslot, &myslot); in process_changeinlatch()