All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] pinctrl: sirf: convert to linear irq domain
Date: Wed, 20 Mar 2013 12:41:12 +0100	[thread overview]
Message-ID: <1363779679-16880-2-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1363779679-16880-1-git-send-email-arnd@arndb.de>

The sirf platforms use no hardcoded IRQ numbers, so there is no reason to
use the legacy domain, and by converting to the linear domain, we get
a more efficient representation of sparse IRQs and remove the dependency
on the mach/irqs.h header file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/pinctrl/pinctrl-sirf.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c
index d02498b..a0bc78b 100644
--- a/drivers/pinctrl/pinctrl-sirf.c
+++ b/drivers/pinctrl/pinctrl-sirf.c
@@ -1485,7 +1485,6 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
 	struct sirfsoc_gpio_bank *bank = irq_get_handler_data(irq);
 	u32 status, ctrl;
 	int idx = 0;
-	unsigned int first_irq;
 	struct irq_chip *chip = irq_get_chip(irq);
 
 	chained_irq_enter(chip, desc);
@@ -1499,8 +1498,6 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
 		return;
 	}
 
-	first_irq = bank->domain->revmap_data.legacy.first_irq;
-
 	while (status) {
 		ctrl = readl(bank->chip.regs + SIRFSOC_GPIO_CTRL(bank->id, idx));
 
@@ -1511,7 +1508,7 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
 		if ((status & 0x1) && (ctrl & SIRFSOC_GPIO_CTL_INTR_EN_MASK)) {
 			pr_debug("%s: gpio id %d idx %d happens\n",
 				__func__, bank->id, idx);
-			generic_handle_irq(first_irq + idx);
+			generic_handle_irq(irq_find_mapping(bank->domain, idx));
 		}
 
 		idx++;
@@ -1770,9 +1767,8 @@ static int sirfsoc_gpio_probe(struct device_node *np)
 			goto out;
 		}
 
-		bank->domain = irq_domain_add_legacy(np, SIRFSOC_GPIO_BANK_SIZE,
-			SIRFSOC_GPIO_IRQ_START + i * SIRFSOC_GPIO_BANK_SIZE, 0,
-			&sirfsoc_gpio_irq_simple_ops, bank);
+		bank->domain = irq_domain_add_linear(np, SIRFSOC_GPIO_BANK_SIZE,
+						&sirfsoc_gpio_irq_simple_ops, bank);
 
 		if (!bank->domain) {
 			pr_err("%s: Failed to create irqdomain\n", np->full_name);
-- 
1.8.1.2

  reply	other threads:[~2013-03-20 11:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 11:41 [PATCH 0/8] SIRF multiplatform support Arnd Bergmann
2013-03-20 11:41 ` Arnd Bergmann [this message]
2013-03-20 14:28   ` [PATCH 1/8] pinctrl: sirf: convert to linear irq domain Barry Song
2013-03-25  9:11   ` Barry Song
2013-03-25  9:33     ` Arnd Bergmann
2013-03-25 10:08       ` Barry Song
2013-03-20 11:41 ` [PATCH 2/8] ARM: sirf: fix prima2 interrupt lookup Arnd Bergmann
2013-03-25  5:44   ` Barry Song
2013-03-20 11:41 ` [PATCH 3/8] ARM: sirf: move irq driver to drivers/irqchip Arnd Bergmann
2013-03-25  9:19   ` Barry Song
2013-03-25  9:41     ` Arnd Bergmann
2013-03-25  9:56       ` Barry Song
2013-03-25 11:13         ` Arnd Bergmann
2013-03-20 11:41 ` [PATCH 4/8] ARM: sirf: enable sparse IRQ Arnd Bergmann
2013-03-25 10:33   ` Barry Song
2013-03-25 10:53     ` Arnd Bergmann
2013-03-20 11:41 ` [PATCH 5/8] ARM: sirf: move debug-macro.S to include/debug/sirf.S Arnd Bergmann
2013-03-25  9:44   ` Barry Song
2013-03-20 11:41 ` [PATCH 6/8] ARM: sirf: use clocksource_of infrastructure Arnd Bergmann
2013-03-25  9:27   ` Barry Song
2013-03-20 11:41 ` [PATCH 7/8] ARM: sirf: enable multiplatform support Arnd Bergmann
2013-03-25 10:22   ` Barry Song
2013-03-25 10:54     ` Arnd Bergmann
2013-03-20 11:41 ` [PATCH 8/8] ARM: sirf: enable support in multi_v7_defconfig Arnd Bergmann
2013-03-25 10:26   ` Barry Song
2013-03-20 12:28 ` [PATCH 0/8] SIRF multiplatform support Arnd Bergmann
2013-03-25 11:33 ` Arnd Bergmann
2013-03-26  6:17   ` Barry Song
2013-03-26 14:31     ` Arnd Bergmann
2013-03-27  1:48       ` Barry Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363779679-16880-2-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.