From patchwork Fri Jan 5 16:15:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 123541 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1001311qgn; Fri, 5 Jan 2018 08:17:57 -0800 (PST) X-Google-Smtp-Source: ACJfBotfp9i1UNg7wiqpqfPbhySfa6Y7fVEXf5BnyBIaKOGP2DRi+nCHOhMHGd59CMcorGh9Qccq X-Received: by 10.80.231.13 with SMTP id a13mr4953063edn.264.1515169077797; Fri, 05 Jan 2018 08:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515169077; cv=none; d=google.com; s=arc-20160816; b=MfAQ2f5a/Xnr3pvxR5CWbpwNQVcSQ56vdaGfMl2zqWJR7J9eSsYoOL37n39jSYBAmb vaqnU+46xuQdl+PAtw4HoYzYgjdrqzSqdTQfcUbc2nlXYQdaiGhNjUKEMDdZoSApzj4R 0PD5vyLx1yxo48N+/DnCn+pbbCOJctAhjoNIi3aGcpIw2Tjqm9iUFHNQG2e3mZfBebkn iMOQGq1i6f+72cxQN0v3Ia+UU1LJ82avlPgW5hVxMTE2GlSYl9i4y2gsFyp2YqJTRY/H EUfFmNtKlcw2Ut2cK+vuUtscsJbpTFYzwsxQ+ltt5bWGwCWu+K8T3XfrH1lsxIhTHk7Q oUGA== 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=sj4drr6GiG+LTiYVCgbiDTCD267feOILYxl1rg667QU=; b=zc2nTY4he0JLENBOpvC/olrVd6sOQEuqFTYCP1NrGV9taWr/1zzMI+86t8GyNUvPjV RNT2PtSExJdQwvkW1BJelQg9jNLSUPc2Ga7c3Z9t7mwW+o431bfCOsEeSF8mMa4XZIpT vc1gSs5NtvG+CFVVn5A4g56K1d1qWsbMWn9cWbebq5EHw1jAyOSmQnmrdj/GE0nZ4mYQ j3ReVKLIURiwlYjYVbQBk4wPzVRMrTtjpFz7vMmgYlP99EjH0NNQcxjStTaD8ogMMm3Q OGocV5KZZXHNZJmbV5bxVpu0/6LImULznvgMLsAgsoXJxcrTqiRUkmAy371vmmyQChHm nnIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fYkHDfCe; 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 p9si3206838edh.44.2018.01.05.08.17.57; Fri, 05 Jan 2018 08:17:57 -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=fYkHDfCe; 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 3CADBC21E97; Fri, 5 Jan 2018 16:17:17 +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_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 8339FC21EA8; Fri, 5 Jan 2018 16:17:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F1C8CC21E99; Fri, 5 Jan 2018 16:16:36 +0000 (UTC) Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by lists.denx.de (Postfix) with ESMTPS id 8A3C7C21E2F for ; Fri, 5 Jan 2018 16:16:33 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id 81so2155508pgf.6 for ; Fri, 05 Jan 2018 08:16:33 -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=pabEJY38UWHQPQLBGCCczq2EAPgiYlh9f5BdugrQxiE=; b=fYkHDfCe4xtu9Ad9h6cEiJTzSnNho+O/93yVgiAV7bfmwtkD2IexwbJ9OgEPmYMbWq 6nkjTcdpygE3v27Uq7EN7vkO9X5CWjshH/nJUAzgSp73riGgxTCgErgFuUxsxIGmMxhk eKI1ugm52ebAeE0KGPbcVFIs+hmUJQYrULVmQ= 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=pabEJY38UWHQPQLBGCCczq2EAPgiYlh9f5BdugrQxiE=; b=e8qk5kRgfTYzPfNjJ+l0VbdO25UlxIdeAtZx6jCiHJIbmAvLSutaOWa+F7NQ4rYef3 XQOHkp7VKsDzwgY22eqnKW73oswoBKffwROlU5Ngom4jmCY9g3O33pu34yjHmMdtZcgx Nmr3ybU9NfgBtwskupd8ow8YU5qTPOzn2nvFqKI0nU/9BPuSSP+SD6vfbeVZNGXMFAg0 DuY2ROfXfBJJrZrT94Cy9MuYp9R2cKyfv3URMeosFyh0tdbILkiuOEJlAwmMbGYjGF5B HtDDwSjqiUsOZc6mdN/tLSshDVy1T6EWiwPR+AkTRjmeFYF/cSA6i/s4sC+A3VjkxmfW hpHg== X-Gm-Message-State: AKGB3mKF6Aj4vasTIZCPjAgxbCtBd5YiB357ZO8lha0lteATRYqWCqq3 OJCDGApVNbdHKtVMQ5+dCdnkdQ== X-Received: by 10.98.101.197 with SMTP id z188mr3423054pfb.15.1515168992276; Fri, 05 Jan 2018 08:16:32 -0800 (PST) Received: from localhost.localdomain (61-216-91-114.HINET-IP.hinet.net. [61.216.91.114]) by smtp.gmail.com with ESMTPSA id k80sm14337459pfh.30.2018.01.05.08.16.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jan 2018 08:16:30 -0800 (PST) From: Jun Nie To: jagannadh.teki@gmail.com, wens@csie.org, maxime.ripard@free-electrons.com, hdegoede@redhat.com Date: Sat, 6 Jan 2018 00:15:54 +0800 Message-Id: <1515168960-18960-3-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515168960-18960-1-git-send-email-jun.nie@linaro.org> References: <1515168960-18960-1-git-send-email-jun.nie@linaro.org> Cc: u-boot@lists.denx.de Subject: [U-Boot] [[PATCH v2] 2/8] 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, };