[{"id":1766103,"web_url":"http://patchwork.ozlabs.org/comment/1766103/","msgid":"<4ca41a0a-5298-c1e2-8324-3792981cfe34@ncentric.com>","list_archive_url":null,"date":"2017-09-11T07:41:43","subject":"Re: [LEDE-DEV] [PATCH] cns3xxx: fix GPIO controller interrupt enable","submitter":{"id":69184,"url":"http://patchwork.ozlabs.org/api/people/69184/","name":"Koen Vandeputte","email":"koen.vandeputte@ncentric.com"},"content":"On 2017-09-08 20:56, Tim Harvey wrote:\n> The cns3xxx interrupt controller uses a single register and as such\n> the 'mask' reg/functions must be used as opposed to the 'enable'/'disable'\n> reg/functions.\n>\n> This fixes an issue that occurs if more than one GPIO on a specific controller\n> (there is GPIOA and GPIOB each having 32 GPIO's) uses interrupts. When one\n> would get enabled all others would be disabled prior to this patch.\n>\n> Signed-off-by: Tim Harvey <tharvey@gateworks.com>\n> ---\n>   target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c | 6 +++---\n>   1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c\n> index 19de24c..bdf930a 100644\n> --- a/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c\n> +++ b/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/gpio.c\n> @@ -273,10 +273,10 @@ void __init cns3xxx_gpio_init(int gpio_base, int ngpio,\n>   \tct = gc->chip_types;\n>   \tct->type = IRQ_TYPE_EDGE_FALLING;\n>   \tct->regs.ack = GPIO_INTERRUPT_CLEAR;\n> -\tct->regs.enable = GPIO_INTERRUPT_ENABLE;\n>   \tct->chip.irq_ack = irq_gc_ack_set_bit;\n> -\tct->chip.irq_enable = irq_gc_unmask_enable_reg;\n> -\tct->chip.irq_disable = irq_gc_mask_disable_reg;\n> +\tct->regs.mask = GPIO_INTERRUPT_ENABLE;\n> +\tct->chip.irq_enable = irq_gc_mask_set_bit;\n> +\tct->chip.irq_disable = irq_gc_mask_clr_bit;\n>   \tct->chip.irq_set_type = cns3xxx_gpio_irq_set_type;\n>   \tct->handler = handle_edge_irq;\n>   \n\n\nAcked-by: Koen Vandeputte <koen.vandeputte@ncentric.com>","headers":{"Return-Path":"<lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"IjqR5amv\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"WQKtROFY\"; \n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ncentric.com header.i=@ncentric.com\n\theader.b=\"MC1pB1WK\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrKg00DxJz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 17:43:40 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drJNI-0005ik-32; Mon, 11 Sep 2017 07:43:20 +0000","from merlin.infradead.org ([2001:8b0:10b:1231::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drJNE-0005hj-VV\n\tfor lede-dev@bombadil.infradead.org; Mon, 11 Sep 2017 07:43:17 +0000","from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e])\n\tby merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drJNB-0000OU-Uk\n\tfor lede-dev@lists.infradead.org; Mon, 11 Sep 2017 07:43:14 +0000","by mail-wm0-x22e.google.com with SMTP id i189so32628271wmf.1\n\tfor <lede-dev@lists.infradead.org>;\n\tMon, 11 Sep 2017 00:42:47 -0700 (PDT)","from [192.168.3.153] (d515300d8.static.telenet.be. [81.83.0.216])\n\tby smtp.gmail.com with ESMTPSA id\n\ta10sm744802eda.37.2017.09.11.00.41.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 11 Sep 2017 00:41:44 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:Date:Message-ID:\n\tFrom:References:To:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=DqYuLrJFN39Xh8HIxgW+IYk8PdjBXA8vwQan84OULnY=;\n\tb=IjqR5amvxQ541izrsOJ5Mu+fQ\n\tBaaNDWKusU2ZOicjfPYudmHGnwDfPMfXaTo2Qx3dhiTLhCVZqYNk7utXfUrmwu6aYuAP7cJOqP9ig\n\thg5QR3jiEkOWW4kWdR+CCj7hb2lZPaJJNTzx58h08y+xOqLtYasVuetIe5Ketr65QyV8nBqg7vUP1\n\tGWL4DsDXx2RymUuIo5cmDLSz1EhyAkPNToRI6zliqLbQb4h4X/2fHHE5aKJGPZHU2v+nY4uQ2O+8l\n\tDw3dpr0EL1aIH2azFuKbjicu5OQUgiwoaBc3AqQEiQc2cJ29/1VcnkgROnbqHTTUCUzqzWLbQWiPL\n\tVtnKBtv6g==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=merlin.20170209;\n\th=Content-Transfer-Encoding:Content-Type:\n\tIn-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:\n\tReply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:\n\tList-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=0wVBKm25hIHLqCByIUCrWV9K1nRzdiskCa3mtkvQIHg=;\n\tb=WQKtROFYRHacWHyPGvasOKOodT\n\tw9XT3DWosUH3Ch77XQl3S+k2EbAX8ugPfTIvS8Pvg5eOZ5g1XF8QVqo3st7drPd/9FbrCb5OdnGkG\n\tb0iTijwfwKTfDnrEz7PKwmWf9jHJQK1QxeveprZEQx8FeP+Zeyg2x7HC6xltkEy5OoQfIjVyPfORb\n\tRJGK6fSQCpNdswoDG27t3xi/+//ae1PEpUkIXv1GLihYi0WjqyS+11oOuiM7nE0qcfnqgoeiXc22C\n\tBpm9bV2ND1DIfTJx9JbbWoDWOlw0hESVWoRDybEI4fnBIlBr5j2hZ7zTXzLgAZCxWv0apK6rRzD4q\n\tJy0Wk1gA==;","v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncentric.com;\n\ts=google; \n\th=subject:to:references:from:message-id:date:user-agent:mime-version\n\t:in-reply-to:content-transfer-encoding:content-language;\n\tbh=0wVBKm25hIHLqCByIUCrWV9K1nRzdiskCa3mtkvQIHg=;\n\tb=MC1pB1WKraMw+DZCI/4TkgHGpwP4dKqWyhNnRIY21uKQkO5CBwsFrHV666XICnBQVL\n\t55hErLVd6vBjSyvc+2tTe1QjAO6HJ5w1zvaGbo4z7CATqFOVXQBo38nWXpEIoQrl6inB\n\tnBeyCnefm34nXGFXUc6JToeGnC0Lem7DZanbY="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding\n\t:content-language;\n\tbh=0wVBKm25hIHLqCByIUCrWV9K1nRzdiskCa3mtkvQIHg=;\n\tb=KlnEHIqTTcsA0H/J5o7uXkcpvHueae2uDBgGVXa3+PRoxpgcycV82J52rxgXGTJ21J\n\tXgmCkSr5899gb7utEhpQsd80/J/w3hlSVWDHORpqgbxxk1j86xw1uopWR+jJf9fF5oqS\n\tkUACYaqNWwWp1FhLKezcZ2NnfIL5mfh+RLBC/YF4vBHkVpoCDNPtAj/cregLmQfam9pl\n\t8SUAWopykezmJGJlMKIlcUpqTsQxRSRT88kiZ5uFH2fLhtKxbNAqmubxiThfllKrFTBy\n\tbqIipvk15tTgdGRF+3yFozqqT+lp3SXo9tDwBz8Xgsgm6H6ncHTfp8kI9LtC1Wmvg9d4\n\t62Jw==","X-Gm-Message-State":"AHPjjUgYaScAx3Hj30cG6Dz22y2+/k/aGeqQTQJ/csmbPxL6ccCiZWuz\n\t92dDL1tgNbD9KrOaax54Mg==","X-Google-Smtp-Source":"ADKCNb4L8RYIOR5fmkGbG/H6h8DzthNCcqS41P3rWqQBFt3ahIxC0Tp+DSnRfFSldWrfDE7jNnIYpQ==","X-Received":"by 10.80.203.204 with SMTP id l12mr8863163edi.122.1505115705342; \n\tMon, 11 Sep 2017 00:41:45 -0700 (PDT)","To":"Tim Harvey <tharvey@gateworks.com>, Felix Fietkau <nbd@nbd.name>,\n\tLuka Perkov <luka@openwrt.org>, lede-dev@lists.infradead.org","References":"<1504897019-9633-1-git-send-email-tharvey@gateworks.com>","From":"Koen Vandeputte <koen.vandeputte@ncentric.com>","Message-ID":"<4ca41a0a-5298-c1e2-8324-3792981cfe34@ncentric.com>","Date":"Mon, 11 Sep 2017 09:41:43 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1504897019-9633-1-git-send-email-tharvey@gateworks.com>","Content-Language":"en-US","X-Spam-Note":"CRM114 invocation failed","X-Spam-Score":"-2.7 (--)","X-Spam-Report":"SpamAssassin version 3.4.1 on merlin.infradead.org summary:\n\tContent analysis details:   (-2.7 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/,\n\tlow\n\ttrust [2a00:1450:400c:c09:0:0:0:22e listed in] [list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]\n\t0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n\tnot necessarily valid\n\t-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature\n\t-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n\tauthor's domain","Subject":"Re: [LEDE-DEV] [PATCH] cns3xxx: fix GPIO controller interrupt enable","X-BeenThere":"lede-dev@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<lede-dev.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/lede-dev/>","List-Post":"<mailto:lede-dev@lists.infradead.org>","List-Help":"<mailto:lede-dev-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/lede-dev>,\n\t<mailto:lede-dev-request@lists.infradead.org?subject=subscribe>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"Lede-dev\" <lede-dev-bounces@lists.infradead.org>","Errors-To":"lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}}]