Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1860238imu; Wed, 21 Nov 2018 03:09:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/XbZK8rbLocObdCb0keoWYZ6HCCbsoKrIjpS2km67ki1hHjgmfi6au/dbbo4LAKrV1aEkK7 X-Received: by 2002:a17:902:e002:: with SMTP id ca2mr6409071plb.103.1542798545150; Wed, 21 Nov 2018 03:09:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542798545; cv=none; d=google.com; s=arc-20160816; b=0w7adBBCrpPviTroFG3qvfrzyUUnM1vs3wU72ngR1GTKjfvxJUtNHGd3zbVzBK7uCB kus3RAEHQfJuep/pBS3R0WDFjeiVeXo/jVsWSz8oRue+VlHLkt+ZrDg1fAXu49Toe3Om 36B1C1Aub6E9BRFRgz9YLAUP4sA5JCOuAwWZAo/talBfluS8C+fAsOObuYl+jn9H7HVf W45nOTq5p3QzlIVJa8Z2asZP/6BC9fEn309Q9wbtR6ksUkeSZkuk1/o6dhvLBo+Gg2mq m56VUWlBWbQcsi2A92IZrBA4CAJAIDoysIjioGj1k/GqQxe12EMiXeZixjW61cY34Vnp gQ9w== 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; bh=GEY4Eg/HyBux+h94i0R3Me7aHdi4FQExdO6ecAY2kg8=; b=yYl7TQzncNxMGLXnIKS0LhRMkjPmCR3cP6fHKAInJEJvyuXU94JEfUNfxTWSxewt2g DyWnKrm+ItLHCb/HWf7jXjBlcwKT3cDDZTqyl0d3sX+ZXD6X1Y5uYNOrzLY1rdH/aYHJ ed9v4WMJhxlGMYFJHuGtXKksxXwh84DNcQhAFZ49Mh46H7Dr5sjDx9mmOBOKcNIApIHC 55QXXdcE5nZQ9oDisPaea8DNJItupItFa/vQcf0ifynvUKmHd9XE1ww9gf0nIyK7HZ16 9b0ewcS4zCiC9MhBmEsOqlgGR7cBewl07KFSFRgam3xP4iuc3BYIayD4f2kKCqNwAUCf WfMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fSdoEPD4; 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 ce19-v6si52504570plb.162.2018.11.21.03.08.44; Wed, 21 Nov 2018 03:09:05 -0800 (PST) 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=fSdoEPD4; 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 S1729806AbeKUVkP (ORCPT + 99 others); Wed, 21 Nov 2018 16:40:15 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:43206 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728460AbeKUVkO (ORCPT ); Wed, 21 Nov 2018 16:40:14 -0500 Received: by mail-lf1-f66.google.com with SMTP id u18so3653905lff.10; Wed, 21 Nov 2018 03:06: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=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=Ln95vLWnsa6uSYJAa856KDFWrc5aila8Rs+/wbWSme45UEIU7+n9cMj2GZT62ALwTN kv3n6pkaVhJHywdrsQ39fTlgqU6m9BIV5xLoNK8ATP9uw92SNpOAIgmQuo5I1L5+CvCB CMw9mrrbw7chgMy7OVBDUNedjp8q0P9lkkmErTulo/NCIayZ7QyHIODIrfCcm5ZmGLpN O8bFKAIQuFWImOF4pJ4MVVVA0iKAoNCm5VMAUoMzU9sa0lGAf1oCHXD5bVn8PMyYZWZH 2HkcBRYhzzD89jNSUjoJIeXb2sCFbg8UJjpi/FHxR2s8FmKk9Wh2yAeXrY4ig7lx1fbk uhKw== X-Gm-Message-State: AGRZ1gKjHGNpw5OyZHjDunMRJEt5rB802AQxjlIlQLQ3R9fVOShLvExM NueCqTfEK0aI2DtwpwTECWo= 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 Cc: Tony Lindgren , Aaro Koskinen , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Linus Walleij , linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik 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> 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 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), { }, }, }; -- 2.18.1