summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-12-17 16:39:53 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-12-17 16:39:53 +0000
commitc11c4de50b8c93ce0c404d031e79f4ac8dee33e1 (patch)
tree9a3179ac7622a721deb74080a7a8b8600d941fb9
parent418b0361ea21e3aa350cdf9c3c07618e6c59c2e1 (diff)
downloadmtk-20170518-c11c4de50b8c93ce0c404d031e79f4ac8dee33e1.zip
mtk-20170518-c11c4de50b8c93ce0c404d031e79f4ac8dee33e1.tar.gz
mtk-20170518-c11c4de50b8c93ce0c404d031e79f4ac8dee33e1.tar.bz2
revert [9788], the ADM5120 datasheet v1.16 contains bad values
SVN-Revision: 9790
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/irq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/irq.c b/target/linux/adm5120/files/arch/mips/adm5120/irq.c
index ef7b9b9..a7a5455 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/irq.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/irq.c
@@ -75,8 +75,6 @@ static void adm5120_intc_irq_mask(unsigned int irq)
static int adm5120_intc_irq_set_type(unsigned int irq, unsigned int flow_type)
{
- /* TODO: not yet tested */
-
unsigned int sense;
unsigned long mode;
int err = 0;
@@ -109,9 +107,9 @@ static int adm5120_intc_irq_set_type(unsigned int irq, unsigned int flow_type)
case ADM5120_IRQ_GPIO4:
mode = INTC_READ(INTC_REG_INT_MODE);
if (sense == IRQ_TYPE_LEVEL_LOW)
- mode |= (1 << (3 + irq - ADM5120_IRQ_GPIO2));
+ mode |= (1 << (irq - ADM5120_INTC_IRQ_BASE));
else
- mode &= (1 << (3 + irq - ADM5120_IRQ_GPIO2));
+ mode &= ~(1 << (irq - ADM5120_INTC_IRQ_BASE));
INTC_WRITE(INTC_REG_INT_MODE, mode);
/* fallthrough */