aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2020-09-10 09:37:30 +0000
committerAndrew Turner <andrew@FreeBSD.org>2020-09-10 09:37:30 +0000
commit365ed84f28e42a41067a90c98e5243aae1790f6d (patch)
treec6369c81b38287629a36b195aac7b21a2fbc2e42
parent2b32d93e551df6c853ac45520d67468ecfdc9ec9 (diff)
downloadsrc-365ed84f28e42a41067a90c98e5243aae1790f6d.tar.gz
src-365ed84f28e42a41067a90c98e5243aae1790f6d.zip
Use the correct variable to check which interrupt mode to use
In the PL061 driver we incorrectly used the mask rather than mode to find how to configure the interrupt. Sponsored by: Innovate UK
Notes
Notes: svn path=/head/; revision=365557
-rw-r--r--sys/dev/gpio/pl061.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/gpio/pl061.c b/sys/dev/gpio/pl061.c
index d94987b23d01..cd6ec81cf402 100644
--- a/sys/dev/gpio/pl061.c
+++ b/sys/dev/gpio/pl061.c
@@ -335,22 +335,22 @@ pl061_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc,
PL061_LOCK(sc);
- if (mask & GPIO_INTR_EDGE_BOTH) {
+ if (mode & GPIO_INTR_EDGE_BOTH) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, mask);
mask_and_set(sc, PL061_INTSENSE, mask, 0);
- } else if (mask & GPIO_INTR_EDGE_RISING) {
+ } else if (mode & GPIO_INTR_EDGE_RISING) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, 0);
mask_and_set(sc, PL061_INTEVENT, mask, mask);
- } else if (mask & GPIO_INTR_EDGE_FALLING) {
+ } else if (mode & GPIO_INTR_EDGE_FALLING) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, 0);
mask_and_set(sc, PL061_INTEVENT, mask, 0);
- } else if (mask & GPIO_INTR_LEVEL_HIGH) {
+ } else if (mode & GPIO_INTR_LEVEL_HIGH) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, mask);
mask_and_set(sc, PL061_INTEVENT, mask, mask);
- } else if (mask & GPIO_INTR_LEVEL_LOW) {
+ } else if (mode & GPIO_INTR_LEVEL_LOW) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, mask);
mask_and_set(sc, PL061_INTEVENT, mask, 0);