Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4036600imm; Mon, 6 Aug 2018 15:33:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd3oo7MNV0nHHVMZd5BGn6FxRreSqNVwY5v0ZUZZLjTaGeZDD9INvWUJYTPh7TdYUdwRekR X-Received: by 2002:a17:902:aa87:: with SMTP id d7-v6mr15510676plr.215.1533594783793; Mon, 06 Aug 2018 15:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533594783; cv=none; d=google.com; s=arc-20160816; b=bkcSd7ZUgnpNwRM9VcIzb7T0Jndy7TanIQRH++TX++gTtZFdlAgHilB/a5N0yMyFRE QHyTRS6TztrOq5JAqGpcUxz7ZGsggGgfl6MQzRH2jA5QwE0hcxtkAE7BBaNTT/GAVWwO pBJzoybmG0as8Un/h1pvAubZ9Xspvjduop9khrow8N7/YWRgE1sUWjO6L6rz/aPeS1bv 947iX+bbr/kAJHbozt8OyiS647RT0/dxK6dVmPTIB1WwV8s4niSJe/J0O5oB2ZM7dvVr 3hxpzFlduYrTh703puVLQFnVxXF/oxA9vBin1ykOwGs5Z2x0mTr9+R+S2dzD2XoC+naq 9RvA== 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=qE651b7//Tbsbpcejonm6kJTFp1EXDTRFlY4lg7NZoU=; b=BfiF3bP7HU9VPXlDVGRDIFLBI0UypNUxbX1SBne7CYwsETnfelBQdXNjSCuVJAcPa+ iwRS9S3dIrbHjnsMrlqanyhsQvqu5UowAzV7BeMTAdyVefNGBjNjsx+2Q4EZhCBzDutf A+LENX2YczjMSttE8lvrTxXHNVbERCL+Wh3V6HthCtN06W2Ne7QoU5C+0gRAPtIrF47F Sc2lejnB+N8y8aDbexc/GiGS6MyGQ1283021VIxlSuUkSJxCjae6MjB59CqYcTbmJJvh jvXvrRw5OQG0icmBlwgtc+3QMP4Dw0eIQ1mpPDdUvDbbI+RI7RyHYxiIg+mpmWxc7Qzm AhMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UzmOCFOq; 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 d8-v6si12639818pgn.382.2018.08.06.15.32.49; Mon, 06 Aug 2018 15:33:03 -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=UzmOCFOq; 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 S2387596AbeHGAkq (ORCPT + 99 others); Mon, 6 Aug 2018 20:40:46 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:45358 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387477AbeHGAkp (ORCPT ); Mon, 6 Aug 2018 20:40:45 -0400 Received: by mail-lf1-f68.google.com with SMTP id j143-v6so10187748lfj.12; Mon, 06 Aug 2018 15:29:32 -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=CUhYR8yk3ISYPLQc3KfU8oTQd/rEn5fMq+2cGPZR2IzM5RepSkkxAdSveyJqzV29JL uplykiHZgCimEV8p9tQwsELh2knozGkOseKIE5x68WF2AtJ0z2W2Z5Z6A3eLlvAfUl0v 3PN3Xvf+1zI6FfQEnf3OqLZD5JNlT+pGDXuMJEywieAh0dxvN7GnuBIn7lijTOVYgQbi lvef0i3eLwCo9KUporoK0mhwhk+iF6Cv6/hMHJEPDS9VXDkPZWWU1VWgzM7Ada2QcnT4 Pqr3YTij71qk9+f6fj7VUI7jKR++PbDhalNgZMRkDwGhvpiHkB0acWgPGlKdau8EairA TU0A== X-Gm-Message-State: AOUpUlEWEWqhN/Go/P9FmzfxPRTXOayFoNLEWhJNJUh/+w+dPFGdRc/R Kh2Wes1LFgGv5qqXhAbtetEdnR3Xsb8KXQ== 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 Cc: Jonathan Corbet , Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Tony Lindgren , Aaro Koskinen , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org, linux-doc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik 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> 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 --- 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