aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLukasz Majewski2014-08-25 11:07:29 +0200
committerMarek Vasut2014-09-02 14:29:28 +0200
commitf2ec4e34aa55c3d5553b69e8f6e7df140f3ef48a (patch)
treeca7d14df113526563b5fc23ab603ed82aea4a41e /drivers
parent1cc03c5c53c06a904ff1cea325e0202ab6313ee4 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/s3c_udc_otg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c
index 63d4487a9bb..ce2494c2f32 100644
--- a/drivers/usb/gadget/s3c_udc_otg.c
+++ b/drivers/usb/gadget/s3c_udc_otg.c
@@ -149,6 +149,11 @@ struct s3c_usbotg_reg *reg;
struct s3c_usbotg_phy *phy;
static unsigned int usb_phy_ctrl;
+bool dfu_usb_get_reset(void)
+{
+ return !!(readl(&reg->gintsts) & INT_RESET);
+}
+
void otg_phy_init(struct s3c_udc *dev)
{
dev->pdata->phy_control(1);