From patchwork Mon Feb 17 12:33:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 11386241 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B36CA138D for ; Mon, 17 Feb 2020 12:33:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78618207FD for ; Mon, 17 Feb 2020 12:33:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VR+scsRC"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="GpjYaiwu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78618207FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=3s4KeSi+JxYR1KjTmknKxD3dzfMFscYjw/zKnqce42k=; b=VR+scsRCQriWv+ ggWkQYBPhrmPpav+ITk6TY+1LFKpvJAkARyRphc3e6q3yCb6ABA3Z5/BRLTfVIT0jm66j57+4Z3mD OqAf25KNuNXJkd5FEte4s7xWot6torPld1Lof+FARG6t2YkiJ7mVqgCKhwSAziJhGvcWhZmfHr3XC i37GfaQpylM9QaouLjxRZ1wCQE9Z9sfUHm7PahvRZRENpXliTcszVXwHG736vJC/FSFwImvGm59q7 HM7jYqgg8seIYUdlV1mQPrFbv44Ed/G5FU2mIzzZSz26RJwNkn2oCBTB54dCPzSt5+x5ziWWB9ztH SU+QefXERgoWcbNczShg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fau-0000YB-DM; Mon, 17 Feb 2020 12:33:48 +0000 Received: from mail-dm6nam12on20614.outbound.protection.outlook.com ([2a01:111:f400:fe59::614] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3faf-0000MJ-2A for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 12:33:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AY2IAaGh627RJfIMFreg3aR7jAkrReBmZ4m5i/W4WtEKGl/+6eYft3KHFy8ujjgXcm9K8L6NcWw1BdGAiTIXj7Hu0em/xBe8NVRBhho3Hf63BWtOHaXS+YYIFDV88UcBO9LMKgQm0lI0lDNxN+nFPmbVl6FuZlwcTgNaq2skwbHRuF3B3SuBvf4ANMyEf9Pwn7FBLiyNxDvbiY0wYgWp6gYnfaVQd+ZWwFRCNVEvxgV5xjxwYcMM6c/Fl+In80Ao/Hw9Sv+gtEZ8U2fGRCX0PtFZQWl759zfEpE24Yov09xuwzO5T5SSBquMYdEK/4mwbE9LJxMI2qV6qaPRW2TSsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n2HwNjoxgdMe6fGWHJNbzIB1f19Q/azDu2qzoRYjkyc=; b=eU8h+tC53l0RAdNCGOJ49UuXI9P1eMUw1hhAjVfPiKgpPKbFnAGinELAE5xszUpi81Lre2Zf9RfPDLUSAP6Ufh9SZ6R0+W5EnIn/XzQ81x5+/4vqt+DXIRCic3mX5wN1pL2Bj5qpCWIW0js01znRDn4q4FMq+rY7fPWh4F/5KOaZ470IO+2npBQc9eM4Ei8iByu/j5x3k2y497Mu4ERO2FZzPt43s7S1nJHuD1HwiDqLmbmhXKXpbHErwNjDs5UXLhgckhrH72DOpVOQu5oc2CA6fOfimm6dtFBxuGPY3gMrfX034wNwHCKh8A0vX7oUFzJXuA2W3xJnmpx5EEyZYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n2HwNjoxgdMe6fGWHJNbzIB1f19Q/azDu2qzoRYjkyc=; b=GpjYaiwuYBIOMLJKptG4mqANIHmeIl/sT4DkGQnBUyJq/48eA/0i+MEouNxlAfFZR/AGFbp6J5Xx+w5CfTvr9uLytmYgH+YTiSXgEVwJiBI20AjwMQ9Mo23fw6Tr4nnvojNgQaIR0/Ho7ci5ty30C6A1YjYhjuaXrnEgu280T6M= Received: from BYAPR02CA0065.namprd02.prod.outlook.com (2603:10b6:a03:54::42) by MWHPR02MB2269.namprd02.prod.outlook.com (2603:10b6:300:5a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Mon, 17 Feb 2020 12:33:28 +0000 Received: from BL2NAM02FT013.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::204) by BYAPR02CA0065.outlook.office365.com (2603:10b6:a03:54::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25 via Frontend Transport; Mon, 17 Feb 2020 12:33:27 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT013.mail.protection.outlook.com (10.152.77.19) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:27 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j3faY-0000SE-Pc; Mon, 17 Feb 2020 04:33:26 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1j3faT-0001vY-MU; Mon, 17 Feb 2020 04:33:21 -0800 Received: from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01HCXJ7f025834; Mon, 17 Feb 2020 04:33:19 -0800 Received: from [10.140.6.6] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j3faR-0001uE-2X; Mon, 17 Feb 2020 04:33:19 -0800 From: Srinivas Neeli To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com Subject: [PATCH V3 1/7] gpio: zynq: protect direction in/out with a spinlock Date: Mon, 17 Feb 2020 18:03:07 +0530 Message-Id: <1581942793-19468-2-git-send-email-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> References: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(346002)(376002)(39860400002)(199004)(189003)(26005)(6636002)(9786002)(36756003)(2906002)(356004)(6666004)(7696005)(4326008)(70586007)(70206006)(478600001)(336012)(186003)(81156014)(81166006)(8936002)(8676002)(5660300002)(44832011)(426003)(2616005)(316002)(107886003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR02MB2269; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8ec54fe7-46ae-4162-3535-08d7b3a596b8 X-MS-TrafficTypeDiagnostic: MWHPR02MB2269: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 0316567485 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jy6IYm8vwEvo8Hw3oYtwOFFUpy7HO4FmdS3LlSRwLnGW3l6zYF1WQFy1vxJqZXDlwxpz9p1z2S+DnM3BklbfqaHjbPJCN89K5GHEJfiv8TEPitMJ0mp3b4pAulO3o2LhLse7es7PoXOkhdZzqrIFMCtylKlb3Ep/x6B5s51DmlPIQgBM97Id4/hSbDAblCFKLrlgINsGMMXM21uXmKTiquiUS4fYxEC5Fetve49uRkW4oAzeHPKEvLlfu4zmXrDShZHTrOEGax7wcBKjfOrhDxYiYNW9ZEEQif9pMu5uEg7ceZ8S3a+gxqDeJ2tTpo9unBf8BZomGJYl90hMHkYkEyKiR33jjpoLi/ch+hX5auEFLqjbJ217QPkXj3qN6N3LCLhLtuZ/jKwiwO3NfL1gE9C+j5ChcsVjv8ktjI8W1gmBZRjy8C7AKIAzPWziDMDN X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 12:33:27.3463 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8ec54fe7-46ae-4162-3535-08d7b3a596b8 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR02MB2269 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_043333_109511_781C047F X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Glenn Langedock Fix race condition when changing the direction (in/out) of the GPIO pin. The read-modify-write sequence (as coded in the driver) isn't atomic and requires synchronization (spinlock). Signed-off-by: Glenn Langedock Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli --- drivers/gpio/gpio-zynq.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 05ba16fffdad..fb93b35ab19e 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -116,6 +117,7 @@ struct gpio_regs { * @irq: interrupt for the GPIO device * @p_data: pointer to platform data * @context: context registers + * @dirlock: lock used for direction in/out synchronization */ struct zynq_gpio { struct gpio_chip chip; @@ -124,6 +126,7 @@ struct zynq_gpio { int irq; const struct zynq_platform_data *p_data; struct gpio_regs context; + spinlock_t dirlock; /* lock */ }; /** @@ -297,6 +300,7 @@ static int zynq_gpio_dir_in(struct gpio_chip *chip, unsigned int pin) { u32 reg; unsigned int bank_num, bank_pin_num; + unsigned long flags; struct zynq_gpio *gpio = gpiochip_get_data(chip); zynq_gpio_get_bank_pin(pin, &bank_num, &bank_pin_num, gpio); @@ -310,9 +314,11 @@ static int zynq_gpio_dir_in(struct gpio_chip *chip, unsigned int pin) return -EINVAL; /* clear the bit in direction mode reg to set the pin as input */ + spin_lock_irqsave(&gpio->dirlock, flags); reg = readl_relaxed(gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); reg &= ~BIT(bank_pin_num); writel_relaxed(reg, gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); + spin_unlock_irqrestore(&gpio->dirlock, flags); return 0; } @@ -334,11 +340,13 @@ static int zynq_gpio_dir_out(struct gpio_chip *chip, unsigned int pin, { u32 reg; unsigned int bank_num, bank_pin_num; + unsigned long flags; struct zynq_gpio *gpio = gpiochip_get_data(chip); zynq_gpio_get_bank_pin(pin, &bank_num, &bank_pin_num, gpio); /* set the GPIO pin as output */ + spin_lock_irqsave(&gpio->dirlock, flags); reg = readl_relaxed(gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); reg |= BIT(bank_pin_num); writel_relaxed(reg, gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); @@ -347,6 +355,7 @@ static int zynq_gpio_dir_out(struct gpio_chip *chip, unsigned int pin, reg = readl_relaxed(gpio->base_addr + ZYNQ_GPIO_OUTEN_OFFSET(bank_num)); reg |= BIT(bank_pin_num); writel_relaxed(reg, gpio->base_addr + ZYNQ_GPIO_OUTEN_OFFSET(bank_num)); + spin_unlock_irqrestore(&gpio->dirlock, flags); /* set the state of the pin */ zynq_gpio_set_value(chip, pin, state); @@ -885,6 +894,8 @@ static int zynq_gpio_probe(struct platform_device *pdev) return ret; } + spin_lock_init(&gpio->dirlock); + pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); ret = pm_runtime_get_sync(&pdev->dev); From patchwork Mon Feb 17 12:33:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 11386247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5F44139A for ; Mon, 17 Feb 2020 12:34:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F66220718 for ; Mon, 17 Feb 2020 12:34:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iNc/mYmi"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="UD23pRoA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F66220718 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=H5cJ6/lwWMlzPBsw6rs/aM2p4tArV25XrDopw3p4ON8=; b=iNc/mYmidhxaJb x+sCdUu56BTEw4VY78cumInzfQjlXpigxjDA09YJSRaixem7+rDTlUBcQU/gN2UFzYLHQEBDrqWkS DoNLRu+4J4PTqkDMlWS3OlxX2of9iRhaPKq6ao0txo2lvOfFlZanKgBJtlede+8IhNzBpn8aXy65w WUQALITnQ8/chDJDf/zQhz8872PRcghKTcKGyitPjIaFdEnxNw30/DiSZ3KW2rgjp8C21xsEkoTmp kDi5GUE4eJerfp1j9GDFGT/w67Z3NotAlV8AJyCc8KIsJQI8x4VULD8XYltqIoU88crgR2NvCDByz 3ecDLiEQ0g1niJq4sKqQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fbp-0001Ob-Ge; Mon, 17 Feb 2020 12:34:45 +0000 Received: from mail-bn8nam12on20600.outbound.protection.outlook.com ([2a01:111:f400:fe5b::600] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fao-0000Ra-Gi for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 12:33:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nG1tEbfLIVLCrUnRIgZZ6hqcgI087tTwvXGIW6x3kahql8VT1KYCk9YXoCjC0/l0D+Pzf5PGRTuOkMMtgtp4zVMO1z+2RuQUNoXeSUo6hchLaXQq2M8tPP22zwJXC0T1K9N8q2ElfeOLLPfJTw/QVjUMh4pmEhCqaJ4EQ/IJj9mWJPg5VqcQ6h0g0akBC3qgJlgwxf4VcTaIMDqqZyDSYEVRXBvLS8cQqAjGAa93VsUfc6+UYRcg//ZietVw3OknU8nTiH4ZVO6iaQAZZrdY9XyHk3u2DT6XPpgPdqbt6cygm9u1IFCjBLe2CSj3ir7Oq/r1TCIJeHqr4Q73Ghm9gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sXsWs/NILqtvJmeQDIZn/NpG5VHTbcjJu0sEZpembgI=; b=VUzpx3IeGNP0p4QXurzPdnocnDCVnIx60NKJ4PqW3DxkBUMI86WU/8eftFASKAe+K8on1b9QLAdDhVa2I+rGtkgNuYRg4QJNndxEJH7hjbM32l9fMc+b8W+8NXzjJ3XVWNhfS8gAkWqfviHAXQ30NT/q1HgUJExnvxemmoip4YuPxM0OeYqZ9N5L45GssQvzY1l44HlxafpiLnp0gSCwMv0pLZbvojuUyB3Mmi0YtcXQ+v8sL3Zvk5QydZSlmOOQrthKhDJ9I8sjGsZ2OBbuH8qGkO75LQu1XhJcJQnOS/Kp/T60uT3Klm9PLUO+AfkKD0vf+Ar7Pd24IeGHcl5Xww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sXsWs/NILqtvJmeQDIZn/NpG5VHTbcjJu0sEZpembgI=; b=UD23pRoAE0HWaYJC61dyLMk0qp8nFHo7dK7Lr1kGDt2Us1W/dQ3f5ByBccqcjW7Ussb1SpBj80A41U0U6eA5PhFwtaQWA3BzV1RNqPZuoPFS33JQmqnFWFR6nBPrk93I4JEGoJqOjU4zcHG8J0QyVRC1iqEJpouxyOYWlVyStMI= Received: from MWHPR02CA0002.namprd02.prod.outlook.com (2603:10b6:300:4b::12) by CH2PR02MB6630.namprd02.prod.outlook.com (2603:10b6:610:7d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Mon, 17 Feb 2020 12:33:38 +0000 Received: from BL2NAM02FT011.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by MWHPR02CA0002.outlook.office365.com (2603:10b6:300:4b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:37 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT011.mail.protection.outlook.com (10.152.77.5) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:37 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fai-0000Sb-So; Mon, 17 Feb 2020 04:33:36 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1j3fad-0001wt-Pi; Mon, 17 Feb 2020 04:33:31 -0800 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01HCXMmi025858; Mon, 17 Feb 2020 04:33:22 -0800 Received: from [10.140.6.6] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j3faT-0001uE-Jk; Mon, 17 Feb 2020 04:33:22 -0800 From: Srinivas Neeli To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com Subject: [PATCH V3 2/7] dt-bindings: gpio: Add binding for Versal gpio Date: Mon, 17 Feb 2020 18:03:08 +0530 Message-Id: <1581942793-19468-3-git-send-email-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> References: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39850400004)(136003)(396003)(376002)(346002)(199004)(189003)(478600001)(356004)(6666004)(9786002)(70206006)(70586007)(36756003)(107886003)(81156014)(6636002)(7696005)(186003)(8676002)(2906002)(8936002)(81166006)(26005)(4326008)(44832011)(5660300002)(2616005)(426003)(316002)(336012); DIR:OUT; SFP:1101; SCL:1; SRVR:CH2PR02MB6630; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 532a7220-436a-4af3-e861-08d7b3a59cb1 X-MS-TrafficTypeDiagnostic: CH2PR02MB6630: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 0316567485 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XPJ5dHIKIcBg/axtzFUm97qUKJyemTTozUdYwnDM9phXPRpIOcfJP98qThrysH2z3TsA3HjHTWIVmT29yhx1YbPTiVGLW4otFrJ/flCJKDVmJTLTXIY+S8Iiasn7p6HKwmIcSyjGvPhUN9BB2iDtMpZrXAS3onWHZkziwgI57ARuXnBUEVyVQgyfYlxM0KwOJjI18pp4oOzU6D3KUd5Fq4t2QTZVAFNIkVs/UuUUIsW8f2Y8FnGCt1IspAWU8ulUj6uOlFeipQWUHPKiM5QNNvqM+201kkPTT01HRhnLGFyU0YjUSrW+BBRSLNiF4wCqCDaYXb60bdu0wvs90QRw9SN425jjQq7md07as7C3zfJeQMkOzUo/aL5cZCqeTJrpCRp33atMwZOvwP8bSz64buf+fxDjf5xW9XNtko7xDVEIssFTOLSFQ1lrROfDY6Dq X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 12:33:37.4363 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 532a7220-436a-4af3-e861-08d7b3a59cb1 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR02MB6630 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_043342_641083_AD2C92C3 X-CRM114-Status: GOOD ( 10.41 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Shubhrajyoti Datta Add binding for Versal binding. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- Documentation/devicetree/bindings/gpio/gpio-zynq.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt index 4fa4eb5507cd..4806d846c0fc 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt @@ -6,7 +6,8 @@ Required properties: - First cell is the GPIO line number - Second cell is used to specify optional parameters (unused) -- compatible : Should be "xlnx,zynq-gpio-1.0" or "xlnx,zynqmp-gpio-1.0" +- compatible : Should be "xlnx,zynq-gpio-1.0" or + "xlnx,zynqmp-gpio-1.0" or "xlnx,versal-gpio-1.0 - clocks : Clock specifier (see clock bindings for details) - gpio-controller : Marks the device node as a GPIO controller. - interrupts : Interrupt specifier (see interrupt bindings for From patchwork Mon Feb 17 12:33:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 11386243 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3EBD138D for ; Mon, 17 Feb 2020 12:34:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0F302072C for ; Mon, 17 Feb 2020 12:34:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n7K/XwkH"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="OXiPw0Gq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0F302072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=5dRW9FGUUMIAu2+GPZItkMVRSUh8rZJ3n3OdfF0k56M=; b=n7K/XwkH+q/uhC 3pPYLaekd2oGJQMjl2MkSpPY1Cx4nzr8o3KcExZYJfaiA/12Kiq8eewa+zK53A8LEEw58onMVj62/ QUhlsZadiY7jtZQLBoNgQyNEPlt3VOJM5I2ocUnlyp04gdnEgx5qmHsta8x2TfLu5e+0iL/GqHo4T iXeAqR+mpDG0jkuF70uexG8ThOhVWnbEP8uIvoyeeeQMHhlxE1xy73tqwZB3ny75fBdV2YVCVz0PP 7z2Bjx6ASmO7nwor0aUHhKOUayIZgiSU61sxLzBX8oM0KLvzOY7UaKHs9M8yAp5wxfJyJnTjr//PV wqFH2JUcz2NY7gzUesJA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fbE-0000r8-IV; Mon, 17 Feb 2020 12:34:08 +0000 Received: from mail-bn8nam11on2067.outbound.protection.outlook.com ([40.107.236.67] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fam-0000RO-MI for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 12:33:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bfb+JRitMA3K6kbEMg3EcM0+Up1JfxSoIKdGhqYBL2g0ToTbJ+b4/IHqmJl8Rj5PBeRCWWi1m2Ssd/MeqVj6qvCSJq5f3Ck80FXJi/aSnfp1I0HPX8c/eYlLcnWCskeOYlhZPwKvu3yjz+w6F682c12DfY+GCsOLL0oU8uaf2yUzR3PeMx1LfYT4bG8Vjc/7vOoZ6hi0UpkNNjDNvhZ8S/g9iYT7/kCPbOwNSHbD/t65j4RW3/Mi+kf7nULbhC0m6jl23vf/g6T1WcW/qjvAiFNPEQi25t2tCRt85VhLl38vqupY2tbWXV3XdkmLcl1bxzGVsD6hkyS/u9OiAWlz1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GklJFrMzQVMm4jnGo6isE2E2T26F0WppHCWthHoA48Y=; b=P4AOiPQwRmftUWTu0x7jQ7GOvt56gMQLNJLM6QuYglM4ak4obYYOMjFRjnWk+8MpOnXP4ftpHh7T9epwIfcBHw5N2iGAAylOMk4TQJVM4dfAnws2pQN5CgMy8wgj42xasA4RH8QSRu+G4LadFHo8uVvEs8dkjedtPs62Ack6oK15ObUnKwyQb4db1H7GrYgYsg76RN1ERPU3nOsxLujERM2iuqsUIl9Jx6ljAwrThL5RKOZE95h4yYPF9IVoVsLMo+G3PAE9JB86DhridzN1AMJ8yO2K1vGz6whD1H0QHlNkPsmPd3a2H6OG5uh3KoPzH+UL+qKusUdVXcwnOmhqbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GklJFrMzQVMm4jnGo6isE2E2T26F0WppHCWthHoA48Y=; b=OXiPw0GqvILGdr65Us8u4EqQomB30Q3jS/5t4DuiFD/ILBCoisPUBZ/ol0IMcARqCQoesszamQtvOX4aUZlAMiqfojDgrHDLabb3jvQxZQVwA+85/zKCT80iQIQO70V67mDJLgS1FeT0GcRy8cXzdVKxJyVJTpwLZakp+i3iYBo= Received: from SN4PR0201CA0018.namprd02.prod.outlook.com (2603:10b6:803:2b::28) by BN6PR02MB2737.namprd02.prod.outlook.com (2603:10b6:404:fd::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Mon, 17 Feb 2020 12:33:37 +0000 Received: from CY1NAM02FT036.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::207) by SN4PR0201CA0018.outlook.office365.com (2603:10b6:803:2b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.27 via Frontend Transport; Mon, 17 Feb 2020 12:33:37 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT036.mail.protection.outlook.com (10.152.75.124) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:37 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fai-0000Sc-UL; Mon, 17 Feb 2020 04:33:36 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1j3fad-0001wt-RB; Mon, 17 Feb 2020 04:33:31 -0800 Received: from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01HCXOlR025870; Mon, 17 Feb 2020 04:33:24 -0800 Received: from [10.140.6.6] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j3faW-0001uE-5v; Mon, 17 Feb 2020 04:33:24 -0800 From: Srinivas Neeli To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com Subject: [PATCH V3 3/7] devicetree-binding: Add pmc gpio node Date: Mon, 17 Feb 2020 18:03:09 +0530 Message-Id: <1581942793-19468-4-git-send-email-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> References: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(346002)(376002)(39860400002)(199004)(189003)(6666004)(426003)(356004)(336012)(9786002)(70206006)(70586007)(5660300002)(316002)(186003)(81166006)(81156014)(8676002)(8936002)(4744005)(2616005)(26005)(107886003)(7696005)(4326008)(36756003)(478600001)(44832011)(6636002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR02MB2737; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f71f82ac-8855-4f20-cee3-08d7b3a59c9f X-MS-TrafficTypeDiagnostic: BN6PR02MB2737: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 0316567485 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n1ZmHC7ZTHJHuslVd62kWqsqH1OaaDM/OUvRBDwJ+FxpUsLsnmPFEMxsKBfigOu1xe2lY3IanI6BpY1vyfkD6Tcqu48IRRdFykyPeqR/mqX4331KWrB1qab8aLtlZ1GKSXQCJYg/AyfoF4SAxjFlIsxgLE1V3SUmEIGlMUH3PzibvIzs6S6v8PwCc2pml6eIS2STfRYkJda5XQherNJeNj9v7yImnlFGOyrBt1VrFSinmh6ETRCuXKwPPK4xpbOXsST+7gyk9aTWzSfOY7imqjoRSkHxgd0J739ZivFfBdNwhMdp7Xqn4O4bwjH6QSbubO+Jy4YrIjf77CCnlIQlrauR3UdstSAZL1bG9UMWemXEp+4M8F35EbeDbwV5ifJvtrSxWqiElTZKdY71KtiX8JnbrPNaOJTVj5s+GcN7R4UwaWVLzoZq+p1CovY1F7vI X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 12:33:37.3608 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f71f82ac-8855-4f20-cee3-08d7b3a59c9f X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB2737 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_043340_772069_8DCAC114 X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.236.67 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Shubhrajyoti Datta Add the pmc gpio node to the device tree. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- Documentation/devicetree/bindings/gpio/gpio-zynq.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt index 4806d846c0fc..f693e82b4c0f 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt @@ -8,6 +8,7 @@ Required properties: parameters (unused) - compatible : Should be "xlnx,zynq-gpio-1.0" or "xlnx,zynqmp-gpio-1.0" or "xlnx,versal-gpio-1.0 + or "xlnx,pmc-gpio-1.0 - clocks : Clock specifier (see clock bindings for details) - gpio-controller : Marks the device node as a GPIO controller. - interrupts : Interrupt specifier (see interrupt bindings for From patchwork Mon Feb 17 12:33:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 11386249 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19236138D for ; Mon, 17 Feb 2020 12:35:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B63EB20718 for ; Mon, 17 Feb 2020 12:35:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M9PjuWcb"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="ABX6vdfL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B63EB20718 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Lo9JdA+o71Xyn3L7Zoj6J4YEzmgIke8Vqq23SII+66c=; b=M9PjuWcbIOCSyE cEY8iOtjtgzhfH/sewRhAJBClsahIhS7uHRDHC+9dDNaIjsDOD3wCr7VkWDNP1qH0DIfxq3S7Ay6r L8O0skjeyx0urhjy6eyZ1rzyw9xHLGklOKle/iqJ/Q7yx/0oMw7htGJAkiZD8bvpuiHQ2/zqQaF37 KoVmDyjBtAmh/G7hJ5ZanmL4xZGYPQ0HxzSp/FBAg01cemEmZElsjQEnwtj2VLgv9zrYJYdMGaTJg P7EJhFiayvSaIITSDOFvVXNZqM5xRMBF7JlCE3z9kMaRnl1HE3UWMY8vaZRG/YaAmffIGhd+Zyww2 wzMNGSI3EUJVUHH/1xGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fbx-0001ZN-T6; Mon, 17 Feb 2020 12:34:53 +0000 Received: from mail-bn8nam11on2065.outbound.protection.outlook.com ([40.107.236.65] helo=NAM11-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fat-0000YK-AS for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 12:33:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfvBmCdeGnTGRElkIicU7yzcEVdLv9OBYhU7NTgxQfzB+M4PvhIFiC9K+vVrb6sFE237iCBFEsKw5i+nKiVnTYYA9p9Amp4sbOGp5FOTOx6EYxyyobeSj8BbzDgCEpbbzp+iv287kSHm8SU5eRPt6dY7VY/3QE8JWrUNOyup4Bl9Z9oDKAQFmfU3XE+J7ZzA0HGrk1vlO9gGwGw4vvTMMy9PMghAy8fEVID6n0WMJ8Dwz6R2b+EMMx8b1gFuFcfqYQZBcHzK2or188kPt7v2DbHHJ9Hq8j0HSdOvDqnIUIk7EXb5l/NWeWn5VrXzNHlF9/hfZNQZ6wNTVPSJLvF1eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aSLIql5MoG4i9i/mKSl1vgGEGnbfGf/ctqtXPBP8pkQ=; b=fjI7U6I7pkuQ6nj7IIcW5PRS7zZtgCuXA07kNiSBj/H43ux/zjJyBSYlkRIhJ66wZawaOZHgpW66+ZBUR6nypywV83tY/dBdYnYJf0a2RNM+fpQQf6b1dsSlNNPQpu7rdSL8a9M94zyB6WO+2VEGzSdh0e5sCVKATzD9myoH+hTAgAkrDBpki135XH5JVOqmpCqAvXptfCl4ty0gOnfQBWMQbzQkvlaR9ahhWDq2qQUDG8jx4OtqATyNGx6ghzdorIqZHcno6RKKd8+Hist1D5b+//XwAdJL1kgLx+6O5Z4lgufCkItyCpQBe/KZzgUT+pcpxze+yTTa0SeSBGYRDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aSLIql5MoG4i9i/mKSl1vgGEGnbfGf/ctqtXPBP8pkQ=; b=ABX6vdfLG5ekqxhvCqETEwrfB9AiWj9pRD0sQnihsjU4aimNna3oGll/QRlrg6XrLqXqtIPX3n1SWo5aVUy9XkLvNDisTaXm76q5KSffSoOkEfWGVaCidOEYtymirnglmhOLm70EmQmLoDFNHIM6NKQGfsXMSjUul/y91GgqpIk= Received: from DM6PR02CA0102.namprd02.prod.outlook.com (2603:10b6:5:1f4::43) by MWHPR0201MB3547.namprd02.prod.outlook.com (2603:10b6:301:7b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Mon, 17 Feb 2020 12:33:38 +0000 Received: from BL2NAM02FT056.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by DM6PR02CA0102.outlook.office365.com (2603:10b6:5:1f4::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.23 via Frontend Transport; Mon, 17 Feb 2020 12:33:38 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT056.mail.protection.outlook.com (10.152.77.221) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:37 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j3faj-0000Se-2L; Mon, 17 Feb 2020 04:33:37 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1j3fad-0001wt-VW; Mon, 17 Feb 2020 04:33:32 -0800 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01HCXRLD025885; Mon, 17 Feb 2020 04:33:27 -0800 Received: from [10.140.6.6] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j3faY-0001uE-OO; Mon, 17 Feb 2020 04:33:27 -0800 From: Srinivas Neeli To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com Subject: [PATCH V3 4/7] gpio: zynq: Add Versal support Date: Mon, 17 Feb 2020 18:03:10 +0530 Message-Id: <1581942793-19468-5-git-send-email-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> References: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(39860400002)(136003)(199004)(189003)(8676002)(8936002)(107886003)(70206006)(4326008)(356004)(186003)(2616005)(81156014)(26005)(81166006)(5660300002)(426003)(336012)(70586007)(6666004)(44832011)(316002)(9786002)(36756003)(6636002)(966005)(7696005)(2906002)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR0201MB3547; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46fe1f2f-80c4-43c5-516e-08d7b3a59cd8 X-MS-TrafficTypeDiagnostic: MWHPR0201MB3547: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 0316567485 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TjgySyqasbVQY7sr33T1GTOh1PPsUw16974NYXgHysX9/2fIaD8AG4aWwlG6IouV2yXzplzXNdiNW/SEoCKZlNdD0riRA6gx7GZqOL8p3bbtouz8Erhw3YRqmnxw5NpA6E1L2w8v3D7sH2D/NcCX1BODfd3OWBoJFRLK8LQWXl80yW8mQSc/80QkhfW2yNRGkWDMKBPysPZB2HmZR0RLWP95NkLnxcsLEOrhq2XqFc086RWYB4VwPV7C85Lqgs6a6UVy/NAz8p0J7vJFQCk9fl7YgJZwnS8qRFnqhbXaTwTV5gge6W1z3Pk6TztqnXlOtZ8/06RE8xF4GIuOmhIGamp11gIbFoNKq5vWxMTIVCs+Nd4B/AKGOgIMVHenADBF8DrAJuJs36k4jTRhmJWxCZ/MT3TKcaWKJB9fmLC8drMgyjbFxO+oEin7U+9NPChiAW7uncWI4aXiuhwjNneIog/T5JHyPiHIpFl2/9kbL5zEN9Fk3gPWMsHvgJPbloVCvmWZEXxN49ZsX2QjB5PQ+g== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 12:33:37.6223 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46fe1f2f-80c4-43c5-516e-08d7b3a59cd8 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0201MB3547 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_043347_388542_E3F82366 X-CRM114-Status: GOOD ( 15.33 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.236.65 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Shubhrajyoti Datta Add Versal support in gpio. Only bank 0 and 3 are connected to the Multiplexed Input output pins. Bank 0 to mio and bank3 to fabric Multiplexed input output pins. Versal devices are the industry's first adaptive compute acceleration platforms. https://www.xilinx.com/support/documentation/data_sheets/ds950-versal-overview.pdf On the Versal platform, we are using two customized GPIO controllers(IP) which were used in Zynq/ZynqMp platform. One of them present in the Platform Management Controller(PMC) block and other in Processing System(PS) block. In PMC_GPIO only Bank0,1,3 & 4 are enabled and in PS_GPIO only Bank 0 & 3 are enabled. You can find more details of GPIO IP in ZynqMP TRM General Purpose I/O(Chapter-27). https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- drivers/gpio/gpio-zynq.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index fb93b35ab19e..9ac69144a0eb 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -22,6 +22,8 @@ /* Maximum banks */ #define ZYNQ_GPIO_MAX_BANK 4 #define ZYNQMP_GPIO_MAX_BANK 6 +#define VERSAL_GPIO_MAX_BANK 4 +#define VERSAL_UNUSED_BANKS 2 #define ZYNQ_GPIO_BANK0_NGPIO 32 #define ZYNQ_GPIO_BANK1_NGPIO 22 @@ -96,6 +98,7 @@ /* set to differentiate zynq from zynqmp, 0=zynqmp, 1=zynq */ #define ZYNQ_GPIO_QUIRK_IS_ZYNQ BIT(0) #define GPIO_QUIRK_DATA_RO_BUG BIT(1) +#define GPIO_QUIRK_VERSAL BIT(2) struct gpio_regs { u32 datamsw[ZYNQMP_GPIO_MAX_BANK]; @@ -199,6 +202,8 @@ static inline void zynq_gpio_get_bank_pin(unsigned int pin_num, gpio->p_data->bank_min[bank]; return; } + if (gpio->p_data->quirks & GPIO_QUIRK_VERSAL) + bank = bank + VERSAL_UNUSED_BANKS; } /* default */ @@ -656,6 +661,8 @@ static void zynq_gpio_irqhandler(struct irq_desc *desc) int_enb = readl_relaxed(gpio->base_addr + ZYNQ_GPIO_INTMASK_OFFSET(bank_num)); zynq_gpio_handle_bank_irq(gpio, bank_num, int_sts & ~int_enb); + if (gpio->p_data->quirks & GPIO_QUIRK_VERSAL) + bank_num = bank_num + VERSAL_UNUSED_BANKS; } chained_irq_exit(irqchip, desc); @@ -685,6 +692,8 @@ static void zynq_gpio_save_context(struct zynq_gpio *gpio) gpio->context.int_any[bank_num] = readl_relaxed(gpio->base_addr + ZYNQ_GPIO_INTANY_OFFSET(bank_num)); + if (gpio->p_data->quirks & GPIO_QUIRK_VERSAL) + bank_num = bank_num + VERSAL_UNUSED_BANKS; } } @@ -716,6 +725,8 @@ static void zynq_gpio_restore_context(struct zynq_gpio *gpio) writel_relaxed(~(gpio->context.int_en[bank_num]), gpio->base_addr + ZYNQ_GPIO_INTEN_OFFSET(bank_num)); + if (gpio->p_data->quirks & GPIO_QUIRK_VERSAL) + bank_num = bank_num + VERSAL_UNUSED_BANKS; } } @@ -787,6 +798,17 @@ static const struct dev_pm_ops zynq_gpio_dev_pm_ops = { zynq_gpio_runtime_resume, NULL) }; +static const struct zynq_platform_data versal_gpio_def = { + .label = "versal_gpio", + .quirks = GPIO_QUIRK_VERSAL, + .ngpio = 58, + .max_bank = VERSAL_GPIO_MAX_BANK, + .bank_min[0] = 0, + .bank_max[0] = 25, /* 0 to 25 are connected to MIOs (26 pins) */ + .bank_min[3] = 26, + .bank_max[3] = 57, /* Bank 3 is connected to FMIOs (32 pins) */ +}; + static const struct zynq_platform_data zynqmp_gpio_def = { .label = "zynqmp_gpio", .quirks = GPIO_QUIRK_DATA_RO_BUG, @@ -824,6 +846,7 @@ static const struct zynq_platform_data zynq_gpio_def = { static const struct of_device_id zynq_gpio_of_match[] = { { .compatible = "xlnx,zynq-gpio-1.0", .data = &zynq_gpio_def }, { .compatible = "xlnx,zynqmp-gpio-1.0", .data = &zynqmp_gpio_def }, + { .compatible = "xlnx,versal-gpio-1.0", .data = &versal_gpio_def }, { /* end of table */ } }; MODULE_DEVICE_TABLE(of, zynq_gpio_of_match); @@ -903,9 +926,12 @@ static int zynq_gpio_probe(struct platform_device *pdev) goto err_pm_dis; /* disable interrupts for all banks */ - for (bank_num = 0; bank_num < gpio->p_data->max_bank; bank_num++) + for (bank_num = 0; bank_num < gpio->p_data->max_bank; bank_num++) { writel_relaxed(ZYNQ_GPIO_IXR_DISABLE_ALL, gpio->base_addr + ZYNQ_GPIO_INTDIS_OFFSET(bank_num)); + if (gpio->p_data->quirks & GPIO_QUIRK_VERSAL) + bank_num = bank_num + VERSAL_UNUSED_BANKS; + } /* Set up the GPIO irqchip */ girq = &chip->irq; From patchwork Mon Feb 17 12:33:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 11386245 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D4C8139A for ; Mon, 17 Feb 2020 12:34:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E01C42072C for ; Mon, 17 Feb 2020 12:34:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Q6z2E3tY"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="W4ihzut7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E01C42072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=74RyBJ+7eWXE68CAMbXQdZb5Ei0knXIhazql12OcjUA=; b=Q6z2E3tYUg7tps X3c/m06Wbyskk7T+VJqq7q6+A3oBjLW71rnek50AnMd6B07oIEGOMsGXtSwFxaiPqEv8qr7t9S5ve Xdkz1+KjVhK0h3jnmt+1q7TU0WfiktwMCGgSzEBu6sS45nIoEKvzKt+ncQ/9PPpQAi8PxbRJf/Kao M4wx3oGaYVwG74NXz1E5XD82LhWFQ6Yn4RXqXcrSQfZ+Zgc5z3ttj45pYVhT3R8F2AzSMbDR7ZyGy gFar4f86xPRijnI30RQXw/8RsA//c8YszlG3TSTTnmSLr7DL5M64BsMWf/SkISC0/LfQ09rzwie96 oLxPDmdjgIpolfiwZ5Aw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fbV-00016h-Lq; Mon, 17 Feb 2020 12:34:25 +0000 Received: from mail-co1nam11on2074.outbound.protection.outlook.com ([40.107.220.74] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fam-0000RK-Mn for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 12:33:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jc25Z8nGY1icHHPzM5pUKERcee766pbqSK3W/G9pCNiZ7M7Dy0agcPE/2Tfpjpc3vfRNATIzUMNXXXWkm9mw1oZtyS37EGp0pqkK+ZcdlpnMTnOikQ8qYi/KTM8QNdkqUPI9HA0qzTDct+CRyEY0rpmyhKqHiU7DaStQJ2rMEOZ4i//SzRQ+xvpwYhCcSDzJlJuC9HU1r3q7ecl2Nx5RPViRwVBuEWNx6CWQ/rVMAl47LlLjWPLiSVeCD0a9aODUDoLj+MMOfmR94eNSPvAuOPLHGuUt1J5I4ses6tqI5lRAAEzzfrY5C6pjPy7w6WNh4BV5FGC7TFCIr5pHuMrKAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IB9uxm7lwYo7dVHyVjIwXxLpQBJ2/CAVJvzzFPwPt4E=; b=MFR9Am6HHO4J0nrC/n/b6eDkeFeqPmZ3/gwiXyLK0A6Xy3LnFt+KP2EUDI4F6vHCN22fjzagS9RGrySu47RbQTJSNxrkcb/Y/7hxZoZxgC5nkmRZ3Px7ca+8aJFyYVw8j3RGshCtnmHriUP6D+Tgf6fDmIkkUJXnsSQSmuwypInMrvFc4RwPkt31p/FXo+olwbGzLP9Nv3gk1NG7T0VaQ/qlGdL1loL+EKxdpzmxgdIJThb2Kl7cq0BPgyq1VzCS4kM4h79Gcwh0e2roo+XF2EzBFwI5nyK1W8LJkqVErjZV6sAEQYRYMrUmHFnmNLSA3Hy40aJNidw8SsOmxwMsxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IB9uxm7lwYo7dVHyVjIwXxLpQBJ2/CAVJvzzFPwPt4E=; b=W4ihzut7YQRd+dVYqpfAMadXOrVtJGtba/NYtAKbfg8DUXRmy7vySxZSMZVqTDkPI2nuKUcWfLdMtdqn8LKjQ60/28aYe1xtxGoBFaOA0WaY+mqEKgarbYmN8E8KNK6QLrTvYJSjqwAEOzX1d7PPDTLFW5XZmHdo9AktKOgqDM4= Received: from CY4PR02CA0040.namprd02.prod.outlook.com (2603:10b6:903:117::26) by BL0PR02MB5618.namprd02.prod.outlook.com (2603:10b6:208:8f::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22; Mon, 17 Feb 2020 12:33:37 +0000 Received: from SN1NAM02FT008.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::200) by CY4PR02CA0040.outlook.office365.com (2603:10b6:903:117::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25 via Frontend Transport; Mon, 17 Feb 2020 12:33:37 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT008.mail.protection.outlook.com (10.152.72.119) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:37 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fai-0000Sd-Vd; Mon, 17 Feb 2020 04:33:36 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1j3fad-0001wt-Sc; Mon, 17 Feb 2020 04:33:31 -0800 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01HCXTxx025919; Mon, 17 Feb 2020 04:33:29 -0800 Received: from [10.140.6.6] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fab-0001uE-9H; Mon, 17 Feb 2020 04:33:29 -0800 From: Srinivas Neeli To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com Subject: [PATCH V3 5/7] gpio: zynq: Disable the irq if it is not a wakeup source Date: Mon, 17 Feb 2020 18:03:11 +0530 Message-Id: <1581942793-19468-6-git-send-email-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> References: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(376002)(346002)(39860400002)(199004)(189003)(8676002)(107886003)(8936002)(70206006)(356004)(4326008)(6666004)(2616005)(81156014)(186003)(26005)(426003)(5660300002)(70586007)(336012)(44832011)(316002)(9786002)(81166006)(36756003)(6636002)(7696005)(478600001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR02MB5618; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8baf3487-500c-4e39-5965-08d7b3a59c9e X-MS-TrafficTypeDiagnostic: BL0PR02MB5618: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-Forefront-PRVS: 0316567485 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zKZZpB1zU2cv3cGc7Tf+YPllxTIBqcdYLG2PCljNQvJ9k6Fe6uaMRJlDWqJZtClpPcpoMequTPpmHDWMZBol9KOJ1JZlldoTZ69GygTANthS71Mpm52PLaZQzdUnbXp837t6aWOXE3+kBiDMUrXhsaRVIKiep4PmrBvZF81fzRmTWnu5vAfYCd78wLFA1dMBinTpH8gPp5gvmziSfF9CTR2bh6Juw2PTz6BtVNvvas1ZliOddqnJNTySxIi92mO7jn1nfX1T/QqTKDTqdruMCVYp3ePV6I8AVZk1PFSFoKSIS3vpZ4mJ4iNqFLqV2+6dW+SQo/HV7P8s/mxolJKfAAxP0v3HpdJDbxTYN2IgQzQJxgNCuBKQIRH6BoUlK8djenqPcTFs3GYfH9FiZ+PjtL+nWyRU2NfEuO/IOCuRPFLAtFzLDVBxrb+BtLT9jSZ+ X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 12:33:37.3692 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8baf3487-500c-4e39-5965-08d7b3a59c9e X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB5618 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_043340_863742_D5F81CFF X-CRM114-Status: GOOD ( 10.45 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.220.74 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Shubhrajyoti Datta If gpio is not set to wake disable the interrupt. ATF set all slaves with enabled interrupts as wakeup sources and if gpio is used in r5 then it wakes up linux. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- drivers/gpio/gpio-zynq.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 9ac69144a0eb..b6261a3aec55 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -735,6 +735,9 @@ static int __maybe_unused zynq_gpio_suspend(struct device *dev) struct zynq_gpio *gpio = dev_get_drvdata(dev); struct irq_data *data = irq_get_irq_data(gpio->irq); + if (!device_may_wakeup(dev)) + disable_irq(gpio->irq); + if (!irqd_is_wakeup_set(data)) { zynq_gpio_save_context(gpio); return pm_runtime_force_suspend(dev); @@ -749,6 +752,9 @@ static int __maybe_unused zynq_gpio_resume(struct device *dev) struct irq_data *data = irq_get_irq_data(gpio->irq); int ret; + if (!device_may_wakeup(dev)) + enable_irq(gpio->irq); + if (!irqd_is_wakeup_set(data)) { ret = pm_runtime_force_resume(dev); zynq_gpio_restore_context(gpio); @@ -956,6 +962,8 @@ static int zynq_gpio_probe(struct platform_device *pdev) goto err_pm_put; } + irq_set_status_flags(gpio->irq, IRQ_DISABLE_UNLAZY); + device_init_wakeup(&pdev->dev, 1); pm_runtime_put(&pdev->dev); return 0; From patchwork Mon Feb 17 12:33:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 11386253 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4740F139A for ; Mon, 17 Feb 2020 12:35:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 246E720718 for ; Mon, 17 Feb 2020 12:35:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GQyknXnE"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="VbUoC4ZP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 246E720718 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=pj6WWJvoLBjx/8DZZ2aUUEjdFfGl1nVuxhCLFVwNYt0=; b=GQyknXnEDXg8Sb xtXW3HeL5NZGm8kQykrmNvoc5gBBj1cRF2BaT8SLBrX71yvvhb5QguG0zq1d/TzGnlLDLUMWVorRf axcnPMdl4S7J6N/KlPX4y41wScFQ7PktyDlc1sVmGXpyem9MJIhWVTaW2KFuDe71yCiQD94mdI05w wVrpIFPiow4yK9psfGu7k8Puh9IlOc36xHLQeyBj0o6cQo0ZfK0vivHqiSRRAVyGDGEdBpgj7tY8a TJG8TKlrzBjclU+lIDwAFKPoEeiHoDFcH2UoYDTaX/9t3OyHq2ImRnICVMo3Ye9reOKvoxDa6OZDG K2S9jPZMbvTDHYLDFBrA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fch-0003Ml-TY; Mon, 17 Feb 2020 12:35:39 +0000 Received: from mail-dm6nam12on2061f.outbound.protection.outlook.com ([2a01:111:f400:fe59::61f] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fbe-0001Dz-Gv for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 12:34:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A0cqnMujP6M7c3CaRhSTDD9TluOBFqDk+SDrGTgK1c1RsVGV6QmRsJTHdDMYVBB+R05d+3WPDeMKmeXTKVGm6AINUng2ftuGAvxDdo5AVT5qtbNJSNBILNLu8DnrpVwnHSBi+fqYypp23E6w9Kxj1iczo/IGT86Tn1oRde6SOhdTetVvBYZSvq3gGPwf4tfw60mXU3Di+LxkbL2pR9uIM9vpC3M+bq8qIw6jN/+ja3rCJ6x7MJA8dAvuTOrQCgMjDv22LUFqa2CywNB7GySNSxDxTIkeH2DwVkWqV0e30kNdNqOuzmxV0nguzQIRwj2awWD8b4nILor6JXna7wiEzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=96lmm/m9X4pYH/c3YVANjdHqmCAjoHOI1sptdry4dEs=; b=O/5NdvtMuoxspc3mgVhMh18Ycq80xw//0DWb4R5zPPeoYeQU4gT6NUswXpaO3WNBNhNjplQqoOzjXoBauZ/ANzDRtD6tYfiyzYcrBJ1f8NN/9ZAZjqz2XWB3th5gpAomdptpPhFj2JgNFNAaNGMhpg/KDBt1yblLPSVDvx5+Q0HUD8mghpFn63WRzj+oJqASNUKalOVpedXqxS3jhwZXLw2cUaJqOIfq4cSlHkIgsvpKX9TXekPfngEKcfqjB3UZjmFcn0+IaInaRlrBJeWDap5U9pAMor730ABEnQb7O08uKhn/i5AqohTGlPMgaZ6/nDNn91MKmSgJVhZ9EyxzsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=96lmm/m9X4pYH/c3YVANjdHqmCAjoHOI1sptdry4dEs=; b=VbUoC4ZPY/Qr7hYbQ9MidJwKEk5MVFAaaK37PbUGNltwE0Pfp/gdgUJIgPALYGl4BM05aeFFuBOpZVDx67QseebLQtIWUKVH7sSINZ+gPffRW5JQClboU7r/kTW0r7HTIIsiIBk6BLrW1HtQgDcxIajowqWPjszA5dmd3zqP1CU= Received: from CY4PR02CA0035.namprd02.prod.outlook.com (2603:10b6:903:117::21) by MN2PR02MB5725.namprd02.prod.outlook.com (2603:10b6:208:11c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Mon, 17 Feb 2020 12:33:54 +0000 Received: from BL2NAM02FT018.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::209) by CY4PR02CA0035.outlook.office365.com (2603:10b6:903:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:48 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT018.mail.protection.outlook.com (10.152.77.170) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:47 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fat-0000TN-9q; Mon, 17 Feb 2020 04:33:47 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1j3fao-0001yh-6e; Mon, 17 Feb 2020 04:33:42 -0800 Received: from xsj-pvapsmtp01 (smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01HCXW0e025992; Mon, 17 Feb 2020 04:33:32 -0800 Received: from [10.140.6.6] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fad-0001uE-QT; Mon, 17 Feb 2020 04:33:32 -0800 From: Srinivas Neeli To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com Subject: [PATCH V3 6/7] gpio: zynq: Add pmc gpio support Date: Mon, 17 Feb 2020 18:03:12 +0530 Message-Id: <1581942793-19468-7-git-send-email-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> References: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(199004)(189003)(2906002)(6666004)(7696005)(356004)(26005)(966005)(336012)(426003)(186003)(498600001)(5660300002)(2616005)(44832011)(70206006)(9786002)(8936002)(70586007)(81166006)(6636002)(81156014)(36756003)(4326008)(8676002)(107886003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR02MB5725; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c085b15-9b81-4f54-1d30-08d7b3a5a2f3 X-MS-TrafficTypeDiagnostic: MN2PR02MB5725: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-Forefront-PRVS: 0316567485 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S3Ncxls5JF6NGv9Wi9lycZBj7Fqicm2XAyCmIMRD5YNtnu+DPAj6AZiXyDtY9vzmdq1RyNweTMw0+MEGnzVN80O8IQdjZ/Qdy4Jw6pxZnuAslPsdm5VpXslNG8mb9LqK6nNHUzFs3/mKLo3iFDWYWYXpx75pInoBW/nVTgZewssDjhRP0IeP7cHAw+4ruHChF86Praqie7Cy5OlhO6qdP18Uf34crtaQbzmZp24IzRc/6q3wP+M0FXY7yJX9qQnHIhWVHmnz1Jz2BuC8a28F7f5I2kkpi3sRxgci8Ts1dx355igv7tOP4CuLiieYyCIHLpfst7Qb1f1/yhvHVCDeEhmjKY8EbrLLVdMpVHZQBM7gwvOyru7BLYt/3mlcJDQynhv4fGS6THTenNcxl+2Vwx4WCftL0Vdlq/msXgxoSjvei6axoiAI2jHh4bv6iuPKAhD/arLTE85mr7LDMj7KWmz+WnE7nR+JcQqTNmxw+XJ08LB7G5Z/ntEQUYz+TDPpQZA6+ZHm7kn2lX2hnFsqJg== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 12:33:47.8640 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9c085b15-9b81-4f54-1d30-08d7b3a5a2f3 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB5725 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_043434_594171_188F9B15 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Shubhrajyoti Datta Add PMC gpio support. Only bank 0,1, 3 and 4 are connected to the multiplexed Input output pins. Bank 0 and 1 to mio and bank 3 and 4 to extended multiplexed input output pins. Versal devices are the industry's first adaptive compute acceleration platforms. https://www.xilinx.com/support/documentation/data_sheets/ds950-versal-overview.pdf On the Versal platform, we are using two customized GPIO controllers(IP) which were used in Zynq/ZynqMp platform. One of them present in the Platform Management Controller(PMC) block and other in Processing System(PS) block. In PMC_GPIO only Bank0,1,3 & 4 are enabled and in PS_GPIO only Bank 0 & 3 are enabled. You can find more details of GPIO IP in ZynqMP TRM General Purpose I/O(Chapter-27). https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- drivers/gpio/gpio-zynq.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index b6261a3aec55..2ddb59b242e7 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -23,6 +23,7 @@ #define ZYNQ_GPIO_MAX_BANK 4 #define ZYNQMP_GPIO_MAX_BANK 6 #define VERSAL_GPIO_MAX_BANK 4 +#define PMC_GPIO_MAX_BANK 5 #define VERSAL_UNUSED_BANKS 2 #define ZYNQ_GPIO_BANK0_NGPIO 32 @@ -815,6 +816,20 @@ static const struct zynq_platform_data versal_gpio_def = { .bank_max[3] = 57, /* Bank 3 is connected to FMIOs (32 pins) */ }; +static const struct zynq_platform_data pmc_gpio_def = { + .label = "pmc_gpio", + .ngpio = 116, + .max_bank = PMC_GPIO_MAX_BANK, + .bank_min[0] = 0, + .bank_max[0] = 25, /* 0 to 25 are connected to MIOs (26 pins) */ + .bank_min[1] = 26, + .bank_max[1] = 51, /* Bank 1 are connected to MIOs (26 pins) */ + .bank_min[3] = 52, + .bank_max[3] = 83, /* Bank 3 is connected to EMIOs (32 pins) */ + .bank_min[4] = 84, + .bank_max[4] = 115, /* Bank 4 is connected to EMIOs (32 pins) */ +}; + static const struct zynq_platform_data zynqmp_gpio_def = { .label = "zynqmp_gpio", .quirks = GPIO_QUIRK_DATA_RO_BUG, @@ -853,6 +868,7 @@ static const struct of_device_id zynq_gpio_of_match[] = { { .compatible = "xlnx,zynq-gpio-1.0", .data = &zynq_gpio_def }, { .compatible = "xlnx,zynqmp-gpio-1.0", .data = &zynqmp_gpio_def }, { .compatible = "xlnx,versal-gpio-1.0", .data = &versal_gpio_def }, + { .compatible = "xlnx,pmc-gpio-1.0", .data = &pmc_gpio_def }, { /* end of table */ } }; MODULE_DEVICE_TABLE(of, zynq_gpio_of_match); From patchwork Mon Feb 17 12:33:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Neeli X-Patchwork-Id: 11386251 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4DCA1892 for ; Mon, 17 Feb 2020 12:35:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A18402072C for ; Mon, 17 Feb 2020 12:35:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tW9tdYcx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="X/d/Cig/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A18402072C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=Db5qwN7fuItQduIemelqH30GoOQlCSvBvlKvtc0VrJY=; b=tW9tdYcxWuZKTk wRlwbUdt8G7JgvBxlxbv4yGSgFN+PggHRqukhJ4kLUGqp2VeTn8cG+78RSwk0QWZAqkXD1kYkcU0O MNtcZZBVITYIO84lN0APnV2fXtJzfB9ak416ozJV1iYZ9eiu/nENxG2OaIEIuW8B+uKEgw9BiwyRD JfxDh2NYkcVwWup7dR+kYKQdClPQuAFYRJzGZ7H6mDxvaXJ37XPF61yVaVuFUYGg80wlZR1Q37+ri aBWnV8T+Zwdmw9S6w9wX8ebVFBmUzJz9nrVbkOm7cU0Gi1YaS6pCF9C37K50cWc7bngdWT6beGM2Y Nlb7m/gH4k3ZwKXKaiqg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fcM-00034i-7p; Mon, 17 Feb 2020 12:35:18 +0000 Received: from mail-dm6nam12on2088.outbound.protection.outlook.com ([40.107.243.88] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j3fay-0000bu-2Y for linux-arm-kernel@lists.infradead.org; Mon, 17 Feb 2020 12:33:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dkuy/dtHcrFSPBkrw3IeUOGdoi58iluiBDt+nR5DkW+P3mmeIq+TBwbgroWpwEJPjwuLxzF6ZG2RycmnDBHFKxbyM3ofQLiq0uYIHeZg3Is/WEIhbAjX7RYNhoKX/HLOQYoA88mXt/eDgX2UJgiQZPtVbEFY0zJax/mczzez6yPV5hhnJZqqmnXpnC5KZ/NwQrdWqDqERC4o32j3sNSH+jcse9+hCy8d+J2kNOED71/u+uzQhBo2qkVItOWrW8LHw7Fqan8/9rFkY2rL08vb/VHr+Dme76vfiMEQsdV38+1acR0PhbFpRQPZEw65Ac56d78cXdBFKZ57IqbHLs4uuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LQz9KqmcLaeruV4C2BriXBrjty1fuGu0xbZU8uSeooM=; b=LLZvhsMHkt7CRVNCjgNymqUjGVwKb5ppDGDAxUCNktoPwZ2NCtUZTHo8VEfs0Vp/DoruF6/wTsSjvP5Z20vG1Zu+kbLkDetFEvfZh1dexSpNNgMg6bV0uryw/Bt2R8oEm98ROVAdBRLe1dQrb1fuxTuDTDEY6LGq1ZuDI3IkB+eHc8Af6o4CLpywtx6lMcYXr2XBNOzXmvGHwbpid/d4af0f/7sR5BJXAdcE7UYFmdKrUw51ARZjuHQPVkb4T5BEFvfZFq7xh7FSnGs7HsZR4Pf6nnry86XLxJEsUAEMjcroVzCKHBu1pQhu14ugJ67ZB1UWrDc5AwFEwAZtg/oHpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LQz9KqmcLaeruV4C2BriXBrjty1fuGu0xbZU8uSeooM=; b=X/d/Cig/nPSkxY2aYl+CWmvHyepvViVPiKwMExAPE3giZ30MYUbLNwEY5fsA+JMcfW1ku05Rh+gdYqNoRbI/dBIcggRrpZsu/rUfoIZG1cyOHEzpEAS/QqEVCoHZpTDqq1F7BNjs3l3LRUyeDz7X+iEt2VuWIbbQmZ75XYTWYL0= Received: from MWHPR02CA0016.namprd02.prod.outlook.com (2603:10b6:300:4b::26) by MN2PR02MB5759.namprd02.prod.outlook.com (2603:10b6:208:10d::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25; Mon, 17 Feb 2020 12:33:48 +0000 Received: from CY1NAM02FT044.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::204) by MWHPR02CA0016.outlook.office365.com (2603:10b6:300:4b::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.25 via Frontend Transport; Mon, 17 Feb 2020 12:33:48 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT044.mail.protection.outlook.com (10.152.75.137) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2729.22 via Frontend Transport; Mon, 17 Feb 2020 12:33:47 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fat-0000TO-BO; Mon, 17 Feb 2020 04:33:47 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1j3fao-0001yh-8B; Mon, 17 Feb 2020 04:33:42 -0800 Received: from xsj-pvapsmtp01 (xsj-mail.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 01HCXYt8026029; Mon, 17 Feb 2020 04:33:35 -0800 Received: from [10.140.6.6] (helo=xhdappanad40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1j3fag-0001uE-BM; Mon, 17 Feb 2020 04:33:34 -0800 From: Srinivas Neeli To: linus.walleij@linaro.org, bgolaszewski@baylibre.com, michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com Subject: [PATCH V3 7/7] gpio: zynq: Remove error prints in EPROBE_DEFER Date: Mon, 17 Feb 2020 18:03:13 +0530 Message-Id: <1581942793-19468-8-git-send-email-srinivas.neeli@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> References: <1581942793-19468-1-git-send-email-srinivas.neeli@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(396003)(39850400004)(136003)(346002)(376002)(189003)(199004)(8676002)(81156014)(81166006)(5660300002)(316002)(26005)(4326008)(70206006)(2906002)(7696005)(478600001)(4744005)(6666004)(356004)(6636002)(9786002)(8936002)(2616005)(336012)(70586007)(36756003)(107886003)(186003)(44832011)(426003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR02MB5759; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05eec5a2-b76a-4353-a5bf-08d7b3a5a2d3 X-MS-TrafficTypeDiagnostic: MN2PR02MB5759: X-Microsoft-Antispam-PRVS: X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:274; X-Forefront-PRVS: 0316567485 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hy+HwPWnTdXm3MOocHnsmkS0AnoIrVl6uo6qLmySxd8HOLQyx30e/0Fk8ugAlITxIxy/nLhBR2QOtby8KWZ7ze8EW80U6Czm4w6kqwZW5Yns8CLmo1i/vT1NjHOBoNa5vFhpc/oLspmCL4TlpcUIofmtANRNV5BOPSzsYG3sYQFyIwqeROvppTRIuML0PuOMJlTNEcfATW/NVoWQe9VhpuYI+APMxmOFrlB1zUWy/iqF2nqvzolLXdBdp4K/OhdeMhPsfq8BG4hj9MqDRnAVhiXBr8OoGJMWIfmOqZR2eUQCxTHGsWxXn1OJUo5fcSvKLz2JWEWAvpskdSStLdlNmb08Vub1OYubKnub1fCG0gObmg0VpTRe4+tyZe1ODHdIHAgGJgrU+eGlFrDeoQWHidmSfMz3Tga95t8fyfakX4tzBICObB1MYuDiM9JfadOL X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2020 12:33:47.7688 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05eec5a2-b76a-4353-a5bf-08d7b3a5a2d3 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB5759 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200217_043352_190092_F7020A64 X-CRM114-Status: GOOD ( 11.12 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.107.243.88 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@xilinx.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Shubhrajyoti Datta In case of probe is deferred do not print the errors. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek --- drivers/gpio/gpio-zynq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 2ddb59b242e7..53d1387592fd 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -930,7 +930,8 @@ static int zynq_gpio_probe(struct platform_device *pdev) /* Retrieve GPIO clock */ gpio->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(gpio->clk)) { - dev_err(&pdev->dev, "input clock not found.\n"); + if (PTR_ERR(gpio->clk) != -EPROBE_DEFER) + dev_err(&pdev->dev, "input clock not found.\n"); return PTR_ERR(gpio->clk); } ret = clk_prepare_enable(gpio->clk);