From patchwork Tue Nov 20 15:38:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 151603 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp747930ljp; Tue, 20 Nov 2018 07:38:33 -0800 (PST) X-Google-Smtp-Source: AJdET5fqOunz5BrSUdSmWiN0R23ug26Q8VDbsZ4OmA7J0P1F2e1jhba5vtzYBrC8NZrJn4Jbvt60 X-Received: by 2002:a62:520b:: with SMTP id g11mr2694357pfb.53.1542728313048; Tue, 20 Nov 2018 07:38:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542728313; cv=none; d=google.com; s=arc-20160816; b=QBneD7V3saP/6opPgbAAvt+AnqkZiwP97enXw0E31Z/GAyOPwm43R32oT68CZ3k96C 09TvRZ1KqWyHYjOZJvy6yc0pfzrHD/ajkICOsWcPS5RPelBZKln0bsGUIAJ7WW1QJ5WA /Xr8q1jC/cg9zPAWKkYFbuMSNIlDu/PbVdDC+0xw3VeKHe2Cx/1bP68QWjacLt4ciNxc uNP1JT5ruUgIgjc5oAH1YhlZa8PBQjxiSU35wKjTKBYEKCapVyxXQR6n5pI/tEIwZB5c velBsuzZHqrPYYF1yyyVzI+MXnf6wLNv6iTTZ2Zp84TgFcM8hQzpV8lndiCFhURWMLXF EEFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=qtDsQpuOAa0B+jT7yZqQ6111FY3WWKdUBvv+o9zQNIU=; b=ZcSQaF3Eg6J9mO4z4hikxEoz8rzIBaD9gJkV91UbPowdyO1y57bJ9m5l/5Md7erewx VitgtrpmS3EySrSIukT4A6J157gEzbCblasW9wlX8PxmKwyKYkMTo6i7O73JWzNd1taz N2P8I8sVnCTL1gTTy+Ji0/33saGldgjcwdIk6JdJoUg8LUqc8+FEfwtHE0ZE1qICzSZD tWwM+TlavQ+Euu8BZtBn7BVXXOawJkQtlbgEW8Sw0K02mNX4P6GII7lFqivQDPa0RE2H 8iEJw5pU5XqydvcoFqA5KJZRwu75b3onAgv3sGhMPHD+k6iFnzuTxRGW9S9tS0LdiaFv JJ0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Yd80cvKa; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5-v6si48234238pfa.232.2018.11.20.07.38.32; Tue, 20 Nov 2018 07:38:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Yd80cvKa; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725917AbeKUCIP (ORCPT + 3 others); Tue, 20 Nov 2018 21:08:15 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:54799 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbeKUCIP (ORCPT ); Tue, 20 Nov 2018 21:08:15 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181120153829euoutp02e0dd7cca195ca4a5f1e57eca11cde683~o3zlWGjAi0094000940euoutp025; Tue, 20 Nov 2018 15:38:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181120153829euoutp02e0dd7cca195ca4a5f1e57eca11cde683~o3zlWGjAi0094000940euoutp025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1542728309; bh=qtDsQpuOAa0B+jT7yZqQ6111FY3WWKdUBvv+o9zQNIU=; h=From:To:Cc:Subject:Date:References:From; b=Yd80cvKad9D1hvtMdnZJPl/guyW9tjQp4LlBx8KMFp8lW5O7dK5Yty5vZbYtWTYxF avnaCxowfRnx5tjkrEtvg3U+QhDc/1NiTUjyYxRz2XBDRQllergTQ57gKDiyZZUlY6 Ysyz83w0tMMba9MWIjKLWQPkvXqL5/CaAwhX8cb8= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181120153829eucas1p13c97981883a8faf2b53711fcff55add2~o3zkt6nzm0686606866eucas1p1R; Tue, 20 Nov 2018 15:38:29 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 56.B1.04294.47A24FB5; Tue, 20 Nov 2018 15:38:28 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181120153828eucas1p206d442b12c16588662c0e3f731ba58c3~o3zkAHncL0454404544eucas1p2P; Tue, 20 Nov 2018 15:38:28 +0000 (GMT) X-AuditID: cbfec7f4-84fff700000010c6-52-5bf42a744e0e Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 6D.C9.04284.47A24FB5; Tue, 20 Nov 2018 15:38:28 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PII00KH40S09O50@eusync4.samsung.com>; Tue, 20 Nov 2018 15:38:27 +0000 (GMT) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Greg Kroah-Hartman , Minas Harutyunyan , Felipe Balbi , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH] usb: dwc2: Disable power down feature on Samsung SoCs Date: Tue, 20 Nov 2018 16:38:15 +0100 Message-id: <20181120153815.31897-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRmVeSWpSXmKPExsWy7djPc7olWl+iDZ5dNbDYOGM9q8X8m0kW zYvXs1k0/trLbnH+/AZ2i8u75rBZzDi/j8li0bJWZou1R+6yO3B6bFrVyeYx72Sgx/65a9g9 +rasYvTYsv8zo8fnTXIBbFFcNimpOZllqUX6dglcGRM/LWEs2MRTseL9G9YGxlVcXYwcHBIC JhI/eoy6GDk5hARWMEpMWcAJYX9mlHi1OBPEBin5/ugxWxcjF1B8GaPE/xt7WSCKGpgkvjRw gNhsAoYSXW+72EBsEYEEiRN7t4M1MAvMZJKY9OoXWIOwgJvEkgNdzCA2i4CqxLQzq5lAbF4B W4nXHbNZIbbJS6zecIAZpFlC4C+rxK5Zt6ASLhK3brQzQtjCEq+Ob2GHsGUkOjsOMkE0NDNK tM+YxQ7h9DBKbJ2zgw2iylri8PGLYJOYBfgkJm2bzgzxP69ER5sQhOkhcWM1P8RnsRInXh9n mcAosYCRYRWjeGppcW56arFRXmq5XnFibnFpXrpecn7uJkZg9J3+d/zLDsZdf5IOMQpwMCrx 8CYIf4kWYk0sK67MPcQowcGsJMKbqQ4U4k1JrKxKLcqPLyrNSS0+xCjNwaIkzlvN8CBaSCA9 sSQ1OzW1ILUIJsvEwSnVwBhT5BV5jntf2+66WuH1+qsfPxM7+6F83ZPEm9fZDqrwmfw4V3tr yuFKxuxFK7i2vZp5PdwzXqotJkn/jMe8SY/3f4gXzjy4tyEnpSKXf/+8BzPP2R57m3myzXHj aomaC0Hzzad2WRy/ssWz9oF4hx4w0rZprzyz5etUFduZ3/buvOU07Ttjs58SS3FGoqEWc1Fx IgA1SELjugIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDJMWRmVeSWpSXmKPExsVy+t/xa7olWl+iDQ7uYrLYOGM9q8X8m0kW zYvXs1k0/trLbnH+/AZ2i8u75rBZzDi/j8li0bJWZou1R+6yO3B6bFrVyeYx72Sgx/65a9g9 +rasYvTYsv8zo8fnTXIBbFFcNimpOZllqUX6dglcGRM/LWEs2MRTseL9G9YGxlVcXYycHBIC JhLfHz1m62Lk4hASWMIo8bxpLZTTxCSx8XUbE0gVm4ChRNfbLjYQW0QgQeLixpmMIDazwFwm iYvTM0FsYQE3iSUHuphBbBYBVYlpZ1aD9fIK2Eq87pjNCrFNXmL1hgPMExi5FjAyrGIUSS0t zk3PLTbUK07MLS7NS9dLzs/dxAgMk23Hfm7ewXhpY/AhRgEORiUe3gThL9FCrIllxZW5hxgl OJiVRHgz1YFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEec8bVEYJCaQnlqRmp6YWpBbBZJk4OKUa GDk7nlVuOvGaXUY/W+fp62PVzWfzjRzYTP8FzhVi5V/b9cBV4Q/DyyPHFFbaSohuq5ph0iC0 82gnl/K6b8ey5zRzLpqze8e05tJ9jislt9/9J7XhZtT3f/e6rbkyHh7NMVoUUXe396zd78NL Kti81P34FvnuiGQyXPX25xvVLZNjnxctbd1277USS3FGoqEWc1FxIgA/8ECUDwIAAA== X-CMS-MailID: 20181120153828eucas1p206d442b12c16588662c0e3f731ba58c3 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181120153828eucas1p206d442b12c16588662c0e3f731ba58c3 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Power down feature of DWC2 module integrated in Samsung SoCs doesn't work properly or needs some additional handling in PHY or SoC glue layer, so disable it for now. Without disabling power down, DWC2 causes random memory trashes and fails enumeration if there is no USB link to host on driver probe. Fixes: 03ea6d6e9e1ff1 ("usb: dwc2: Enable power down") Signed-off-by: Marek Szyprowski --- drivers/usb/dwc2/params.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.17.1 Acked-by: Minas Harutyunyan diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 7c1b6938f212..266157ae179a 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -71,6 +71,13 @@ static void dwc2_set_his_params(struct dwc2_hsotg *hsotg) p->power_down = false; } +static void dwc2_set_s3c6400_params(struct dwc2_hsotg *hsotg) +{ + struct dwc2_core_params *p = &hsotg->params; + + p->power_down = 0; +} + static void dwc2_set_rk_params(struct dwc2_hsotg *hsotg) { struct dwc2_core_params *p = &hsotg->params; @@ -151,7 +158,8 @@ const struct of_device_id dwc2_of_match_table[] = { { .compatible = "lantiq,arx100-usb", .data = dwc2_set_ltq_params }, { .compatible = "lantiq,xrx200-usb", .data = dwc2_set_ltq_params }, { .compatible = "snps,dwc2" }, - { .compatible = "samsung,s3c6400-hsotg" }, + { .compatible = "samsung,s3c6400-hsotg", + .data = dwc2_set_s3c6400_params }, { .compatible = "amlogic,meson8-usb", .data = dwc2_set_amlogic_params }, { .compatible = "amlogic,meson8b-usb",