提交 d00f5004 编写于 作者: A Anton Tikhomirov 提交者: Greg Kroah-Hartman

USB: s3c-hsotg: Fix core reset

This patch fixes code responsible for core reset.
Signed-off-by: NAnton Tikhomirov <av.tikhomirov@samsung.com>
Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: NKukjin Kim <kgene.kim@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 83722bc9
......@@ -2491,9 +2491,9 @@ static int s3c_hsotg_corereset(struct s3c_hsotg *hsotg)
timeout = 1000;
do {
grstctl = readl(hsotg->regs + S3C_GRSTCTL);
} while (!(grstctl & S3C_GRSTCTL_CSftRst) && timeout-- > 0);
} while ((grstctl & S3C_GRSTCTL_CSftRst) && timeout-- > 0);
if (!(grstctl & S3C_GRSTCTL_CSftRst)) {
if (grstctl & S3C_GRSTCTL_CSftRst) {
dev_err(hsotg->dev, "Failed to get CSftRst asserted\n");
return -EINVAL;
}
......@@ -2510,9 +2510,6 @@ static int s3c_hsotg_corereset(struct s3c_hsotg *hsotg)
return -ETIMEDOUT;
}
if (grstctl & S3C_GRSTCTL_CSftRst)
continue;
if (!(grstctl & S3C_GRSTCTL_AHBIdle))
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册