From patchwork Sun Jan 28 16:19:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 126077 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp1781637ljd; Sun, 28 Jan 2018 08:26:10 -0800 (PST) X-Google-Smtp-Source: AH8x226Freb6erm+O9at07dw+9NWQytSuwmZSFeP7nRjmO2Aro91TcOJLRh87RCVKxoJZ8URB1iP X-Received: by 10.80.179.146 with SMTP id s18mr44338670edd.190.1517156770368; Sun, 28 Jan 2018 08:26:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517156770; cv=none; d=google.com; s=arc-20160816; b=isfodkpWsAF7f+fkrpT//wVTAoUQnX7cfpFu6bqB6SXCMClnz0RtHd1z0G8322hyJf nGhPgcJ88OlDTD8Z+ZHngdFqG/m3aGspaYWErlCinnfONZcVOSIYviaVIens5E4Zk5fL CVxrZ8FFTrnG8xLV602l8bH+P1jEUmoZPckdNHCgZYi5cP8fuq2t7wr0Drcllj++NpIT U4iGfyC/pTA84bvdiTjYbpq74/mdPWgn2iek9j49YcjYA6OyQxHCC1T70l3ctTXP9Akl zuJEL2oezEOJ0KXGQbm0bxJoHPd3Mxo5XTS17W9I5DXEtBRetnuqVFziD7g+P+oGuaki YG9g== 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=yKbdEs4R/vlDFr/+WX6cPrzY/k4N2sGJwdj655Q3Xhg=; b=Fr6+7cuzWdUOHAiN9KEfWD56t7Jsew839AivPkPiWJ0ohgPn82vIM/JNg4jGvbe4O9 Htdxu42UECMpjUxCy7Bfp2i9Ia6QRqfhO1i8M+/soedp9oaPneoD9N3bQiExYik5W8h2 vlWt4SYteSyOXvSnfUZBT9BnCUf5Gr2e2GWYWdcsl+TV2W65jZKPtMM9leJ4Q5RiXRwl WY5TNyRq11c7LdDivoyJCEsRv7xkZs57XEUq01Afj9mFaNHa53eLC/S4Tf7Zcvv3Ewn1 PdyHd/1aY5gW8YglIfxc9ILc1//yyvQRsOzk5BTERM7vXP3oR7c8eUjnAhKOKSZNnZ8B l9aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=YZF1A1uA; 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=gmail.com Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id f6si4667251edj.412.2018.01.28.08.26.10; Sun, 28 Jan 2018 08:26:10 -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=@gmail.com header.s=20161025 header.b=YZF1A1uA; 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=gmail.com Received: by lists.denx.de (Postfix, from userid 105) id D18EEC22051; Sun, 28 Jan 2018 16:25:27 +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=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED, 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 875F1C21EC8; Sun, 28 Jan 2018 16:25:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AFE64C21FD0; Sun, 28 Jan 2018 16:25:20 +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 18FF5C21E90 for ; Sun, 28 Jan 2018 16:25:16 +0000 (UTC) Received: by mail-pl0-f67.google.com with SMTP id j19so2088408pll.2 for ; Sun, 28 Jan 2018 08:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bF3T8Zu/R1VnQU6YIJx+OX0OnBl9E3sGm2WHgJ3Y8JM=; b=YZF1A1uAzd1aoyHemWoDJPFGOuHo6vnoLshs75dTU1MceGAzFEmodF3U2zuQMpWLRU mI69cBhfa5qHre+c2/QfLM53PuW9Je9tS0EewCwMTnzMVvB+f/rtRcjAGXlkWnevAKQv lAt5fnC7XPkyCiQn6IlRLg+gjKg9l3FFEykESAFLTiPdqOjLqpd65Ugr8+iDf5Fzk99M cYmBYMynI7/rEJPyWMHByX38mQcofAr3dDzfATThHUGMdKa7dXtQqnCvSED9vvgb4lF9 x5FRvoRFjbmUSoGI1Wn9yEbA3SYPygk8Gz2ZFkTeOW2K57gvS8RvYOqzQZy/aCgqRkwh mThw== 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=bF3T8Zu/R1VnQU6YIJx+OX0OnBl9E3sGm2WHgJ3Y8JM=; b=k4uKFd0k7xMqWQITl+zNOwLD4krqumrHDUYmwqBpRCevRNkazWAjFP3KCVqUbbgE2N fx4yFI0bh42eQXaKfYKt3yV5DNJlcl4DZ+q6+yJkh6oJqXnUIaoYT27xj1vymXmBL4ZO zQBcyXEsHAb4jjkoEfKeEtPYZIrtMMG6/p/8emflJB1/r5JUz1QSEPVwB7fASM+nA0lk 9VyD6y16x00Z9m36HxqhpCvCiB1aKoggDL27erTGf9/mgnIPrq3EKSCDmUfM4/FfVyEz LNaMoKPtGWb6PavTrkE1wGXfqd2pqX9ZzwaJxgOC64S+IM/YmZjM6VhiQgjD2tcEcg0A 0bJQ== X-Gm-Message-State: AKwxytd8aLqFVD/fgaQHN5jlk0m289bi9R+RXdpJXLkHNKT4t3kWBaXz tXguYdfmSaL+hel9Dd+u7z9X+poS X-Received: by 2002:a17:902:8a89:: with SMTP id p9-v6mr19008319plo.397.1517156714315; Sun, 28 Jan 2018 08:25:14 -0800 (PST) Received: from localhost.localdomain ([115.97.187.51]) by smtp.gmail.com with ESMTPSA id y79sm26075776pfb.177.2018.01.28.08.25.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Jan 2018 08:25:13 -0800 (PST) From: Jagan Teki X-Google-Original-From: Jagan Teki To: u-boot@lists.denx.de Date: Sun, 28 Jan 2018 21:49:23 +0530 Message-Id: <1517156391-11353-3-git-send-email-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517156391-11353-1-git-send-email-jagan@amarulasolutions.com> References: <1517156391-11353-1-git-send-email-jagan@amarulasolutions.com> Cc: Marek Vasut , Maxime Ripard Subject: [U-Boot] [PATCH v3 02/30] 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" From: Jun Nie Add fifo config for H3 as H3 differ with other SoC on ep number. Signed-off-by: Jun Nie Reviewed-by: Jagan Teki [jagan: fixed num_eps for H3] Signed-off-by: Jagan Teki Cc: Marek Vasut --- 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 aedc24b..46c8bd2 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 = 5, +#else .num_eps = 6, +#endif .ram_bits = 11, };