icE1usb fw: Have usb_e1 handle the E1 polling and multi port

The init already takes care of both port and also calling
e1_init, so it makes sense to have a usb_e1_poll() that
encapsulate both the actual e1 hardware poll and running
the usb stuff for both port.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Icf81efcdc5c8f13480ba2652bc6e7c1ca226ae4d
diff --git a/firmware/ice40-riscv/icE1usb/usb_e1.c b/firmware/ice40-riscv/icE1usb/usb_e1.c
index 96ca72a..5d32924 100644
--- a/firmware/ice40-riscv/icE1usb/usb_e1.c
+++ b/firmware/ice40-riscv/icE1usb/usb_e1.c
@@ -96,8 +96,8 @@
 }
 
 
-void
-usb_e1_run(int port)
+static void
+_usb_e1_run(int port)
 {
 	struct usb_e1_state *usb_e1 = _get_state(port);
 	volatile struct usb_ep *ep_regs;
@@ -210,6 +210,16 @@
 	_usb_fill_feedback_ep(port);
 }
 
+void
+usb_e1_poll(void)
+{
+	for (int i=0; i<2; i++) {
+		e1_poll(i);
+		_usb_e1_run(i);
+	}
+}
+
+
 static enum usb_fnd_resp
 _e1_set_conf(const struct usb_conf_desc *conf)
 {