Lines Matching refs:ctlr_ptr
118 static u8 i2c_ctrl_read(struct controller *ctlr_ptr, void __iomem *WPGBbar, u8 index) in i2c_ctrl_read() argument
133 if (ctlr_ptr->ctlr_type == 0x02) { in i2c_ctrl_read()
136 ultemp = (unsigned long)ctlr_ptr->u.wpeg_ctlr.i2c_addr; in i2c_ctrl_read()
142 } else if (ctlr_ptr->ctlr_type == 0x04) { in i2c_ctrl_read()
226 static u8 i2c_ctrl_write(struct controller *ctlr_ptr, void __iomem *WPGBbar, u8 index, u8 cmd) in i2c_ctrl_write() argument
244 if (ctlr_ptr->ctlr_type == 0x02) { in i2c_ctrl_write()
247 ultemp = (unsigned long)ctlr_ptr->u.wpeg_ctlr.i2c_addr; in i2c_ctrl_write()
253 } else if (ctlr_ptr->ctlr_type == 0x04) { in i2c_ctrl_write()
325 static u8 isa_ctrl_read(struct controller *ctlr_ptr, u8 offset) in isa_ctrl_read() argument
331 start_address = ctlr_ptr->u.isa_ctlr.io_start; in isa_ctrl_read()
332 end_address = ctlr_ptr->u.isa_ctlr.io_end; in isa_ctrl_read()
340 static void isa_ctrl_write(struct controller *ctlr_ptr, u8 offset, u8 data) in isa_ctrl_write() argument
345 start_address = ctlr_ptr->u.isa_ctlr.io_start; in isa_ctrl_write()
508 struct controller *ctlr_ptr; in ibmphp_hpc_readslot() local
541 ctlr_ptr = pslot->ctrl; in ibmphp_hpc_readslot()
548 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) in ibmphp_hpc_readslot()
549 wpg_bbar = ioremap(ctlr_ptr->u.wpeg_ctlr.wpegbbar, WPG_I2C_IOREMAP_SIZE); in ibmphp_hpc_readslot()
554 rc = hpc_wait_ctlr_notworking(HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, &status); in ibmphp_hpc_readslot()
560 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
561 rc = hpc_wait_ctlr_notworking(HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, in ibmphp_hpc_readslot()
564 pslot->ext_status = ctrl_read(ctlr_ptr, wpg_bbar, index + WPG_1ST_EXTSLOT_INDEX); in ibmphp_hpc_readslot()
570 *pstatus = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
575 *pstatus = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
584 pslot->busstatus = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
587 *pstatus = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
590 *pstatus = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
594 *pstatus = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
602 rc = hpc_wait_ctlr_notworking(HPC_CTLR_WORKING_TOUT, ctlr_ptr, in ibmphp_hpc_readslot()
605 pslot->status = ctrl_read(ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
607 ctlr_ptr, wpg_bbar, &status); in ibmphp_hpc_readslot()
610 ctrl_read(ctlr_ptr, wpg_bbar, in ibmphp_hpc_readslot()
629 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) in ibmphp_hpc_readslot()
646 struct controller *ctlr_ptr; in ibmphp_hpc_writeslot() local
681 ctlr_ptr = pslot->ctrl; in ibmphp_hpc_writeslot()
688 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) { in ibmphp_hpc_writeslot()
689 wpg_bbar = ioremap(ctlr_ptr->u.wpeg_ctlr.wpegbbar, WPG_I2C_IOREMAP_SIZE); in ibmphp_hpc_writeslot()
692 ctlr_ptr->ctlr_id, (ulong) (ctlr_ptr->u.wpeg_ctlr.wpegbbar), (ulong) wpg_bbar, in ibmphp_hpc_writeslot()
693 ctlr_ptr->u.wpeg_ctlr.i2c_addr); in ibmphp_hpc_writeslot()
698 rc = hpc_wait_ctlr_notworking(HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, &status); in ibmphp_hpc_writeslot()
701 ctrl_write(ctlr_ptr, wpg_bbar, index, cmd); in ibmphp_hpc_writeslot()
709 rc = hpc_wait_ctlr_notworking(HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, in ibmphp_hpc_writeslot()
728 ctlr_ptr->status = status; in ibmphp_hpc_writeslot()
733 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) in ibmphp_hpc_writeslot()
1068 static int hpc_wait_ctlr_notworking(int timeout, struct controller *ctlr_ptr, void __iomem *wpg_bba… in hpc_wait_ctlr_notworking() argument
1077 *pstatus = ctrl_read(ctlr_ptr, wpg_bbar, WPG_CTLR_INDEX); in hpc_wait_ctlr_notworking()