nissa/nereid: poll type-C interrupts on startup
nissa/nereid: poll type-C interrupts on startup

If a charger interrupt triggers before the EC starts up, then it's possible
for the IRQ to get stuck because nothing will ever notify the charger
driver to run and clear the IRQ. This breaks most type-C functionality
on the port because the TCPC and charger share the IRQ line.

To ensure interrupts that are requested before the EC is ready to act
on them are processed, this change adds an initialization hook that polls
the lines and triggers regular interrupt handling if the IRQ is asserted.

BUG=b:227562556
TEST=`gpioget usb_c0_int_odl` now returns 1 (deasserted) after waking the
     system from hibernate by plugging a charger into port C0, where it
     was previously stuck asserted.
BRANCH=none

Signed-off-by: Peter Marheine <ef0b2c492edde94778d7465bfbaeed52c5be6858@chromium.org>
Change-Id: I29fe2bacf5f0a1ed105b0fc7398b74673db25fa4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3568006
Reviewed-by: Andrew McRae <44ad1424cfc8411c96d9181798ca41ae55709dfb@google.com>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec