Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2764723imj; Mon, 11 Feb 2019 08:08:16 -0800 (PST) X-Google-Smtp-Source: AHgI3Iaz/n7nCAg+Ha9M4f7/4klaakOgs/k7YQgdiL2O8ift2vkWnnL/UapAMXz7X7jQsxuQI24E X-Received: by 2002:a65:4104:: with SMTP id w4mr22900269pgp.158.1549901296122; Mon, 11 Feb 2019 08:08:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901296; cv=none; d=google.com; s=arc-20160816; b=uYCkW1kYxcv15ffnkwvn4HawrWJaoyDBaLZ74x0AUFIrCD3qj96B00j97YarZj+RJA 89+tRzW5vnslF3sAj202gu7IaISMmi0d0PUCxLxM5g2CVS3s3+bDHAJRRuXEZR5HVfMh t52HVMGBJYWxBmxWjvK7BtdOo2INPUFXk3jUtt5MoJ2E/fKMDgwoIrUDZAEim8E96vE+ 9WUbEl5LJzwkjyFnLsxGoucTZBRwYw8n7zNVFRpm2iTYKf0WSx387x/fpmyD4G7C5Sbb t5xcpAxPXKwIEl+0VHjbEuFAPMmM2r8ZdnEDpIWXr8OZhuSTW+CoNVD721IgZ5kjOmuI 5Tjg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jvpmBqipBPetvIjPTzj3RBSpkg9OOxz5TJ+GIOvYj2k=; b=klfOEFSANO5s4fx4frk/6JbDYon8Z4J+msTn4LGyuXwG4w/c7moEYGZpqXAPEXNDd9 cpp1CLXrAfmY+MDH3SxFBZRgWiouAZn8Ioa2g0cyJijzZFSOGt6mXlUSiqULr/1ewAXz kJn+pqgXGvkfeELWwq0HOZRcWd8o1VmwroVBbbg7rNagMS5+Pondpr00lZq2FK/Jp8ri pEX45DhjilsCB2O0DQXBhzmSuVCrKEoWQ/YlPOYYlDnV+wQOSQLRZ2W+ukKmH1WFup/U o9i5eV+OMP/KOZXvYf/VgWUfYt1XMb5+F+ZoPrb2rweN6Xs0SuEG8y5dH5LydpSMdDuP orkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Hkk1SSdY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si9182922pgp.274.2019.02.11.08.07.54; Mon, 11 Feb 2019 08:08:16 -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=Hkk1SSdY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729707AbfBKO1V (ORCPT + 99 others); Mon, 11 Feb 2019 09:27:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:33094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727150AbfBKO1T (ORCPT ); Mon, 11 Feb 2019 09:27:19 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EE90120838; Mon, 11 Feb 2019 14:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895238; bh=Bk+O1RQbFMW+8e+NNcY5/o11lv27BXUgu6HTXY3ReXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hkk1SSdYmi+dyGvCRVbooKDdi+qTj2CQfT5xWZfsIBW9kn5e8pi7KAygosIIxSSlu SAlMRZs0AC8kh1tcmtxurXRBgdGRsWKA5EbSKvs+0nY+eCp+1eBXtYnKwwiRySbC1/ /zbV4Og6+f/QjF2BZYMPZ+s/eXR7yJkNeic9j5v4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Minas Harutyunyan , Marek Szyprowski , Felipe Balbi , Sasha Levin Subject: [PATCH 4.20 112/352] usb: dwc2: Disable power down feature on Samsung SoCs Date: Mon, 11 Feb 2019 15:15:39 +0100 Message-Id: <20190211141852.920704641@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 38c813b1d203..24ff5f21cb25 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; @@ -152,7 +159,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