From patchwork Mon Aug 13 22:34:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 957299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JlVp0Sly"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="I63en7JU"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41q9Xk0YtDz9s7c for ; Tue, 14 Aug 2018 08:35:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=hfSN17K8xRmVZF9S16mIxFxJO1fC17KNn4BvLfjW4nA=; b=JlVp0SlyVqM7PuJCJ3dv4Q5z8D 6ZX8wL6kJzEbywCCRwRvxwZh6UvdV43Oczya2GtvetjJlJ8uY40JVGiwsRQoNN7JcDsxcm81yULJh 3Ija7OYj9l836M8eo7Zwqb4dNuEqQ4wxVT/TVBfgt4atAaWDBGZ9rAMWjpTbEHcyJ4RdWtyaIp5yN HHFuLkbGB0MZlLHVWPtnWts3yxztSeaGO5nBXcqrlqVz3xotoonuPGyeIWKK0j5X1iIse0S/iT53l vR7PHvPTM9dX6cgsxYTlOyhPKhmvkwsZvjNIqv+rsuO1OHHxzyEVDEpX7OAzdSEK0mweKXTTj0t1e 6mGQJUXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpLQb-0000FO-QL; Mon, 13 Aug 2018 22:35:09 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpLQJ-0008TV-CO; Mon, 13 Aug 2018 22:34:53 +0000 Received: by mail-lj1-x242.google.com with SMTP id u7-v6so13873326lji.3; Mon, 13 Aug 2018 15:34:42 -0700 (PDT) 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=b2SdvcCWvKUHXYoc18v3gflYdo3rK03xrds2t38Pw+o=; b=I63en7JUaNTgxV8FI2WFzD6wAlVmktuXrNtMgvRQOLakFX+2L/JsMaUQSa3ialIX8i t89YBkKNPnlPeCm+g9b08bYHVqXdurk8llgXfbGti//vodwCm5xp9sBs7iNy03Awxswg K9rM+C13Hi5bQyxMIjDKnNw7hrySQshX9doiA3Ug2fx5APA1JeDKSaKSz17Vr8KKB1pe kHrC1w+C1S+obq2jjmmE9YPwJAG0AuoAl0tSe/7ItMUeyaRTeC2zIvFjtF9PYY+TJJ0L EN0/bdkXbvjV8QTcLOnGJjpqGeM6YBfpDHp6495Dk8jZ6zQFPLUs6/gONG9vUgJNaiKB iJag== 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=b2SdvcCWvKUHXYoc18v3gflYdo3rK03xrds2t38Pw+o=; b=OBHuUzwngWOt+F+W5EzNJcbqowwWUp8aNTNs+5S3wQF7zVmji+5g8K49kkbveDvrmf MhylemYVQHjW5w2H83ACoCK6SZySRK9WHFh/BvDVpPLHcNXFhdA19UvxtXXD7Ho+H60L 0NIZHDuGwbJJ7pxStkJC58XG37z7cjcfGwA7lZm+xPbSpvkSlClP/OEUqUlBGebREGA9 7wdW7gxw9VYrkhZaHJTAqYKG/VD7Ewr8cHxkxMDN9nXdgnpO2bVDeHjbqthoB8d1fGUI VzWz/eW5JYdGy8lCRT6Sv6Tt299fSN+y5/yiEgnk8o31iGQ9uTHYivZqCSJCeVH/tGGN yjhg== X-Gm-Message-State: AOUpUlE6WndYSerBmsJDie3SrEVGwdo5eu1jU3XH6QhRySevX/2FTR1X HHbOwfNfZjw3Yci7zf3tAv4= X-Google-Smtp-Source: AA+uWPyp/o2aXnNMyr3Oy9nMJmN23OVRMJ1SZaWObPJc3Qf3fejcc1yO0vjS0rIftTYgjnCq0bG5DQ== X-Received: by 2002:a2e:9599:: with SMTP id w25-v6mr9877719ljh.6.1534199681289; Mon, 13 Aug 2018 15:34:41 -0700 (PDT) Received: from z50.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id f136-v6sm3572702lfe.71.2018.08.13.15.34.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 15:34:40 -0700 (PDT) From: Janusz Krzysztofik To: Boris Brezillon , Miquel Raynal Subject: [PATCH v3 3/7] ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port Date: Tue, 14 Aug 2018 00:34:44 +0200 Message-Id: <20180813223448.21316-4-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180813223448.21316-1-jmkrzyszt@gmail.com> References: <20180806222918.12644-1-jmkrzyszt@gmail.com> <20180813223448.21316-1-jmkrzyszt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180813_153451_419492_7D241EC8 X-CRM114-Status: GOOD ( 15.28 ) X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.6 HK_RANDOM_ENVFROM Envelope sender username looks random -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jmkrzyszt[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-omap@vger.kernel.org, Aaro Koskinen , Tony Lindgren , Richard Weinberger , Linus Walleij , Janusz Krzysztofik , linux-kernel@vger.kernel.org, Marek Vasut , linux-mtd@lists.infradead.org, linux-gpio@vger.kernel.org, Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Data port used by Amstrad Delta NAND driver is actually an OMAP MPUIO device, already under control of gpio-omap driver. The NAND driver gets access to the port by ioremapping it and performs read/write operations. That is done without any proteciton from other users legally manipulating the port pins over GPIO API. The plan is to convert the driver to access the port over GPIO consumer API. Before that is implemented, the driver can already obtain exclusive access to the port by requesting an array of its GPIO descriptors. Add respective entries to the NAND GPIO lookup table. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- arch/arm/mach-omap1/board-ams-delta.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index eedacdfe9725..16f7bbe47607 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -337,7 +337,8 @@ static struct platform_device ams_delta_nand_device = { .resource = ams_delta_nand_resources, }; -#define OMAP_GPIO_LABEL "gpio-0-15" +#define OMAP_GPIO_LABEL "gpio-0-15" +#define OMAP_MPUIO_LABEL "mpuio" static struct gpiod_lookup_table ams_delta_nand_gpio_table = { .table = { @@ -349,6 +350,14 @@ static struct gpiod_lookup_table ams_delta_nand_gpio_table = { GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_NAND_NWE, "nwe", 0), GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_NAND_ALE, "ale", 0), GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_NAND_CLE, "cle", 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 0, "data", 0, 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 1, "data", 1, 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 2, "data", 2, 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 3, "data", 3, 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 4, "data", 4, 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 5, "data", 5, 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 6, "data", 6, 0), + GPIO_LOOKUP_IDX(OMAP_MPUIO_LABEL, 7, "data", 7, 0), { }, }, };