• John Youn's avatar
    Revert "usb: dwc2: Move reset into dwc2_get_hwparams()" · 03b32e4c
    John Youn authored
    This reverts commit 263b7fb5 ("usb: dwc2: Move reset into
    dwc2_get_hwparams()") due to regression found on bcm2835 platform. USB
    ethernet fails, due to being unable to pick up proper parameters when
    performing a plain reset before reading hw params.
    
    Below shows the results of the gnptxfsiz and hptxfsiz with and before
    and after reverting this (from Stefan Wahren):
    
    So here is the probe result before Patch 1 is applied:
    
    [    1.283148] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host
    [    1.313894] dwc2 20980000.usb: gnptxfsiz=00201000
    [    1.314104] dwc2 20980000.usb: hptxfsiz=00000000
    [    1.353908] dwc2 20980000.usb: 256 invalid for host_nperio_tx_fifo_size. Check HW configuration.
    [    1.354262] dwc2 20980000.usb: 512 invalid for host_perio_tx_fifo_size. Check HW configuration.
    [    1.394249] dwc2 20980000.usb: DWC OTG Controller
    [    1.394561] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
    [    1.394917] dwc2 20980000.usb: irq 33, io mem 0x00000000
    
    And here is the probe result after Patch 1 is applied:
    
    [    1.280107] dwc2 20980000.usb: Configuration mismatch. dr_mode forced to host
    [    1.353949] dwc2 20980000.usb: gnptxfsiz=01001000
    [    1.354166] dwc2 20980000.usb: hptxfsiz=02002000
    [    1.434301] dwc2 20980000.usb: DWC OTG Controller
    [    1.434616] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
    [    1.434973] dwc2 20980000.usb: irq 33, io mem 0x00000000
    Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
    Tested-by: default avatarDouglas Anderson <dianders@chromium.org>
    Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
    Reported-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
    Reported-by: default avatarRemi Pommarel <repk@triplefau.lt>
    Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
    Tested-by: default avatarRemi Pommarel <repk@triplefau.lt>
    Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
    03b32e4c
platform.c 16.5 KB