From: Thomas Abraham Date: Mon, 24 May 2010 08:48:56 +0000 (+0900) Subject: USB: s3c: Enable soft disconnect during initialization X-Git-Tag: upstream/snapshot3+hdmi~14045^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=390b166138e95a47bdfde6582a1935f65e5c6547;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git USB: s3c: Enable soft disconnect during initialization Enable soft disconnect bit the OTG core during initialization. Without this, the host sees that a gadget is connected and tries to enumerate. The soft disconnect should be enabled until the USB gadget driver is registered with this otg driver. Signed-off-by: Thomas Abraham Signed-off-by: Kukjin Kim Signed-off-by: Ben Dooks Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 1f73b48..a6d725d 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -2730,6 +2730,9 @@ static void s3c_hsotg_init(struct s3c_hsotg *hsotg) writel(0, hsotg->regs + S3C_DAINTMSK); + /* Be in disconnected state until gadget is registered */ + __orr32(hsotg->regs + S3C_DCTL, S3C_DCTL_SftDiscon); + if (0) { /* post global nak until we're ready */ writel(S3C_DCTL_SGNPInNAK | S3C_DCTL_SGOUTNak,