From patchwork Thu Dec 6 07:31:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10715349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B3B2313AF for ; Thu, 6 Dec 2018 07:32:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EF0C2E75D for ; Thu, 6 Dec 2018 07:32:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9297F2E77C; Thu, 6 Dec 2018 07:32:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9EB572E75D for ; Thu, 6 Dec 2018 07:32:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type: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=7EmOL/IbgOpqAROu92UK9aVbyIlaeFNAJYnGqRw1vIw=; b=hqv3HMiVOYVC+X OuQJD3I5HqM0LViN7M3cfArcoMiBLw5CyCx8t929UkqopstRFbMD7lTJ8cdDyoDqGKrqk6RJ14glN xG8C2O2fiEq0y2tHcCUKKBjUN8IyJpHHmBUWrKIMLcyGCnaUVmuLxQEeUhzJjucl65RgcrzsABgDY Ka98ymVEFmnEYbI/Csj4bru7n+u+j1sS7mx5pCn89DPju0yLnw2dMwFGhprl6OI0xGLmIoLaaGDxA mssm/l2ilMM7CweL7x5bYbdby4kVJ2rAVU7dfH0lrXxm8zEP+9cIJVZ5AEUJGH4/CXEFNFFMvBt8G TOEJVp817ti/yIJtavkg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo8z-0006BA-G6; Thu, 06 Dec 2018 07:32:21 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo8Z-0005cA-Ba for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 07:32:01 +0000 Received: by mail-pg1-x542.google.com with SMTP id t13so10230533pgr.11 for ; Wed, 05 Dec 2018 23:31:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eq5c2aoTlNEBR4vdJDWHcTDFFsOiMSh4dwP893bAFFA=; b=itLsYDixH1lxNOkZCJZU3ssPt76bbfN2Gf9zw/9e5hCowL668OI9eUmNB1IgFaM7hV YFdvv7WqujooxOrUiAT08WsSJl4kjJUm7ddwMpx7vK41IwXKaK70vwo/BQptTNXordMz oSvFfB/1pwRSnFUvLk6PWVrdUXJipOcJ8qILaYaIqZeFyD+0nFsC3P2/IfoJ3O430rkv 0slHeOMlvndyYABf5X8pEbmG9HD7mb280OagMGGqYNsSjh/XfuQU9kpgZNG/Kl8WSjE8 C5ukhJxE1t6ExkFS1LTTrc4n940XysL2t1DD1qMXLfyGGO7lLg9H/PXnVwZHPouAZzMj 9qsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eq5c2aoTlNEBR4vdJDWHcTDFFsOiMSh4dwP893bAFFA=; b=P3aNn19JDZRihU6OGDsL1uT+l3lF6XaWYf5xpQqb7nTVZIXgiBECKk8shYYatS+bGX sLAjVGyWWAFxxcPUhGpNkfjYrd6v1OXGABiOI4bBOYAuYUAdlRUTyaZ+r8qjFdYt+EEJ RhFU2bIjT0Vgg424diZLIemJ61ZWisjDepdZUjq5gHksAK27T8eGnSP5L3AGsGjaXOQr uCapbFB1TmSx567+b9H67fM7xuQt3Grw3UZiUUrR5LccUiMIHP1BYWBPEblWQic/tqtq X4/84wfoqBjHwqt/2FDB2IoCDo1269S7ZOpwDMCc8HAM3gHdJjWRNnPJvJDeMvSR93DK A03w== X-Gm-Message-State: AA+aEWYhJXfzQxMUYTdHiYUmCd7lmZKEq0YG6uuyALILOiqj6omXdFw4 OnSHP2eRk04LUlX9HCVAL+4= X-Google-Smtp-Source: AFSGD/Vk71MzVErNZdxcJxTjtnNjqD0bf7umupJNTUU4aNmsA8EAsnQs0mAlf+qvLO7QVbF8ANsf2A== X-Received: by 2002:a65:57cb:: with SMTP id q11mr23293739pgr.60.1544081504614; Wed, 05 Dec 2018 23:31:44 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o8sm55023141pfa.42.2018.12.05.23.31.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 23:31:43 -0800 (PST) From: Andrey Smirnov To: Marc Zyngier Subject: [PATCH 1/5] irqchip/irq-imx-gpcv2: Remove unused code Date: Wed, 5 Dec 2018 23:31:21 -0800 Message-Id: <20181206073125.7255-2-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181206073125.7255-1-andrew.smirnov@gmail.com> References: <20181206073125.7255-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181205_233155_855873_F1D53D1C X-CRM114-Status: GOOD ( 12.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "A.s. Dong" , Richard Zhu , Jason Cooper , linux-arm-kernel@lists.infradead.org, Andrey Smirnov , linux-kernel@vger.kernel.org, linux-imx@nxp.com, Thomas Gleixner , Leonard Crestez , cphealy@gmail.com, l.stach@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Varaible 'reg' in imx_gpcv2_irq_set_wake() has no users. Remove it. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach --- drivers/irqchip/irq-imx-gpcv2.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index 4760307ab43f..cbed00319315 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -73,11 +73,9 @@ static int imx_gpcv2_irq_set_wake(struct irq_data *d, unsigned int on) struct gpcv2_irqchip_data *cd = d->chip_data; unsigned int idx = d->hwirq / 32; unsigned long flags; - void __iomem *reg; u32 mask, val; raw_spin_lock_irqsave(&cd->rlock, flags); - reg = cd->gpc_base + cd->cpu2wakeup + idx * 4; mask = 1 << d->hwirq % 32; val = cd->wakeup_sources[idx]; From patchwork Thu Dec 6 07:31:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10715351 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2087313AF for ; Thu, 6 Dec 2018 07:32:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BC1E2E75D for ; Thu, 6 Dec 2018 07:32:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F392A2E77C; Thu, 6 Dec 2018 07:32:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 18D152E764 for ; Thu, 6 Dec 2018 07:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type: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=Tt8lbaKXjNZ3QM/TRppGmhI58bh8ujMOX8KvT2n1qNM=; b=PCdwY4TNIgNp2d VH2O4/gNbG5UdsmuHGwBN2arJmuZkIS+8TrpFfKKnD/nvDRQYhKymdBjxY/wyQIqSwa9AH8/LHdWe 2njEwP6K723ZS7BmQGS0FsEGX2XPnOQGjDAdC9+1vWgYv5IbBAoicXpLQw0zUbaOyrF7oaLn9OA6s IbigySPn4HfUrC8JT9cTFBl+ioaEN8BvP8ohxZSiSRFEjRwiYpGjOMo44BOAcp/wbv4bPs4w7yL1a mR/WNLYGl6tPBPA+P5eZxehM0Yc3gH7C7S0HqlPXUD+JXM89LDqkH2FlcUMoNmsoQpYe8dykl14TY KD88DIFLtmqKUQBP9svQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo9F-0006T2-VC; Thu, 06 Dec 2018 07:32:37 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo8b-0005dF-Be for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 07:32:02 +0000 Received: by mail-pf1-x443.google.com with SMTP id u6so11338114pfh.11 for ; Wed, 05 Dec 2018 23:31:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2UAI3OUKoprsOY9OdCB9E22gIwtD9enXDzWD/fAxr8E=; b=kGgvnpJD5ZK67Nrw9ngrxknNuTTD+rwOxBm+CTJ4vmBQ897PoeLijHC7L22hZ1DCTh OFlCryuu3SpzKSJk+BiHLHquV94Auz63D/hN4pq3814QIZABHcp5rmtKEMSHU0GHYcJu FNXeXPV8QjAfVx+82IX8JEtXjrY/61VwZBGSzkSebo6rqSGEuH0AlAFuUczPm6/hg2Ju DF5BRKs1l+lHt9fu46k+onK3noefXuZ4Z8a3JCr2kzDuY5awJWaIYnQ/froXrHWWWYkf f/ejsqzg/zQeJ6PrQBEKXbgmBz39HLeYIb0nZQ/bY3iPioktGV2xjHAz8OztGIFS3dgU vEmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2UAI3OUKoprsOY9OdCB9E22gIwtD9enXDzWD/fAxr8E=; b=D5XnYoxFqLOqAVGtaovC1hTCYTnXPY5ZAryIJyGyaLrNpMuGOh22KNmK1m+ZpKHuzz 2nM52v+qKpHkK+uxTLfHoPemLiLF+my5+HXfE5EuzeISYEDe4WDRNdKjaMKyabQmsXD7 Y2flvnpgPSMqVg7YOwTyxl6rukfLzNMRlHKrumiQJ+tdlMLObTNcmBhDCWMpUe1iaVw8 TqNNuRRtNZYHINoK9xN6pG5WQGrH4d2v+u2ZH/gqzxDuGti7eN4CJYugDIzhzYML2aMJ owuuMy6SJloI+BVlkWzyOjtVKw9gmpuUPGEdOkKKrFu/dorWB+1+mrGfrzpTHa5Flqfw nOww== X-Gm-Message-State: AA+aEWa5pgwSswcZXM/Ls9CJxvhKg9TGKzRzPO+mXlB0iLGN8JT8gVaw 6v1YnECJnorB82ZzQ07EfP8= X-Google-Smtp-Source: AFSGD/VUxg/Qt4R+bt4RCmL2WIGr0OLVj2NYMaKR7gAkMctBajPQDNHXsbzrJ4HblmDzb1xk6ZDmAg== X-Received: by 2002:a63:5c41:: with SMTP id n1mr21009907pgm.1.1544081506464; Wed, 05 Dec 2018 23:31:46 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o8sm55023141pfa.42.2018.12.05.23.31.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 23:31:45 -0800 (PST) From: Andrey Smirnov To: Marc Zyngier Subject: [PATCH 2/5] irqchip/irq-imx-gpcv2: Share reg offset calculation code Date: Wed, 5 Dec 2018 23:31:22 -0800 Message-Id: <20181206073125.7255-3-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181206073125.7255-1-andrew.smirnov@gmail.com> References: <20181206073125.7255-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181205_233157_794449_94E44447 X-CRM114-Status: GOOD ( 15.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "A.s. Dong" , Richard Zhu , Jason Cooper , linux-arm-kernel@lists.infradead.org, Andrey Smirnov , linux-kernel@vger.kernel.org, linux-imx@nxp.com, Thomas Gleixner , Leonard Crestez , cphealy@gmail.com, l.stach@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Move identical offset calculation code into a small helper function and make use of it in the rest of the code. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach --- drivers/irqchip/irq-imx-gpcv2.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index cbed00319315..b262ba8b2652 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -28,6 +28,11 @@ struct gpcv2_irqchip_data { static struct gpcv2_irqchip_data *imx_gpcv2_instance; +static void __iomem *gpcv2_idx_to_reg(struct gpcv2_irqchip_data *cd, int i) +{ + return cd->gpc_base + cd->cpu2wakeup + i * 4; +} + static int gpcv2_wakeup_source_save(void) { struct gpcv2_irqchip_data *cd; @@ -39,7 +44,7 @@ static int gpcv2_wakeup_source_save(void) return 0; for (i = 0; i < IMR_NUM; i++) { - reg = cd->gpc_base + cd->cpu2wakeup + i * 4; + reg = gpcv2_idx_to_reg(cd, i); cd->saved_irq_mask[i] = readl_relaxed(reg); writel_relaxed(cd->wakeup_sources[i], reg); } @@ -50,17 +55,14 @@ static int gpcv2_wakeup_source_save(void) static void gpcv2_wakeup_source_restore(void) { struct gpcv2_irqchip_data *cd; - void __iomem *reg; int i; cd = imx_gpcv2_instance; if (!cd) return; - for (i = 0; i < IMR_NUM; i++) { - reg = cd->gpc_base + cd->cpu2wakeup + i * 4; - writel_relaxed(cd->saved_irq_mask[i], reg); - } + for (i = 0; i < IMR_NUM; i++) + writel_relaxed(cd->saved_irq_mask[i], gpcv2_idx_to_reg(cd, i)); } static struct syscore_ops imx_gpcv2_syscore_ops = { @@ -97,7 +99,7 @@ static void imx_gpcv2_irq_unmask(struct irq_data *d) u32 val; raw_spin_lock(&cd->rlock); - reg = cd->gpc_base + cd->cpu2wakeup + d->hwirq / 32 * 4; + reg = gpcv2_idx_to_reg(cd, d->hwirq / 32); val = readl_relaxed(reg); val &= ~(1 << d->hwirq % 32); writel_relaxed(val, reg); @@ -113,7 +115,7 @@ static void imx_gpcv2_irq_mask(struct irq_data *d) u32 val; raw_spin_lock(&cd->rlock); - reg = cd->gpc_base + cd->cpu2wakeup + d->hwirq / 32 * 4; + reg = gpcv2_idx_to_reg(cd, d->hwirq / 32); val = readl_relaxed(reg); val |= 1 << (d->hwirq % 32); writel_relaxed(val, reg); From patchwork Thu Dec 6 07:31:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10715365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D91514E2 for ; Thu, 6 Dec 2018 07:33:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 586542D2F6 for ; Thu, 6 Dec 2018 07:33:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C7642D31F; Thu, 6 Dec 2018 07:33:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1436C2E057 for ; Thu, 6 Dec 2018 07:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type: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=sI02/tVVN5BhlbV/TOsPXhzwBeeiq8tZ0WZW0TExJhw=; b=qmsz1O7MBkM46H 4O2u+8nMek1zQ5LN30gdMh5UXVt/K9CaHki54+rin36EAyLRVj09aZlU1P3G8yv2a/R5ALhxrm8BH lzIQGx2b5R6yXFO3OERmSWETbniA3CY0hTqMElJZ2HBOAg1JBw9GbNqONUW5oNvIV58gW4kSaDctB sNfxUv24R+OvY/ud3Z3z6lvyIG2dT4jCgoSuJT07uHslwd4wMCg3QaqjSuZBiVjXA8rrhr4ceSOM6 xJTTAh51qno7eWIG5zoQy8zfv/NnmCMx0ZbkUi89I56ozh6g80UL5FvQW2AiGgPOWwQ53qFVNl3nL cgi0+rVbRHypmIzglJjQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUoA0-0007E5-1G; Thu, 06 Dec 2018 07:33:24 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo8d-0005ep-TL for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 07:32:06 +0000 Received: by mail-pl1-x644.google.com with SMTP id u18so11374107plq.7 for ; Wed, 05 Dec 2018 23:31:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nCmWZWkjSO04W3R6eoda+PMgnu8YZorR38g+0MPbFl8=; b=RmedYPKuJlzfD3dyoXNGvWBtT6Y4A8ljx+RuFnHVx2mbo8gp9JKeHVq7bOvMhhCTVS YBq1QAqWfZhsoDTmJJiteOB2kAgRku+AsinQTt++0ffT692exyA7wTuGyBDaPOFVW/J8 qUbym03yFY8fQwIOXmug+Ek4WRfW3uh99lOJ0dP3To0RTiFn97l3IA4uL4NGr6hLCdQo p9YO6CnZe9M4XHlNoAsY//YexPMXjrYhz2fi+nLmxfn+1bRbzIbZk7riPbDRUmzuMSwY yYfS+hYV82VJr+nL00w6RTcIe214GRL1SsD33sZpxEzMNHdwNw8FOFc2P4vXoQ1fsEP5 Zd7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nCmWZWkjSO04W3R6eoda+PMgnu8YZorR38g+0MPbFl8=; b=a6k3jO33Hyus7w/BqhyvsTw7H0ZgUo6PtTiWZtvs8KP6XQ9UA3zFkZ15L3RvuEFmso DMZYB4k4MTk01cCGqUcntl14k5FEVQBuvzdCldmuHXTUDSOlce7batMInbrxka56SE8i jmrgp5poGhmn02tU5f6FyyDCyZOvZv5RSkTzvI3Gg3XpbcseVOp0HEe0GJKWE15d8KbC cEHxnei8QL5L7Uku8Ig+Rh13OTMVeTsObRk9kwo05QBJ9t1Yq1xNNYM1uIDLthgkzN6M WA+jC6OhgET6/mFjlr/wCvtUvA7eKR5YQcRzr6zF9kNx8AhMRieTgNSBNgxjpgaC3TvL 093g== X-Gm-Message-State: AA+aEWZdUH2I5o/s02OUFWWKZwiORAQUVB3dxsKJWZgm2SJn7P1XtRWB ow0KNeu5CSsYu0319idz18o= X-Google-Smtp-Source: AFSGD/WPZiPGuSbiRx1Z/A9FzknRnytfLbknJnMhpsV5bjT90fCq/696T1qgUgdPDqlCKRPkx1CRhA== X-Received: by 2002:a17:902:f082:: with SMTP id go2mr27379293plb.115.1544081508277; Wed, 05 Dec 2018 23:31:48 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o8sm55023141pfa.42.2018.12.05.23.31.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 23:31:47 -0800 (PST) From: Andrey Smirnov To: Marc Zyngier Subject: [PATCH 3/5] irqchip/irq-imx-gpcv2: Make use of BIT() macro Date: Wed, 5 Dec 2018 23:31:23 -0800 Message-Id: <20181206073125.7255-4-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181206073125.7255-1-andrew.smirnov@gmail.com> References: <20181206073125.7255-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181205_233200_368161_3B7DD768 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "A.s. Dong" , Richard Zhu , Jason Cooper , linux-arm-kernel@lists.infradead.org, Andrey Smirnov , linux-kernel@vger.kernel.org, linux-imx@nxp.com, Thomas Gleixner , Leonard Crestez , cphealy@gmail.com, l.stach@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Convert all instances of 1 << x to BIT(x) for consistency with other kernel code. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach --- drivers/irqchip/irq-imx-gpcv2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index b262ba8b2652..077d56b3183a 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -78,7 +78,7 @@ static int imx_gpcv2_irq_set_wake(struct irq_data *d, unsigned int on) u32 mask, val; raw_spin_lock_irqsave(&cd->rlock, flags); - mask = 1 << d->hwirq % 32; + mask = BIT(d->hwirq % 32); val = cd->wakeup_sources[idx]; cd->wakeup_sources[idx] = on ? (val & ~mask) : (val | mask); @@ -101,7 +101,7 @@ static void imx_gpcv2_irq_unmask(struct irq_data *d) raw_spin_lock(&cd->rlock); reg = gpcv2_idx_to_reg(cd, d->hwirq / 32); val = readl_relaxed(reg); - val &= ~(1 << d->hwirq % 32); + val &= ~BIT(d->hwirq % 32); writel_relaxed(val, reg); raw_spin_unlock(&cd->rlock); @@ -117,7 +117,7 @@ static void imx_gpcv2_irq_mask(struct irq_data *d) raw_spin_lock(&cd->rlock); reg = gpcv2_idx_to_reg(cd, d->hwirq / 32); val = readl_relaxed(reg); - val |= 1 << (d->hwirq % 32); + val |= BIT(d->hwirq % 32); writel_relaxed(val, reg); raw_spin_unlock(&cd->rlock); From patchwork Thu Dec 6 07:31:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10715357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48FFB14E2 for ; Thu, 6 Dec 2018 07:33:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32CDD2E789 for ; Thu, 6 Dec 2018 07:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 271F82E79A; Thu, 6 Dec 2018 07:33:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F2E92E792 for ; Thu, 6 Dec 2018 07:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type: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=G2Bnb8ZUrIKsGFmx65gGZPwJNUMbtU9f02npkdI4n/A=; b=DIW/amc4AFop6/ rJKJZmk6KXdlGF9EcHjMXmaGD45DRjk6cMjje3QqEW41zUtUgI7cejjWmdySJQg1EK41HsLnpT5k8 579PoUryIpi2XbqFTTw9Lcrmwtiz982x/dBLHOn97nQI3vDbdhZ8xwq4DsMOX8IMEsrOX9bPTF+DH ZeBzFI5Tg9/F5d/WuhX2ByLVVAawRyMjOkeBY+mYN/sNsuGOqywKgdJBPiHTt8OQSh4GXdNrmghi+ INhWUXQvJvYUcbscfPGkBIzmpBmpHV8TWJyj2+JMfBPAn05SkqGXnIetT/D5MYjS3kfFntKPrPzyj 0Prsa6XkqBNkvTuZGufg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo9k-0006wm-V0; Thu, 06 Dec 2018 07:33:08 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo8f-0005gz-0J for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 07:32:07 +0000 Received: by mail-pf1-x433.google.com with SMTP id b7so11347461pfi.8 for ; Wed, 05 Dec 2018 23:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+/QmRvqqSNqT4d/eAE++l7YofJ1lKOQigAYWENYxaOI=; b=IyNKRWAOr5pKVwfoTxXwpzLr0QwRJE9m2q2Okjf7QAhtCPDe7rf+vHWY0KsWee6qmX UPFvnIfy/9G7oQyLDozZ9SCYvoO9QvrebssBDi+yZX+8kKWjaKJNMQVN6K7qkp6o4ctE XI6o47yWEwaim6rY2w2Nx4O5vQvQngkW6A/jNfwEnDSFkXDLGCDSDAae/oRA63pAU/F2 HaiFthRVORTvkyCn7Mv/RICBXbYbu3JNMtsBqJx9YB/Jlvkt1EJFu/IrWIpPxa9Lzx+H fqiprcSBzO7Qfh+N2zcT9kpEaG1INfvNKNSK6JuPZDjSaZAVBn50FaKUPVZBiXAUkqHQ GzPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+/QmRvqqSNqT4d/eAE++l7YofJ1lKOQigAYWENYxaOI=; b=obGX/Cn3aCEuUOOHtrqW5u/NXz0o3SufagV/a9AV3PMpiLESsn/Y1aKyQzZ+GsvcIP 66lDKJsIhgGNTIrSPp5zcfBccXTsjAKHXrXmLijN0c8ZDmq+qhFYnih/DFBska3QZZv2 d9rz2ttgFAluLm4V0DhtddA1gjxhHoWmgLjHe/j6ud+2k3knuDNdLrP4P+fWF8nijquy qO1AoEo9FCxX7Q1RcxqtGmMuFjmGBCeUQdauzIUT3Y5uqaSbGhzOI90WQ2HAaW82ScAZ lFUZ77HCi8jo7axRpc4trIxy9DR1H8a87pIoTlhXruUd/sN5T78a8Ah5LH26r9jl3VGT XD6w== X-Gm-Message-State: AA+aEWYCYmCzwrM9U4uj80j9VMTuu+E/2LsyR0KdYEd4Vypn9pHDa9P+ 1DJMeDPmgruKKr0xZk3uY2M= X-Google-Smtp-Source: AFSGD/Wa9mdeLmI7KZDw62UJwvBDn8ds+J8+PLv/7me8kzkLfxM4Oci/hajdzDuDlHuQsGYx7Jp98g== X-Received: by 2002:a63:1f4e:: with SMTP id q14mr22251175pgm.88.1544081510018; Wed, 05 Dec 2018 23:31:50 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o8sm55023141pfa.42.2018.12.05.23.31.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 23:31:49 -0800 (PST) From: Andrey Smirnov To: Marc Zyngier Subject: [PATCH 4/5] irqchip/irq-imx-gpcv2: Make error messages more consistent Date: Wed, 5 Dec 2018 23:31:24 -0800 Message-Id: <20181206073125.7255-5-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181206073125.7255-1-andrew.smirnov@gmail.com> References: <20181206073125.7255-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181205_233201_315856_0E80320E X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "A.s. Dong" , Richard Zhu , Jason Cooper , linux-arm-kernel@lists.infradead.org, Andrey Smirnov , linux-kernel@vger.kernel.org, linux-imx@nxp.com, Thomas Gleixner , Leonard Crestez , cphealy@gmail.com, l.stach@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Make error messages more consistent by making sure each starts with "%pOF:". Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach --- drivers/irqchip/irq-imx-gpcv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index 077d56b3183a..c2b2b3128ddd 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -212,7 +212,7 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, cd = kzalloc(sizeof(struct gpcv2_irqchip_data), GFP_KERNEL); if (!cd) { - pr_err("kzalloc failed!\n"); + pr_err("%pOF: kzalloc failed!\n", node); return -ENOMEM; } @@ -220,7 +220,7 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, cd->gpc_base = of_iomap(node, 0); if (!cd->gpc_base) { - pr_err("fsl-gpcv2: unable to map gpc registers\n"); + pr_err("%pOF: unable to map gpc registers\n", node); kfree(cd); return -ENOMEM; } From patchwork Thu Dec 6 07:31:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 10715353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1096313AF for ; Thu, 6 Dec 2018 07:33:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F02602E77C for ; Thu, 6 Dec 2018 07:33:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E422D2E79A; Thu, 6 Dec 2018 07:33:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E54A42E77C for ; Thu, 6 Dec 2018 07:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type: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=c1hwJKrPY7FKnSkn509/zqk5w8u1ya435zjqCf9TCwU=; b=MspQ4xuNCu3jY8 6+slB/ba94BTbjwB9Xx0MmrYd4CyJQ/ehFMc1a1xEKzkG7JC3ijhBWsJdpVWs1ANzOctvIrCb2+mj iQyoKRb3A2F9zecRSIdY9BFr6vr8QJkeYS+/H46bZbXELrpj9LlVM0ZD9vXsFRWqCf3k5PIAWWRJb y4Dbv2TTURoFPK1uWcOim/VSk/iYCoZ9uXmnwkvvMJU/RgkImgpsp7n+90aegsjBu5dGOa5LIdf8F d6e12VMz9Uuzf+kydzB/uO6b2E5WxHv02Pf5f+Rsjj7tp+zSUSCgMNW0JOoMJfYX30/hTU1r1q4tv mTX2B74FRI6HdRsaPBWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo9U-0006gg-BF; Thu, 06 Dec 2018 07:32:52 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUo8d-0005jI-TF for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 07:32:05 +0000 Received: by mail-pl1-x644.google.com with SMTP id t13so11360198ply.13 for ; Wed, 05 Dec 2018 23:31:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/HpNI1L8HsuhwgNUMOu7LqzJncdnpbI+pFBDjt+Ev0s=; b=hArDA7Lm4kGvYD1lDfctSAuJsBAoCVyRWdjxivCcrRBeFC9G/Fv+OH7XVQRwxnUJHe bRBgvL9Er465ru9Z8rEdtKtSspB5u/0VJivkR3IAsjNHagKvfrFt7s+az3MQPqWxKZ8R xs4jQAP2tPx4ciOcIikKXIuBUxgcv0XHUfAn7k18HuEynwESJFx30t9HPmdlIUkUgMCy eyiE2rlVEhiqIzzMeqNqruH5izb4Ix3iGw+ZkttCjlCPhObN9f0VSZv2Q6ungWv5/fm5 ISe47lFiOkGWqRSi2mm3Ro5kNqQvzY6EvKIIF3CCU6kw4Ea3/+GMPx/Cm6x/rLuGSq6Z gRWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/HpNI1L8HsuhwgNUMOu7LqzJncdnpbI+pFBDjt+Ev0s=; b=P6XyGP0QHgQIeMnQnsxS6n3fzXJb9avpUzaUV+ucqkQPbLFdqI9B3n0YzLcbhBeSdg Jo56HfFpLIcp1qVz9Wt6kcOZNu6txwqkxlGenjdZk4jxjisMsggvLFuYohar31YyOSgi PgqoEPMNOr07/8mkyNgGmFb7NG5kNOGkpjcKGXZYRj4N+CCgTe3kNIu0LCmPA3q/PK46 +3/uyZ0D2lM7jXB1PBWANoS07pn3QpOXeyBjIS/B5tXV9P2algl8k+UE6zJa0DK4I0OZ N9mCE/rQl84pKH/oeQnWOx8pSTlXNP9+XG1yeOEmLQzrcTZoQOKZRjnox+5+KN0/b8ke k0Fw== X-Gm-Message-State: AA+aEWbc67/GbJg8GwFskmQQLfOmNlAfLUxqkgD4HTqfoeh7I5SjXJCk XEvGkL2AM3C1KC/9DUbRcIU= X-Google-Smtp-Source: AFSGD/VV6iq1ZcB9YwCOJUFIv/E1CkQz17qBKM6SEi5ohIOv9yca9tM20C7nSbraLkvDQyUC5i7NDA== X-Received: by 2002:a17:902:968d:: with SMTP id n13mr27800208plp.109.1544081512108; Wed, 05 Dec 2018 23:31:52 -0800 (PST) Received: from squirtle.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o8sm55023141pfa.42.2018.12.05.23.31.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 23:31:51 -0800 (PST) From: Andrey Smirnov To: Marc Zyngier Subject: [PATCH 5/5] irqchip/irq-imx-gpcv2: Add support for i.MX8MQ Date: Wed, 5 Dec 2018 23:31:25 -0800 Message-Id: <20181206073125.7255-6-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181206073125.7255-1-andrew.smirnov@gmail.com> References: <20181206073125.7255-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181205_233200_171797_46CEC69C X-CRM114-Status: GOOD ( 17.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "A.s. Dong" , Richard Zhu , Jason Cooper , linux-arm-kernel@lists.infradead.org, Andrey Smirnov , linux-kernel@vger.kernel.org, linux-imx@nxp.com, Thomas Gleixner , Leonard Crestez , cphealy@gmail.com, l.stach@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add code needed to support i.MX8MQ. Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: cphealy@gmail.com Cc: l.stach@pengutronix.de Cc: Leonard Crestez Cc: "A.s. Dong" Cc: Richard Zhu Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach --- drivers/irqchip/irq-imx-gpcv2.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c index c2b2b3128ddd..17a2dad2d4c2 100644 --- a/drivers/irqchip/irq-imx-gpcv2.c +++ b/drivers/irqchip/irq-imx-gpcv2.c @@ -17,6 +17,9 @@ #define GPC_IMR1_CORE0 0x30 #define GPC_IMR1_CORE1 0x40 +#define GPC_IMR1_CORE2 0x1c0 +#define GPC_IMR1_CORE3 0x1d0 + struct gpcv2_irqchip_data { struct raw_spinlock rlock; @@ -192,11 +195,19 @@ static const struct irq_domain_ops gpcv2_irqchip_data_domain_ops = { .free = irq_domain_free_irqs_common, }; +static const struct of_device_id gpcv2_of_match[] = { + { .compatible = "fsl,imx7d-gpc", .data = (const void *) 2 }, + { .compatible = "fsl,imx8mq-gpc", .data = (const void *) 4 }, + { /* END */ } +}; + static int __init imx_gpcv2_irqchip_init(struct device_node *node, struct device_node *parent) { struct irq_domain *parent_domain, *domain; struct gpcv2_irqchip_data *cd; + const struct of_device_id *id; + unsigned long core_num; int i; if (!parent) { @@ -204,6 +215,14 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, return -ENODEV; } + id = of_match_node(gpcv2_of_match, node); + if (!id) { + pr_err("%pOF: unknown compatibility string\n", node); + return -ENODEV; + } + + core_num = (unsigned long)id->data; + parent_domain = irq_find_host(parent); if (!parent_domain) { pr_err("%pOF: unable to get parent domain\n", node); @@ -236,8 +255,16 @@ static int __init imx_gpcv2_irqchip_init(struct device_node *node, /* Initially mask all interrupts */ for (i = 0; i < IMR_NUM; i++) { - writel_relaxed(~0, cd->gpc_base + GPC_IMR1_CORE0 + i * 4); - writel_relaxed(~0, cd->gpc_base + GPC_IMR1_CORE1 + i * 4); + void __iomem *reg = cd->gpc_base + i * 4; + + switch (core_num) { + case 4: + writel_relaxed(~0, reg + GPC_IMR1_CORE2); + writel_relaxed(~0, reg + GPC_IMR1_CORE3); + case 2: /* FALLTHROUGH */ + writel_relaxed(~0, reg + GPC_IMR1_CORE0); + writel_relaxed(~0, reg + GPC_IMR1_CORE1); + } cd->wakeup_sources[i] = ~0; }