u8 *cur_data = data;
struct cdns_i2c_regs *regs = i2c_bus->regs;
u32 ret;
+ bool start = 1;
/* Set the controller in Master transmit mode and clear FIFO */
setbits_le32(®s->control, CDNS_I2C_CONTROL_CLR_FIFO);
while (len-- && !is_arbitration_lost(regs)) {
writel(*(cur_data++), ®s->data);
+ /* Trigger write only after loading data */
+ if (start) {
+ writel(addr, ®s->address);
+ start = 0;
+ }
if (len && readl(®s->transfer_size) == CDNS_I2C_FIFO_DEPTH) {
ret = cdns_i2c_wait(regs, CDNS_I2C_INTERRUPT_COMP |
CDNS_I2C_INTERRUPT_ARBLOST);