Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp3645571ooa; Mon, 13 Aug 2018 15:37:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxOibRD3quhKg8NrFCWhEkuzoV2xxg4f6rppoU2Iju67S6wKDiabCQ7XPTdwjQC2lNhmLjG X-Received: by 2002:a17:902:bcc6:: with SMTP id o6-v6mr18078411pls.117.1534199826201; Mon, 13 Aug 2018 15:37:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534199826; cv=none; d=google.com; s=arc-20160816; b=bCwflJSI2Eew8XD3wa1AvgQ0GhyqGvlgGhyfkRxkAmy0MNE0JyE3Arb94LNFQXBbhE 6neadn5h9OyS9SwBKvgKUSRdYjZFVt10ZJ1r01fIpH7Xk+jCXzfplcxbH2f8pxbhtgei 8g/vtcM9ZEmbqpQc2Ihd4KJcJYFTt1Lt10t2wmTQGZ4KAwl5spvpxl0e184+XbLd/IL+ CSG32YibOPq7THdalkCr8sDama7Dd1YtJDzGYhhW7bpwGDuKBwovjIhNw4+ZnZFtz/lF T9wdpPzba2E90PTg5W0g+lAXX+CTJipVZiQB6nsrgZ6uSflOoy7D3DnI4g4TwDY+Ylfo +hkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=b2SdvcCWvKUHXYoc18v3gflYdo3rK03xrds2t38Pw+o=; b=iFOvj4lyP0TfEiMKiq4k2vPm3l/3yoh6ZDwO8dbOlCYGZcTLzS8dmNOo0S3A3IIPfi YcRUSuMKhGhf4R2emOrfdLf3n3sCd/mhOLUJfr/Oa4T24ojmHke463f20nQHZaEHJlz6 R3fstPglnhHUikmoFtGLdrsmOPWitmUJqeoPTvssL5Jz2A9hhl55B4ZL/KNO4cp2npt1 fvfpKIdW4RBnc0h0f+1SJH0aZQFRXQrlbtF+INFWjQGAbY1A8NvVHsyIB2PrEBJS8Iqf Q+xro8h9e+/NQtWAbEcCXHy6XBGEpxD+hbOqNveo0q8Nxaerh2qzGvX6uGpm9H+awZar FNjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I63en7JU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q129-v6si18222567pga.217.2018.08.13.15.36.51; Mon, 13 Aug 2018 15:37:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I63en7JU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732332AbeHNBS6 (ORCPT + 99 others); Mon, 13 Aug 2018 21:18:58 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38391 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730178AbeHNBS5 (ORCPT ); Mon, 13 Aug 2018 21:18:57 -0400 Received: by mail-lj1-f194.google.com with SMTP id p6-v6so13830999ljc.5; Mon, 13 Aug 2018 15:34:41 -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=dJbEBJG3lMQq1cp+EniokgS+tlOnKHSOpba/UgW5h4djREb+6RXmrtGGEVsCXHGNqm MRmM0KhCbavoFe6DclV1+ZbRHJvFays3XhdvOzZJzUhW1USfSrvau/iMI1TGi3mPxY1X gwKK34tJLBZp7959Ueh07dgESrIq2bj46yoN1g8NHVgIP6cMOs4VTXfFbo+fNmPNS3lE UzOUENfytLlJf6ERnhmWoGizQTWt9qQd1yB6ZhHoFSjwA5rOwoKPetr9JIEvG3yfcFXe xcHV4MiiYXjfYflFJr+R1EsSsAx3LmoPGUOvil5W4kXxm4moFYLJMM2LcjbCZeFuW2oK 0eag== X-Gm-Message-State: AOUpUlFY65ZmDVm2kEgOek4U4n8NRxHuvHMEHdWzHsAIDF1h62Nk8SfW Jl9IdbBbuAbsefefKAL39FPq1T++2eCcUg== 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 Cc: Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Tony Lindgren , Aaro Koskinen , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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), { }, }, }; -- 2.16.4