Lines Matching refs:ctlr_ptr

149 static u8 i2c_ctrl_read (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8 index)  in i2c_ctrl_read()  argument
164 if (ctlr_ptr->ctlr_type == 0x02) { in i2c_ctrl_read()
167 ultemp = (unsigned long)ctlr_ptr->u.wpeg_ctlr.i2c_addr; in i2c_ctrl_read()
173 } else if (ctlr_ptr->ctlr_type == 0x04) { in i2c_ctrl_read()
257 static u8 i2c_ctrl_write (struct controller *ctlr_ptr, void __iomem *WPGBbar, u8 index, u8 cmd) in i2c_ctrl_write() argument
275 if (ctlr_ptr->ctlr_type == 0x02) { in i2c_ctrl_write()
278 ultemp = (unsigned long)ctlr_ptr->u.wpeg_ctlr.i2c_addr; in i2c_ctrl_write()
284 } else if (ctlr_ptr->ctlr_type == 0x04) { in i2c_ctrl_write()
356 static u8 isa_ctrl_read (struct controller *ctlr_ptr, u8 offset) in isa_ctrl_read() argument
362 start_address = ctlr_ptr->u.isa_ctlr.io_start; in isa_ctrl_read()
363 end_address = ctlr_ptr->u.isa_ctlr.io_end; in isa_ctrl_read()
371 static void isa_ctrl_write (struct controller *ctlr_ptr, u8 offset, u8 data) in isa_ctrl_write() argument
376 start_address = ctlr_ptr->u.isa_ctlr.io_start; in isa_ctrl_write()
539 struct controller *ctlr_ptr; in ibmphp_hpc_readslot() local
573 ctlr_ptr = pslot->ctrl; in ibmphp_hpc_readslot()
580 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) in ibmphp_hpc_readslot()
581 wpg_bbar = ioremap (ctlr_ptr->u.wpeg_ctlr.wpegbbar, WPG_I2C_IOREMAP_SIZE); in ibmphp_hpc_readslot()
586 rc = hpc_wait_ctlr_notworking (HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, &status); in ibmphp_hpc_readslot()
592 pslot->status = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
593 rc = hpc_wait_ctlr_notworking (HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, in ibmphp_hpc_readslot()
596 pslot->ext_status = ctrl_read (ctlr_ptr, wpg_bbar, index + WPG_1ST_EXTSLOT_INDEX); in ibmphp_hpc_readslot()
602 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
607 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
616 pslot->busstatus = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
619 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
622 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
626 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
634 rc = hpc_wait_ctlr_notworking (HPC_CTLR_WORKING_TOUT, ctlr_ptr, in ibmphp_hpc_readslot()
637 pslot->status = ctrl_read (ctlr_ptr, wpg_bbar, index); in ibmphp_hpc_readslot()
639 ctlr_ptr, wpg_bbar, &status); in ibmphp_hpc_readslot()
642 ctrl_read (ctlr_ptr, wpg_bbar, in ibmphp_hpc_readslot()
661 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) in ibmphp_hpc_readslot()
678 struct controller *ctlr_ptr; in ibmphp_hpc_writeslot() local
713 ctlr_ptr = pslot->ctrl; in ibmphp_hpc_writeslot()
720 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) { in ibmphp_hpc_writeslot()
721 wpg_bbar = ioremap (ctlr_ptr->u.wpeg_ctlr.wpegbbar, WPG_I2C_IOREMAP_SIZE); in ibmphp_hpc_writeslot()
724 ctlr_ptr->ctlr_id, (ulong) (ctlr_ptr->u.wpeg_ctlr.wpegbbar), (ulong) wpg_bbar, in ibmphp_hpc_writeslot()
725 ctlr_ptr->u.wpeg_ctlr.i2c_addr); in ibmphp_hpc_writeslot()
730 rc = hpc_wait_ctlr_notworking (HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, &status); in ibmphp_hpc_writeslot()
733 ctrl_write (ctlr_ptr, wpg_bbar, index, cmd); in ibmphp_hpc_writeslot()
741 rc = hpc_wait_ctlr_notworking (HPC_CTLR_WORKING_TOUT, ctlr_ptr, wpg_bbar, in ibmphp_hpc_writeslot()
760 ctlr_ptr->status = status; in ibmphp_hpc_writeslot()
765 if ((ctlr_ptr->ctlr_type == 2) || (ctlr_ptr->ctlr_type == 4)) in ibmphp_hpc_writeslot()
1103 static int hpc_wait_ctlr_notworking (int timeout, struct controller *ctlr_ptr, void __iomem *wpg_bb… in hpc_wait_ctlr_notworking() argument
1112 *pstatus = ctrl_read (ctlr_ptr, wpg_bbar, WPG_CTLR_INDEX); in hpc_wait_ctlr_notworking()