Commit f2ec4e34aa55c3d5553b69e8f6e7df140f3ef48a

Authored by Lukasz Majewski
Committed by Marek Vasut
1 parent 1cc03c5c53

udc: dfu: s3c_udc: Provide function to check if USB reset was asserted

New dfu_usb_get_reset() method is necessary to distinct two different
use cases of dfu-util program.
This method checks if the USB bus reset has been really performed after
DFU DETACH.

Without this function the previous DFU behavior is preserved.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>

Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff

drivers/usb/gadget/s3c_udc_otg.c
... ... @@ -149,6 +149,11 @@
149 149 struct s3c_usbotg_phy *phy;
150 150 static unsigned int usb_phy_ctrl;
151 151  
  152 +bool dfu_usb_get_reset(void)
  153 +{
  154 + return !!(readl(&reg->gintsts) & INT_RESET);
  155 +}
  156 +
152 157 void otg_phy_init(struct s3c_udc *dev)
153 158 {
154 159 dev->pdata->phy_control(1);