Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e0e0777 authored by Ben Dooks's avatar Ben Dooks Committed by Greg Kroah-Hartman
Browse files

USB: s3c-hsotg: SoftDisconnect minimum 3ms



The shortest period SoftDisconnect can be asserted for is 3 milliseconds
according to the V210 datasheet, so ensure that we add an msleep() to
the registration code to enforce this.

Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0f002d20
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2599,6 +2599,9 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
	writel(S3C_DCTL_CGOUTNak | S3C_DCTL_CGNPInNAK,
	writel(S3C_DCTL_CGOUTNak | S3C_DCTL_CGNPInNAK,
	       hsotg->regs + S3C_DCTL);
	       hsotg->regs + S3C_DCTL);


	/* must be at-least 3ms to allow bus to see disconnect */
	msleep(3);

	/* remove the soft-disconnect and let's go */
	/* remove the soft-disconnect and let's go */
	__bic32(hsotg->regs + S3C_DCTL, S3C_DCTL_SftDiscon);
	__bic32(hsotg->regs + S3C_DCTL, S3C_DCTL_SftDiscon);