HomeFreeBSD

twsi: Add interrupt mode

Description

twsi: Add interrupt mode

Add the ability to use interrupts for i2c message.
We still use polling for early boot i2c transfer (for PMIC
for example) but as soon as interrupts are available use them.
On Allwinner SoC >A20 is seems that polling mode is broken for some
reason, this is now fixed by using interrupt mode.
For Allwinner also fix the frequency calculation, the one in the code
was for when the APB frequency is at 48Mhz while it is at 24Mhz on most
(all?) Allwinner SoCs. We now support both cases.

While here add more debug info when it's compiled in.

Tested On: A20, H3, A64
MFC after: 1 month

Details

Provenance
manuAuthored on
Parents
rS345947: Remove another instance of All Rights Reserved.
Branches
Unknown
Tags
Unknown