/* e1: tracked by dev->private_data.fifo_rx_usage_overall e2: tracked by dev->private_data.fifo_rx_usage_packet e3: tracked by dev->private_data.fifo_rx_usage_overall  */
void dwc_otg_ep_prepare_start(usbd_device *dev)
/* e1: tracked by dev->private_data.fifo_rx_usage_overall e2: tracked by dev->private_data.fifo_rx_usage_packet e3: tracked by dev->private_data.fifo_rx_usage_overall  */
void dwc_otg_ep_prepare_start(usbd_device *dev)
{
	uint16_t fifo_word = DIVIDE_AND_CEIL(dev->info->device.desc->bMaxPacketSize0, 4);
	fifo_word = MAX(fifo_word, 16);
	dev->private_data.fifo_rx_usage_overall = 16;
	dev->private_data.fifo_rx_usage_packet = fifo_word + 1;
	disable_all_non_ep0(dev);
	dev->private_data.fifo_remaining = get_fifo_depth(dev) - fifo_word;
	REBASE(DWC_OTG_DIEP0TXF) = DWC_OTG_DIEP0TXF_TX0FD(fifo_word) |
					DWC_OTG_DIEP0TXF_TX0FSA(dev->private_data.fifo_remaining);
}