[U-Boot] [PATCH v2 2/2] udc: dfu: s3c_udc: Provide function to check if USB reset was asserted
Lukasz Majewski
l.majewski at samsung.com
Mon Aug 25 11:07:29 CEST 2014
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 at samsung.com>
---
Changes for v2:
- None
---
drivers/usb/gadget/s3c_udc_otg.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c
index 63d4487..ce2494c 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(®->gintsts) & INT_RESET);
+}
+
void otg_phy_init(struct s3c_udc *dev)
{
dev->pdata->phy_control(1);
--
2.0.0.rc2
More information about the U-Boot
mailing list