Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3628076imu; Mon, 28 Jan 2019 08:05:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN5P/xqpOeZGTyi436jRVUcdmLI9rnRtcQUO49p/pNtLpndzofD5px7MphaYxMHXVddLbWtx X-Received: by 2002:a17:902:1102:: with SMTP id d2mr22429403pla.138.1548691536510; Mon, 28 Jan 2019 08:05:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691536; cv=none; d=google.com; s=arc-20160816; b=OT3Mt9A/zj9mesh96DdipggSg0qvst6sx7S1YxwhMlByShsFn7Lxy4F3kyJIRhSZot sK4OzBDqKmT6hOCDIAGoBTZr/JCuj3AERjAEB15k6NWVnTtgRiiGbFxPTMxkXVyrN1Z+ iEg2bqydleagV9BsVXSX2MPdduTKIXcFPz4iq0fw0UJWbrgXrg/Cse4KjBX0rCYQJa5+ K4V80acLyQKiPdrxxnnroaVh3FHsrycs5Rd1yPL8nZDAGWx8JhVcJqzg0Gdp1+4A2tnC 3RdM8EeyTItPEFv01NzhtbPEtdIjNgrN1Sh5hvN8zoVrcBEOsFptAgz0J1frDrN1RZMS vl9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i7eMhr6j0UC5fCT4AQQICn+pj9HE7dq7Oq96/PLK0+E=; b=Uz8z/ekjes9tpKeRKkoOs9nG88j3qi6FpWIvw05U6nbb0JWL9Eq0/aWxrJWGbBq0Sh +mF875LpwqJoHy5tgU8RNUcnYHiidChcamxjLbvsa4+8t+oPA+TaxRuPurxnoFROmZeo 5uAnAvYMkoLqnrJpDVDIRqvAouZR3fuJUJ60N/oFHd6M3r2E+Ot3PwTN0pndKdrpLNeR +PXEnd8VMkSc/hQM853Xl6Ns0/sXuwmOFcrNhVLGJjEbWOmvyjTXQ8pb3kvThTbMohOK cbz8nK7EsSuV7Rh+T/r83xqvvID3vr7m3CJEdBjIa0cA6Js5Ig0pqSoT9iUqyNOd2egR UALA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ekjIEEzo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si2572224pgi.578.2019.01.28.08.05.20; Mon, 28 Jan 2019 08:05:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=ekjIEEzo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731586AbfA1QEa (ORCPT + 99 others); Mon, 28 Jan 2019 11:04:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:50032 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730856AbfA1QE2 (ORCPT ); Mon, 28 Jan 2019 11:04:28 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C32F82147A; Mon, 28 Jan 2019 16:04:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691467; bh=y5q5Z8JF0TIGdiBdMm1VBb0xba+rWPl8XPJKgf2DeUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ekjIEEzopn3qUli4961tM01K/Fpo0asyrVxLrycu5qK2yXDbykpd2sn0kO3JJ/asg BmE2lrkQVROH9AJVzrubGJTXz76FQqK+CUjKmf+1wqHZjDGxGcQqyAtpf4fT9eGUnk meTv6Lce4eoS8IExxb0wEiC1r0hEDVFzLt9qimVI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Marek Szyprowski , Felipe Balbi , Sasha Levin , linux-usb@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 103/258] usb: dwc2: Disable power down feature on Samsung SoCs Date: Mon, 28 Jan 2019 10:56:49 -0500 Message-Id: <20190128155924.51521-103-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski [ Upstream commit 35a6054132286a4ab92b536595093b82e6bdfcbc ] 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") Acked-by: Minas Harutyunyan Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/dwc2/params.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index ef2c199e6059..dff2c6e8d797 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", -- 2.19.1