From patchwork Wed Nov 21 11:08:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 10692399 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D5AE13BF for ; Wed, 21 Nov 2018 11:08:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 667CF29DA2 for ; Wed, 21 Nov 2018 11:08:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56DC82B29A; Wed, 21 Nov 2018 11:08:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,HK_RANDOM_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 03B3B29DA2 for ; Wed, 21 Nov 2018 11:08:34 +0000 (UTC) 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=Zj607W04xQKNqlIQz/nfUIV9Vu3ErddGUQfqKOC9EsQ=; b=K0ds0ukLwcFffWushUNxIcnFg7 c504erUDkgt3+bXNdwIeHNiC7Ai7eXvQGhehxS2/Dus/6y4EZfgGU9d3kGPLyqb5htGvQh25vK7iL Pg/EWkzL0sZ0kpcOZc3i9P6foXkS1WHWHxo89gZj9lhFZMx05WSlny9RjZvVou9Np0fLgt26K3cQP Gh5CG9ChhUQO130+wchob1MsJx3Ny0RjxiEGAEMb8KN1EfBghFJxlwaofZ21Si7dpdH1qC48VqByp CAP/XZ7f/N6UEnMvoXdg8DkXlYOSk4YEWdoLOiVd9CDVN2mvL1ebwLs7yORxvU/G7yAB5JE/mRXAw HcBxo6SQ==; 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 1gPQMo-0000Lq-JD; Wed, 21 Nov 2018 11:08:22 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPQKx-0006m1-GX; Wed, 21 Nov 2018 11:06:28 +0000 Received: by mail-lf1-x141.google.com with SMTP id n18so3661098lfh.6; Wed, 21 Nov 2018 03:06:17 -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=GEY4Eg/HyBux+h94i0R3Me7aHdi4FQExdO6ecAY2kg8=; b=fSdoEPD4EYSMpQ0bLrJrz2xELWJ9+cHimuDX5KKGx9MMgkOOFsguXqF7E9zlik6HtB 9p4Bmys+PbPamWwAHt1iHrLwsuI5GEd0n2sp7MeWszGX1WjwtVtsj3B9YrFlCK46KO9r VbGVL3tWFBR4dHv9xawfjxDa2jSVVCJO6sLU9+to8TGLo3UliR391HlFsxvUmIP2aywj FLXBhF+Lb01RoXNx2g5hCIk/UVrKtUzyhtq4BL26eKZpcLWtQhY1En3Et/nMhflyho5o q4zQgPWMzJozWpj/pQ8I1Ai+WVD0H6ScThlgYKGuVt+WXqnOu6EGdSKtpt6OIjsTG+Mv KcQA== 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=GEY4Eg/HyBux+h94i0R3Me7aHdi4FQExdO6ecAY2kg8=; b=VLbxOr8ahUxL7QKfZnAELJaudzQ7BpvStbiEaa+QtJw+Lcidfly5mNBd9kTxyqkeh1 FRj1fNS2r5+hQ1kkld//aoou+pmxh9G9RHuyEF9n7crlklm/RBj7q4MwyIdZvPSt+Xhc t9mWfW0+NFYKwiLvNDME7kMXzFgrjzNiG+a+szxPgl/ygL5+B68dZ6ft48IgHXkMpE3g CpAFjFJH2tXabvBTgAhZdCfsvSHiYkLnHqyWnrIQoSmfM/C62uzC+pjLW1E+q2Ku3ISd GfXlFc4fefbvvqMh13TuODSTIBZgVQJIrAtCngOECszPdmDJmHxhq/6Mx4C/SuvmLrWo mmNg== X-Gm-Message-State: AGRZ1gJ4FDZa0m7MaLinxtyIdRTrSDRLxNHKrOFG+rJ7poBKBe9MhhsW n+/ZSMUz+6Cg41z0PTvn1SU= X-Google-Smtp-Source: AJdET5f8WSAo1r+yASJCCLVo/f7dN6rSkx0J1Ir4NQ6gzuzZob/aelqVPrliQMoack9I/rORP+uC8A== X-Received: by 2002:a19:d486:: with SMTP id l128mr3305420lfg.114.1542798375418; Wed, 21 Nov 2018 03:06:15 -0800 (PST) Received: from z50.intranet (78-10-164-223.static.ip.netia.com.pl. [78.10.164.223]) by smtp.gmail.com with ESMTPSA id x11sm7280047lfd.81.2018.11.21.03.06.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Nov 2018 03:06:14 -0800 (PST) From: Janusz Krzysztofik To: Boris Brezillon , Miquel Raynal Subject: [PATCH v4 1/4] ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port Date: Wed, 21 Nov 2018 12:08:03 +0100 Message-Id: <20181121110806.32076-2-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20181121110806.32076-1-jmkrzyszt@gmail.com> References: <20180813223448.21316-1-jmkrzyszt@gmail.com> <20181121110806.32076-1-jmkrzyszt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181121_030627_555050_1BA0767C X-CRM114-Status: GOOD ( 15.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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, Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Tony Lindgren --- 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 3d191fd52910..30c0d18f372e 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -312,7 +312,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 = { @@ -324,6 +325,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), { }, }, };