Lines Matching refs:i2c_reg
82 struct i2c_reg { struct
105 struct i2c_reg __iomem *i2c_reg; argument
120 struct i2c_reg __iomem *i2c_reg; in cpm_i2c_interrupt() local
125 i2c_reg = cpm->i2c_reg; in cpm_i2c_interrupt()
128 i = in_8(&i2c_reg->i2cer); in cpm_i2c_interrupt()
129 out_8(&i2c_reg->i2cer, i); in cpm_i2c_interrupt()
171 struct i2c_reg __iomem *i2c_reg = cpm->i2c_reg; in cpm_i2c_force_close() local
177 out_8(&i2c_reg->i2cmr, 0x00); /* Disable all interrupts */ in cpm_i2c_force_close()
178 out_8(&i2c_reg->i2cer, 0xff); in cpm_i2c_force_close()
300 struct i2c_reg __iomem *i2c_reg = cpm->i2c_reg; in cpm_i2c_xfer() local
324 out_8(&cpm->i2c_reg->i2com, I2COM_MASTER); in cpm_i2c_xfer()
338 out_8(&i2c_reg->i2cmr, I2CER_TXE | I2CER_TXB | I2CER_RXB); in cpm_i2c_xfer()
339 out_8(&i2c_reg->i2cer, 0xff); /* Clear interrupt status */ in cpm_i2c_xfer()
341 setbits8(&i2c_reg->i2mod, I2MOD_EN); /* Enable */ in cpm_i2c_xfer()
343 setbits8(&i2c_reg->i2com, I2COM_START); in cpm_i2c_xfer()
382 clrbits8(&i2c_reg->i2mod, I2MOD_EN); in cpm_i2c_xfer()
392 clrbits8(&i2c_reg->i2mod, I2MOD_EN); in cpm_i2c_xfer()
486 cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0); in cpm_i2c_setup()
487 if (cpm->i2c_reg == NULL) { in cpm_i2c_setup()
562 out_8(&cpm->i2c_reg->i2add, 0x7f << 1); in cpm_i2c_setup()
570 out_8(&cpm->i2c_reg->i2brg, brg); in cpm_i2c_setup()
572 out_8(&cpm->i2c_reg->i2mod, 0x00); in cpm_i2c_setup()
573 out_8(&cpm->i2c_reg->i2com, I2COM_MASTER); /* Master mode */ in cpm_i2c_setup()
576 out_8(&cpm->i2c_reg->i2cmr, 0); in cpm_i2c_setup()
577 out_8(&cpm->i2c_reg->i2cer, 0xff); in cpm_i2c_setup()
592 iounmap(cpm->i2c_reg); in cpm_i2c_setup()
608 clrbits8(&cpm->i2c_reg->i2mod, I2MOD_EN); in cpm_i2c_shutdown()
611 out_8(&cpm->i2c_reg->i2cmr, 0); in cpm_i2c_shutdown()
612 out_8(&cpm->i2c_reg->i2cer, 0xff); in cpm_i2c_shutdown()
625 iounmap(cpm->i2c_reg); in cpm_i2c_shutdown()