From patchwork Mon Aug 6 22:29:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 954274 X-Patchwork-Delegate: miquel.raynal@bootlin.com 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="aT7OashL"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UzmOCFOq"; 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 41ksnj24M2z9s3x for ; Tue, 7 Aug 2018 08:31:37 +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=xV5YDhEJPJdeCFyDqoyN363feihKKcHz4UsrKFzIPuU=; b=aT7OashLkN7slqi9Rhcxz1jQ5U ShRat5YZPOVjfADeXTYbrKh9oyXJ4nAKUSQAtF2P/XK2p8qroCvOPngSILMNm9TO15vYQMPHF7BK+ 5TQzowLZvPdzlJY3GlThKilszwhmHVMP+W3IwiVh23m5SGVw8n1I52XAwpJrCe3QkqOqMAdYCsyas aVUeJHBZY4vrSVB14oS/PSi3GaybqQynoECXiY0jsA0Z2BfUENO/G27z3rPGwxMdqUeJqREmOaDkG GUsncd08TWIOUAd/nEopBME9pHRpUCfE+MicdMJnnbcEa+qWW/XDbPFQt/T3sMYqao5oFrVv0ywME XxIUOceQ==; 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 1fmo2E-0008Rk-I9; Mon, 06 Aug 2018 22:31:30 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmo0Y-0005Qq-9C; Mon, 06 Aug 2018 22:29:55 +0000 Received: by mail-lf1-x144.google.com with SMTP id u202-v6so10191460lff.9; Mon, 06 Aug 2018 15:29:33 -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=qE651b7//Tbsbpcejonm6kJTFp1EXDTRFlY4lg7NZoU=; b=UzmOCFOqDbEGpqK5M4xDrxNAXdA3kP3pyZWsy3bzWt+QEaIOW0BJvYmUtU0eHMSfWa t5oVqRitJyP6DHIEZXrdHyovb1X2Z36+gu4NJLjnfQES3lDRH7S2v9e3yapUI7mhjh83 kn+SzD0tfX6JQV5IqXDNdFLEdYJPNEbuVpUZJV9TQSKe+hJ1bPnYIoOieYMLOVLTQzO7 SPikvaqzL/0F0YuqFhAOJeSD562MHRn2wn0OMrX6KZWDezmsDRvMLqGvOEHHqLslcPc4 nST822MJLIEu+ih9X92tJjWoNSpMGhYy1tVBsJtaY3+Y1cVLKcMuhduwqC/YOBJs3xxx wp1w== 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=qE651b7//Tbsbpcejonm6kJTFp1EXDTRFlY4lg7NZoU=; b=PtDsJ8eBtTNZRkQMvPeAZMTmiDAKz5Ved0sxj9L0a3Enhp0PqQklG92VEjUKIi63oz zIM/FEBYpIp8g78zjFNJ+vcqg2SkCbB7aE/V1szVqFZz0rKtOlF2I13FE2vDEceZ8nn/ Qenxw8r0JRlfJ/FCb4j/NUgAORRkebWT/MCMPKsYZD/hvVsBbh8K8Khwei6H4JVNilhr lzF/0cBgZz43sobaTPw622ECByrTxmXOqtjvFoABRsgmesM9Wt3VPPTwV2+r+O2cRgJ8 01B1ZRuvYFP1QMLKx6V1hlt5pXwUupbvGsJfNYPRUWh9AHz9t7KCoQ0QP1fvzx+/obLZ I1zg== X-Gm-Message-State: AOUpUlEwB7fOukjyuyunQfO+PMdrArPUp3eDJ3r9GWVQTYfT5EvT5QAn aqbaODyXAzqTRgk3deuKTpo= X-Google-Smtp-Source: AAOMgpfPA1GoyiViwrZ+zcc9ED1kWg0CchOueaRUSh+QIUJrLIOeXMRKB062ROUOwBPzBoziWlnPxg== X-Received: by 2002:a19:4e06:: with SMTP id c6-v6mr11876651lfb.30.1533594571832; Mon, 06 Aug 2018 15:29:31 -0700 (PDT) Received: from z50.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id o4-v6sm2438561ljc.67.2018.08.06.15.29.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 15:29:31 -0700 (PDT) From: Janusz Krzysztofik To: Boris Brezillon , Linus Walleij Subject: [RFC PATCH v2 03/12] ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port Date: Tue, 7 Aug 2018 00:29:09 +0200 Message-Id: <20180806222918.12644-4-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180806222918.12644-1-jmkrzyszt@gmail.com> References: <20180718235710.18242-1-jmkrzyszt@gmail.com> <20180806222918.12644-1-jmkrzyszt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180806_152946_702378_C4B0C6E6 X-CRM114-Status: GOOD ( 14.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.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:144 listed in] [list.dnswl.org] 0.6 HK_RANDOM_ENVFROM Envelope sender username looks random 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (jmkrzyszt[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 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, Jonathan Corbet , Tony Lindgren , Richard Weinberger , linux-gpio@vger.kernel.org, Aaro Koskinen , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Vasut , Janusz Krzysztofik , linux-mtd@lists.infradead.org, Miquel Raynal , 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), { }, }, };