From a1206669e893f6c3d69b789531a23e5116b48083 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Fri, 4 May 2007 17:35:58 +0000
Subject: [PATCH] fix gpio interrupts on broadcom (thanks, jpcass)

SVN-Revision: 7090
---
 package/broadcom-diag/src/gpio.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/broadcom-diag/src/gpio.h b/package/broadcom-diag/src/gpio.h
index 982caddae4..16f6ca41cd 100644
--- a/package/broadcom-diag/src/gpio.h
+++ b/package/broadcom-diag/src/gpio.h
@@ -68,7 +68,8 @@ static void gpio_set_irqenable(int enabled, irqreturn_t (*handler)(int, void *,
 	else
 		free_irq(irq, handler);
 
-	gpio_intmask(1, (enabled ? 1 : 0));
+	if (ssb.chipco.dev)
+		ssb_write32_masked(ssb.chipco.dev, SSB_CHIPCO_IRQMASK, SSB_CHIPCO_IRQ_GPIO, (enabled ? SSB_CHIPCO_IRQ_GPIO : 0));
 }
 
 #else
-- 
GitLab