Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp395285pxj; Thu, 17 Jun 2021 05:20:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWJw3O5La9jGldg4alvbAKNhtH+0PstYJ8cCmr8jfWQcIxyns4HgJVfzdH3aCPlgp0aiXO X-Received: by 2002:a02:b188:: with SMTP id t8mr4273004jah.102.1623932437201; Thu, 17 Jun 2021 05:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623932437; cv=none; d=google.com; s=arc-20160816; b=FA3OSsBAj1ZDcYFcNztDloYtoNe2lLigWE/dVdcnfTVpLGnvSKsJUcDRdoiYvPtF5z XwnxumfGtyYzOeQHTQTY/avVz/aSXznCfZ5gYB4q6YYXGx4E5662Mqyxr6s5k1KGPGIG V2LcJ0I+feW0nA1vQT7Ny2Bf7AFm13xPiKhUHCDlciGb8yjYlmODH3rfsxmVyJy+VWqZ 8ERrelJm09uw4bkDyU3gR4TXj5elD3FtN/J4H4u49NG3xOVzHG5eFxv2KRr4Zb6tCD1F nNcBOuHhm+mUuLuaDzXsd1ShD2X7sOwPB2xgMVOUv0KHEnQaVusKIwm8opcBYcrrIFjD oYGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=aSUipJnkhLkRJo0zPr9YpjfQrH0NwQqDUt2arQamcHI=; b=FIKsv89FtLUSQNRw8NJj8hEuHh9VwGdtF8uxi5omhmN7CZV5P1DnnCWNtFCE0iwX1x cbcbvZTlIk0B0oWvHhPk97DF0iTaIypYMEEE4Am6Zzv3iIXIroElGOk/km8VFqNRxkqL 4BiKh0+wAB4UM0T+/84BAxaWSeTAz84xmVX94ge/b3TLDH9Ss/kasiiAk7Pqf3p+DLbW rOgMWk9jRNdxNJdZlu2p8Hwb2zvg50jAzS+XOtaSmhrGFH/BcsvjRcEsuUogVjP3Qomx QDzZi+7mnuGJJYflmQ9TjSnUNtyYDOcEMTbkxtM3Gc+v8grZMWnM2qZ5EukMVa3UIZRA jWiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=QV6peWEL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si5713018ilv.108.2021.06.17.05.20.07; Thu, 17 Jun 2021 05:20:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=QV6peWEL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232057AbhFQKAu (ORCPT + 99 others); Thu, 17 Jun 2021 06:00:50 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:31323 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232147AbhFQKAn (ORCPT ); Thu, 17 Jun 2021 06:00:43 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1623923916; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=aSUipJnkhLkRJo0zPr9YpjfQrH0NwQqDUt2arQamcHI=; b=QV6peWELEgP0NCgCWdHAOjEateFCC4nJHZWIi5D4som4j76Uec78rU7yOL7rtI+BwMz6tZCB hpNS/isq7Ml7cDVoJhz9+MRLDzUovcSHgYszKxb0AJjw1n4GgGt4NRJ6HkFIgMX02y2aU2AA 82v8YeQoimqDvM7pj2Yz8deiZVk= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 60cb1cc6f726fa4188ed5daf (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 17 Jun 2021 09:58:30 GMT Sender: wcheng=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 04962C4338A; Thu, 17 Jun 2021 09:58:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from wcheng-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wcheng) by smtp.codeaurora.org (Postfix) with ESMTPSA id BD64BC4323A; Thu, 17 Jun 2021 09:58:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BD64BC4323A Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=wcheng@codeaurora.org From: Wesley Cheng To: balbi@kernel.org, gregkh@linuxfoundation.org, robh+dt@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, frowand.list@gmail.com Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, jackp@codeaurora.org, fntoth@gmail.com, heikki.krogerus@linux.intel.com, andy.shevchenko@gmail.com, Wesley Cheng Subject: [PATCH v10 5/6] usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default Date: Thu, 17 Jun 2021 02:58:18 -0700 Message-Id: <1623923899-16759-6-git-send-email-wcheng@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1623923899-16759-1-git-send-email-wcheng@codeaurora.org> References: <1623923899-16759-1-git-send-email-wcheng@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to take advantage of the TX fifo resizing logic, manually add these properties to the DWC3 child node by default. This will allow the DWC3 gadget to resize the TX fifos for the IN endpoints, which help with performance. Signed-off-by: Wesley Cheng --- drivers/usb/dwc3/dwc3-qcom.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 49e6ca9..44e0eaa1 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -645,6 +645,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev) struct dwc3_qcom *qcom = platform_get_drvdata(pdev); struct device_node *np = pdev->dev.of_node, *dwc3_np; struct device *dev = &pdev->dev; + struct property *prop; int ret; dwc3_np = of_get_compatible_child(np, "snps,dwc3"); @@ -653,6 +654,14 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev) return -ENODEV; } + prop = devm_kzalloc(dev, sizeof(*prop), GFP_KERNEL); + if (prop) { + prop->name = "tx-fifo-resize"; + ret = of_add_property(dwc3_np, prop); + if (ret < 0) + dev_info(dev, "unable to add tx-fifo-resize prop\n"); + } + ret = of_platform_populate(np, NULL, NULL, dev); if (ret) { dev_err(dev, "failed to register dwc3 core - %d\n", ret); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project