From patchwork Fri Jan 5 07:36:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 123479 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp492405qgn; Thu, 4 Jan 2018 23:39:26 -0800 (PST) X-Google-Smtp-Source: ACJfBosjJbwneKewU+jPZVK9H9SjAeOMPlC+FSAx6Z8VqB7oV8d9HRWK78Tj5SvUQ6j8mjonqEWQ X-Received: by 10.80.217.76 with SMTP id u12mr2885730edj.171.1515137966450; Thu, 04 Jan 2018 23:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515137966; cv=none; d=google.com; s=arc-20160816; b=CTDn572O+oHbzHDqHK3WHPMMYUmNL3S+GKB/B+hTmBwPouZpXWxlb4PHnaDR/fXaRc gyTpLIi9umGlyJXNYyt4+wTNPMl9f32n+TV9Ikm10rlagEPWTajMpA80t4moGezZIhdD bB9AqHtDOLBD5xyL/9izIiVXplKuGTBIqUq70frCr87M7tBwaqfnwbNBX+jOY3vYfgYM 6fEAC5Yqg2CScaUkY6GX506yVSqdz93cr4mboJvOMnnnMeWse7bPzkDqZ06ngrHyegIs J8l51bhsWuP8Uw/aWwL5RPNeoRLlSaNSDJJ3O0K9eRosGtjM1z1xRcpLTe0LM+/lP4BE GhBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=QkhDobY/y3/AUs06hagd0y6xJrnonCv8N+cStu+qUng=; b=J1mCIzLxSsLSka3LWpvLuWo8sXJDW/nkm2jo6L+55O+0M9u1vzbOy+ZY1m/OfZnx72 Aj4dVkbBhegOJhLhxcS4B7yVo/4yFKj6Y7kglof2CigMIKRVLZdHJoTmF2OS3QSVmqsT DY4Jy9Lp9uWmktdVNWFDjDzg6E8bFSQOkbFtYCB2XqAONNmLwqGYnkinCgjIr+tjp13e GlspRTyeTnM5LLhNYjsxBu6yTfKtehrOi4I8O19k2LYlD++u3hY7e8v7Xi5/kUeTre8u kQutlTLahQtxQebV58gT8SHm9tblMgpqSUDBJqd0XIII0JFS6kzUfK4+iuV5G2kpoF8s Mx5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WTsAXwmg; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id s39si3533881eda.89.2018.01.04.23.39.26; Thu, 04 Jan 2018 23:39:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WTsAXwmg; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 08E92C21E1D; Fri, 5 Jan 2018 07:38:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3498CC21E06; Fri, 5 Jan 2018 07:38:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C6E01C21E0E; Fri, 5 Jan 2018 07:37:38 +0000 (UTC) Received: from mail-pl0-f67.google.com (mail-pl0-f67.google.com [209.85.160.67]) by lists.denx.de (Postfix) with ESMTPS id CB86CC21E06 for ; Fri, 5 Jan 2018 07:37:36 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id n13so2634036plp.11 for ; Thu, 04 Jan 2018 23:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1Ilnws27UaIqbKdrxOqfIgmpqDBNEoe73Wb2iFMudwY=; b=WTsAXwmgtyzPzgd8oNp+J1I4Pok6EGQ1zvHa4EL/mzoxPk77UEtkemp7PxT9FcEbAm qAQ2Z1EOJnm/gXfxJpdpAnUsz4u0qwf+BSCAHJg1wKW133IOOHVg2UpE+4Xa6Y3gDPVw O4dqt9HhZLlrc2wsX4FiJe9/+Lee5dBDftXH0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1Ilnws27UaIqbKdrxOqfIgmpqDBNEoe73Wb2iFMudwY=; b=Xlu7MoaK6A3c51hFSDI4xs2HJ3KGZMgsu53moU+fKIi6V6SomtXA94+/yWlXl1H7II eo0f8l8skhVDkCPZd37drAfp82LL3jCCFxlM720HPw4d174b1ljibi4yo1cN+tN6ZG4b YdudwGl+qCISkU5xuVWxXif4qN6B5eu5GF7iW51bpvKqT/QriUYS9XhD5A4z+G5iYW/2 offZIpcHDFG23ZGGElRes6Fro143/KoAgAbCCL4MVrhaO3sPk38GshBkBcm+y5WC3dhe aiMToYxzu5zNsJWAgL77oq0gayuWa9gZHVR+jK7LTsbQgqTzsY7chepHEc1+9VKJfdQ6 AJNA== X-Gm-Message-State: AKGB3mIFD7mZTDbrcaebpoDHqFJ3s1XYFaTkAch/J+hXmYh666LQN/Rz StzXcuJmfp0KGb+nv9yTT50lcA== X-Received: by 10.159.247.129 with SMTP id e1mr2245844pls.222.1515137855543; Thu, 04 Jan 2018 23:37:35 -0800 (PST) Received: from localhost.localdomain ([45.56.153.113]) by smtp.gmail.com with ESMTPSA id b9sm9553789pgs.3.2018.01.04.23.37.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jan 2018 23:37:34 -0800 (PST) From: Jun Nie To: wens@csie.org, maxime.ripard@free-electrons.com, hdegoede@redhat.com Date: Fri, 5 Jan 2018 15:36:57 +0800 Message-Id: <1515137821-30583-3-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515137821-30583-1-git-send-email-jun.nie@linaro.org> References: <1515137821-30583-1-git-send-email-jun.nie@linaro.org> Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/6] sunxi: musb: Add fifo config for H3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add fifo config for H3 as H3 differ with other SoC on ep number. Signed-off-by: Jun Nie Reviewed-by: Jagan Teki --- drivers/usb/musb-new/sunxi.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 7ee44ea..0005c1e 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -290,10 +290,42 @@ static const struct musb_platform_ops sunxi_musb_ops = { .disable = sunxi_musb_disable, }; +#if defined(CONFIG_MACH_SUN8I_H3) +static struct musb_fifo_cfg sunxi_musb_fifo_config[] = { + { .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, }, + { .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 2, .style = FIFO_RX, .maxpacket = 512, }, + { .hw_ep_num = 3, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 3, .style = FIFO_RX, .maxpacket = 512, }, + { .hw_ep_num = 4, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 4, .style = FIFO_RX, .maxpacket = 512, }, +}; +#else +static struct musb_fifo_cfg sunxi_musb_fifo_config[] = { + { .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, }, + { .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 2, .style = FIFO_RX, .maxpacket = 512, }, + { .hw_ep_num = 3, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 3, .style = FIFO_RX, .maxpacket = 512, }, + { .hw_ep_num = 4, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 4, .style = FIFO_RX, .maxpacket = 512, }, + { .hw_ep_num = 5, .style = FIFO_TX, .maxpacket = 512, }, + { .hw_ep_num = 5, .style = FIFO_RX, .maxpacket = 512, }, +}; +#endif + static struct musb_hdrc_config musb_config = { + .fifo_cfg = sunxi_musb_fifo_config, + .fifo_cfg_size = ARRAY_SIZE(sunxi_musb_fifo_config), .multipoint = 1, .dyn_fifo = 1, +#if defined(CONFIG_MACH_SUN8I_H3) .num_eps = 6, +#else + .num_eps = 5, +#endif .ram_bits = 11, };