staging: vchiq_arm: Use define for doorbell irq
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 15 May 2021 19:10:47 +0000 (21:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 15:56:31 +0000 (17:56 +0200)
The interrupt handler uses a magic number to check that the doorbell
was rung. Better replace this number with official Broadcom define.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1621105859-30215-9-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c

index c3fbb29..30d6f1a 100644 (file)
@@ -29,6 +29,8 @@
 #define BELL0  0x00
 #define BELL2  0x08
 
+#define ARM_DS_ACTIVE  BIT(2)
+
 struct vchiq_2835_state {
        int inited;
        struct vchiq_arm_state arm_state;
@@ -269,7 +271,7 @@ vchiq_doorbell_irq(int irq, void *dev_id)
        /* Read (and clear) the doorbell */
        status = readl(g_regs + BELL0);
 
-       if (status & 0x4) {  /* Was the doorbell rung? */
+       if (status & ARM_DS_ACTIVE) {  /* Was the doorbell rung? */
                remote_event_pollall(state);
                ret = IRQ_HANDLED;
        }