Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp95035pxx; Wed, 28 Oct 2020 19:28:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxudXsixG54Vu2WfVVgi22K9u9GCVKL+vkBLqgskn4B2KqviYhDZsDF4v4TIAGyqzN9R0HF X-Received: by 2002:a17:906:4e19:: with SMTP id z25mr2106734eju.44.1603938526776; Wed, 28 Oct 2020 19:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603938526; cv=none; d=google.com; s=arc-20160816; b=h4tW+Tdwyat5jJ6lQacaEsg6VbNMK9W2up0/aTa8oBkDIrzcMxeRmhWpRn3TJlLx5b UpirCgH/I5lt307TrnBDVT/e2R9w8Cwzl2Pkb6gKSN/UsXNX6dPF03ivHJmm6tvmpbi9 Wwb+KZKMVU76DMcl5izJmcq+57DmTfcTtjlinE59dzKgN5KIbBWok67lmY63gPF8dc/n G8Q8De97yJ/yPx7FTRgL91deB/NQjMPG4cVrfIqN03MmtoVwGVTgTick4TLTLJSkN6Ta F4+sFXT+J7dRMAUNLFjuAwa+GCZoZDO87x9jjiUJa9qEHvVvPUU6FSJlEiUbCHdJQ1O4 qU+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=bQgHF/iTy51I7H8PnwlHSC3qIqC9fsjdrbzsZxezD0w=; b=HZlb2aPFy/dMOp7MEJz2r6mR8lO89lDbqN2rJvyyqA7EtfwSHEY4ST3SOVHpHVZ6Pl 1xfh1GHxw5VyjPSowrR/svbnSECvwG+MvNYsNGNoqtGyjap2LdfFjdQffILftf80r2Sc YM3OMCM0mVeqKDZ/u1fnTTrKsbxCe8x22qiEc68aOFhVyTudes2gCrSpb1gXXpti1AdH tBCsNZKbd/+U+Sg6Z5v3D2ry2NGT8Cj0E6NadDbHhKh0UttB1kIRBUluGn+YssJMk8Qf jJs3/hD4YLAaaOsRv0ZkqQwzhAsu+gDx2BZehvIUpyNtn5ImrOwqnsTHVGVSUKPlEz2W 1XFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si1017355eds.199.2020.10.28.19.28.07; Wed, 28 Oct 2020 19:28:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726845AbgJ1VhD (ORCPT + 99 others); Wed, 28 Oct 2020 17:37:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726844AbgJ1Vg5 (ORCPT ); Wed, 28 Oct 2020 17:36:57 -0400 Received: from leibniz.telenet-ops.be (leibniz.telenet-ops.be [IPv6:2a02:1800:110:4::f00:d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E463C0613CF for ; Wed, 28 Oct 2020 14:36:57 -0700 (PDT) Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 4CLt714Rl3zN5bM7 for ; Wed, 28 Oct 2020 16:39:57 +0100 (CET) Received: from ramsan.of.borg ([84.195.186.194]) by albert.telenet-ops.be with bizsmtp id lTfw2304W4C55Sk06Tfxz5; Wed, 28 Oct 2020 16:39:57 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kXnYK-000pTp-M8; Wed, 28 Oct 2020 16:39:56 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1kXnYK-007Hp8-6a; Wed, 28 Oct 2020 16:39:56 +0100 From: Geert Uytterhoeven To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Ulrich Hecht , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm Date: Wed, 28 Oct 2020 16:39:55 +0100 Message-Id: <20201028153955.1736767-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Get rid of the separate flag to indicate if the IRLM bit is present in the INTC/Interrupt Control Register 0, by considering -1 an invalid irlm_bit value. Signed-off-by: Geert Uytterhoeven --- Tested on r8a7778/bock-w, r8a7779/marzen, r8a7740/armadillo. and sh73a0/kzm9g. drivers/irqchip/irq-renesas-intc-irqpin.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c index 3819185bfd02c63f..cb7f60b3b4a920c2 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -71,8 +71,7 @@ struct intc_irqpin_priv { }; struct intc_irqpin_config { - unsigned int irlm_bit; - unsigned needs_irlm:1; + int irlm_bit; /* -1 if non-existent */ }; static unsigned long intc_irqpin_read32(void __iomem *iomem) @@ -349,11 +348,10 @@ static const struct irq_domain_ops intc_irqpin_irq_domain_ops = { static const struct intc_irqpin_config intc_irqpin_irlm_r8a777x = { .irlm_bit = 23, /* ICR0.IRLM0 */ - .needs_irlm = 1, }; static const struct intc_irqpin_config intc_irqpin_rmobile = { - .needs_irlm = 0, + .irlm_bit = -1, }; static const struct of_device_id intc_irqpin_dt_ids[] = { @@ -470,7 +468,7 @@ static int intc_irqpin_probe(struct platform_device *pdev) } /* configure "individual IRQ mode" where needed */ - if (config && config->needs_irlm) { + if (config && config->irlm_bit >= 0) { if (io[INTC_IRQPIN_REG_IRLM]) intc_irqpin_read_modify_write(p, INTC_IRQPIN_REG_IRLM, config->irlm_bit, 1, 1); -- 2.25.1