summaryrefslogtreecommitdiff
path: root/target/linux/adm5120
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-12-17 16:39:53 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-12-17 16:39:53 +0000
commitab35af60178e8761830564c8a80c14d461144ac5 (patch)
tree9dd8323f3c05e194db820b0558bd827e695672db /target/linux/adm5120
parent140ea29a53385a99321b1fa68df5ed20e4fd43e5 (diff)
[adm5120] revert [9788], the ADM5120 datasheet v1.16 contains bad values
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9790 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120')
-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 ef7b9b92e3..a7a5455dca 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 */