Dirk Behme wrote: > Troy Kisky wrote: >> Dirk Behme wrote: >> >>> Remove I2C zero length transfer "HACK" and do real zero length >>> transfers. This fixes Oops at kernel startup while "scanning" for >>> TLV320AIC23IDx addresses. >>> >>> Signed-off-by: Alexander Vasiliev <[EMAIL PROTECTED]> >>> Signed-off-by: Brad Griffis <[EMAIL PROTECTED]> >>> Signed-off-by: Dirk Behme <[EMAIL PROTECTED]> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Davinci-linux-open-source mailing list >>> [email protected] >>> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source >>> -static inline void terminate_write(struct davinci_i2c_dev *dev) >>> -{ >>> - u16 w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG); >>> - w |= DAVINCI_I2C_MDR_RM|DAVINCI_I2C_MDR_STP; >>> - davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w); >>> - >>> - if (!dev->terminate) >>> - dev_err(dev->dev, "TDR IRQ while no data to send\n"); >>> -} >>> >>> /* >>> * Interrupt service routine. This gets called whenever an I2C interrupt >>> @@ -449,6 +424,14 @@ static irqreturn_t i2c_davinci_isr(int t >>> case DAVINCI_I2C_IVR_ARDY: >>> davinci_i2c_write_reg(dev, >>> DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_ARDY); >>> + if (((dev->buf_len == 0) && (dev->stop != 0)) || >>> + (dev->cmd_err & DAVINCI_I2C_STR_NACK)) { >>> + w = davinci_i2c_read_reg(dev, >>> + DAVINCI_I2C_MDR_REG); >>> + MOD_REG_BIT(w, DAVINCI_I2C_MDR_STP, 1); >>> + davinci_i2c_write_reg(dev, >>> + DAVINCI_I2C_MDR_REG, w); >>> + } >>> complete(&dev->cmd_complete); >>> break; >>> >>> @@ -484,9 +467,6 @@ static irqreturn_t i2c_davinci_isr(int t >>> davinci_i2c_write_reg(dev, >>> DAVINCI_I2C_IMR_REG, >>> w); >>> - } else { >>> - /* signal can terminate transfer */ >>> - terminate_write(dev); >>> } >> Why remove terminate write?? >> Is it causing problems, or just no longer needed?? > > If I understand it correctly, just no longer needed. > > From discussion with Alexander and Brad: > > "terminate_write isn't needed, because new transmit-message always > refresh transmit register." > > Thanks for looking at the patch, > > Dirk > So, are you saying the bus is locked up until another message is transmitted. That doesn't sound good to me. If a signal stops a master transmit transaction, we should not wait for another master transaction before releasing the bus. We should play nicely with other masters.
Troy _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
