Re: [PATCH] i2c-at91: fix data-loss issue

From: Adrian Yanes
Date: Wed Apr 25 2012 - 01:26:31 EST


Apparently the issue with the AT91RM9200 is the chipset itself due to a
factory design defect. Some people claim that the root cause of it is:

"Since the TWI doesn't have a DMA channel there is no way to deliver
timely data to the Tx buffer under heavy CPU load."[1]

Other threads[2] highlights same issues with the AT91RM9200 and the data
loss. Even in 2007, Ronny Nilsson tried to do some patch[3] blocking the
interrupts in order to win more feasibility, some testing was
performed[4], and up to 100kHz (exactly the same value as we started
getting errors), the driver just failed. At the end of the discussion
the conclusion was that the TWI controller of the AT91RM9200 is just
broken and the GPIO driver is the only alternative.

Therefore, your driver will work for all of those chipsets using PDC
with the TWI. However, it won't work with the AT91RM9200 (and probably
old hardware variants that keep same hardware design).

So I recommend to add a note/comment indicating such incompatibility for
the AT91RM9200, either in the source code or in the kernel config.

Thanks.

Adrian


1 - http://lists.atrpms.net/pipermail/i2c/2007-October/002026.html
2 - http://lists.lm-sensors.org/pipermail/i2c/2007-February/000773.html
3 - http://lists.lm-sensors.org/pipermail/i2c/2007-February/000833.html
4 - http://lists.atrpms.net/pipermail/i2c/2007-October/002034.html

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/