CHROMIUM: USB: ohci-exynos: initialize registers pointer earlier
In the former code, we have a race condition between the first interrupt
and the regs field initilization in the usb_hcd structure.
If the OHCI irq fires before hcd->regs is set, we are getting a null
pointer dereference in ohci_irq.
When calling usb_add_hcd(), it first executes the reset() callback,
then enables the ohci interrupt, and finally executes the start()
callback. So moving the ohci_init() call which actually initializes the
reg field from start() to reset() should remove the race.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:15731
TEST=run on Spring with USB2.0 on internal PHY on HSIC hub initialized
in the bootloader, and see no kernel panic at startup.
Change-Id: If98070a3cd16b7f735c8cfb62c20cebf410953d2
Reviewed-on: https://gerrit.chromium.org/gerrit/36823
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>