From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] pinctrl-sunxi: Fix interrupt register offset calculation
Date: Mon, 17 Feb 2014 22:19:44 +0100 [thread overview]
Message-ID: <1392671984-29872-5-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1392671984-29872-1-git-send-email-hdegoede@redhat.com>
This fixing setting the interrupt type for eints >= 8.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/pinctrl/pinctrl-sunxi.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-sunxi.h b/drivers/pinctrl/pinctrl-sunxi.h
index 01c494f..552b0e9 100644
--- a/drivers/pinctrl/pinctrl-sunxi.h
+++ b/drivers/pinctrl/pinctrl-sunxi.h
@@ -511,7 +511,7 @@ static inline u32 sunxi_pull_offset(u16 pin)
static inline u32 sunxi_irq_cfg_reg(u16 irq)
{
- u8 reg = irq / IRQ_CFG_IRQ_PER_REG;
+ u8 reg = irq / IRQ_CFG_IRQ_PER_REG * 0x04;
return reg + IRQ_CFG_REG;
}
@@ -523,7 +523,7 @@ static inline u32 sunxi_irq_cfg_offset(u16 irq)
static inline u32 sunxi_irq_ctrl_reg(u16 irq)
{
- u8 reg = irq / IRQ_CTRL_IRQ_PER_REG;
+ u8 reg = irq / IRQ_CTRL_IRQ_PER_REG * 0x04;
return reg + IRQ_CTRL_REG;
}
@@ -535,7 +535,7 @@ static inline u32 sunxi_irq_ctrl_offset(u16 irq)
static inline u32 sunxi_irq_status_reg(u16 irq)
{
- u8 reg = irq / IRQ_STATUS_IRQ_PER_REG;
+ u8 reg = irq / IRQ_STATUS_IRQ_PER_REG * 0x04;
return reg + IRQ_STATUS_REG;
}
--
1.8.5.3
next prev parent reply other threads:[~2014-02-17 21:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 21:19 [PATCH 1/4] pinctrl-sunxi: various fixes Hans de Goede
2014-02-17 21:19 ` [PATCH 1/4] pinctrl-sunxi: Fix sun5i-a13 port F multiplexing Hans de Goede
2014-02-25 8:31 ` Linus Walleij
2014-02-17 21:19 ` [PATCH 2/4] pinctrl-sunxi: Fix hang on gpio irq Hans de Goede
2014-02-25 8:33 ` Linus Walleij
2014-02-17 21:19 ` [PATCH 3/4] pinctrl-sunxi: Fix masking when setting irq type Hans de Goede
2014-02-18 7:49 ` Maxime Ripard
2014-02-25 8:35 ` Linus Walleij
2014-02-17 21:19 ` Hans de Goede [this message]
2014-02-18 8:05 ` [PATCH 4/4] pinctrl-sunxi: Fix interrupt register offset calculation Maxime Ripard
2014-02-25 8:38 ` Linus Walleij
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=1392671984-29872-5-git-send-email-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).