summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ff90f6d)
This patch is workaround for xhci related issue.
After usb port resume FIFO on EP4 can't accept Bulck stream longer then
64 Bytes.
Currently we have no better way then just completly reset chip.
Side effect of this workaround - disconnection event for this device.
It means, module will be reloaded and we will get new usb minor id.
This is why, we should not do it on each firmware restart.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
A_UART_HWINIT((22*1000*1000), 19200);
}
A_UART_HWINIT((22*1000*1000), 19200);
}
+void cold_reboot(void)
+{
+ A_PRINTF("Cold reboot initiated.");
+#if defined(PROJECT_MAGPIE)
+ HAL_WORD_REG_WRITE(WATCH_DOG_MAGIC_PATTERN_ADDR, 0);
+#elif defined(PROJECT_K2)
+ HAL_WORD_REG_WRITE(MAGPIE_REG_RST_STATUS_ADDR, 0);
+#endif /* #if defined(PROJECT_MAGPIE) */
+ A_USB_JUMP_BOOT();
+}
+
/*
* -- support more than 64 bytes command on ep4 --
*/
/*
* -- support more than 64 bytes command on ep4 --
*/
usbfifolen = USB_BYTE_REG_READ(ZM_EP4_BYTE_COUNT_LOW_OFFSET);
if (usbfifolen > 0x40) {
A_PRINTF("EP4 FIFO Bug? Buffer is too big: %x\n", usbfifolen);
usbfifolen = USB_BYTE_REG_READ(ZM_EP4_BYTE_COUNT_LOW_OFFSET);
if (usbfifolen > 0x40) {
A_PRINTF("EP4 FIFO Bug? Buffer is too big: %x\n", usbfifolen);
}
// check is command is new
}
// check is command is new