You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.3 KiB
47 lines
1.3 KiB
11 years ago
|
From a5f3d2672d5b9efe93be0bf66d69156bf806220b Mon Sep 17 00:00:00 2001
|
||
|
From: Hans de Goede <hdegoede@redhat.com>
|
||
|
Date: Mon, 17 Feb 2014 22:04:20 +0100
|
||
|
Subject: [PATCH] pinctrl-sunxi: Fix interrupt register offset calculation
|
||
|
|
||
|
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.5
|
||
|
|