HomeFreeBSD

MFC r345948, r345951

Description

MFC r345948, r345951

r345948:
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

r345951:
twsi: Use config_intrhook_oneshot instead of config_intrhook_establish

Suggested by: ian
X-MFC-With: 345948

Details

Committed
manuAug 5 2019, 5:06 PM
Parents
rS350595: MFC r342924, r343749-r343750, r343874, r344893-r344895, r345711
Branches
Unknown
Tags
Unknown