Thread (1 message) 1 message, 1 author, 2016-08-16

Re: [PATCH V2 RFC 1/6] usb: dwc2: core: Avoid nonsense error in gadget mode

From: Stefan Wahren <hidden>
Date: 2016-08-16 20:09:40
Also in: linux-arm-kernel

Hi John,
John Youn [off-list ref] hat am 16. August 2016 um 21:20
geschrieben:


On 8/16/2016 9:44 AM, Stefan Wahren wrote:
quoted
Hi John,
quoted
John Youn [off-list ref] hat am 16. August 2016 um 03:30
...
quoted
[    2.476378] dwc2 20980000.usb: dwc2_set_parameters()
[    2.476391] dwc2 20980000.usb: Setting dma_desc_fs_enable to 0
[    2.476418] dwc2 20980000.usb: Setting external_id_pin_ctl to 0
[    2.476429] dwc2 20980000.usb: Setting hibernation to 0
[    2.476449] dwc2 20980000.usb: 0 invalid for host_rx_fifo_size. Check HW
configuration.
[    2.491704] dwc2 20980000.usb: Setting host_rx_fifo_size to 4096
[    2.491727] dwc2 20980000.usb: 0 invalid for host_nperio_tx_fifo_size.
Check
HW configuration.
[    2.507853] dwc2 20980000.usb: Setting host_nperio_tx_fifo_size to 0
[    2.507875] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size.
Check
HW configuration.
[    2.524246] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0
Thanks for the logs.

It looks like if dr_mode == peripheral, dwc2 doesn't populate the
following host-only values from the reset values of the registers.

* hw_params->host_nperio_tx_fifo_size
* hw_params->host_perio_tx_fifo_size

Thus when it goes to set the core_params based on the hw_params you
get the error. As peripheral-only, they are never used so it's fine.

To get rid of the error we can skip setting the host-only parameters
if dr_mode == peripheral.
sorry the subject is imprecise. According to the logs if dr_mode == otg we also
get

[    2.569573] dwc2 20980000.usb: 0 invalid for host_perio_tx_fifo_size. Check
HW configuration.
[    2.585354] dwc2 20980000.usb: Setting host_perio_tx_fifo_size to 0

You already said in 6/6 that's faulty, but i only want to point it out.

Stefan
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help