]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: sm750fb: use BIT macro for DMA_ABORT_INTERRUPT single-bit fields
authorMike Rapoport <mike.rapoport@gmail.com>
Wed, 10 Feb 2016 16:34:17 +0000 (18:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Feb 2016 03:52:37 +0000 (19:52 -0800)
Replace complex definition of DMA_ABORT_INTERRUPT register fields with
BIT() macro and use open-coded implementation for register manipulation

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/ddk750_chip.c
drivers/staging/sm750fb/ddk750_reg.h

index 37eae59b3726c9228e17d8b8e817d4e5bf052c89..e53a3d1271ac4b199301139445a2d0f2e4888745 100644 (file)
@@ -264,7 +264,7 @@ int ddk750_initHw(initchip_param_t *pInitParam)
 
                /* Disable DMA Channel, if a former application left it on */
                reg = PEEK32(DMA_ABORT_INTERRUPT);
-               reg = FIELD_SET(reg, DMA_ABORT_INTERRUPT, ABORT_1, ABORT);
+               reg |= DMA_ABORT_INTERRUPT_ABORT_1;
                POKE32(DMA_ABORT_INTERRUPT, reg);
 
                /* Disable DMA Power, if a former application left it on */
index 65510983bae25571534d69d496d3bc2148d6c8e7..73f3c34c236ed639017af68e650d554fb909309e 100644 (file)
 #define DMA_1_SIZE_CONTROL_SIZE                         23:0
 
 #define DMA_ABORT_INTERRUPT                             0x0D0020
-#define DMA_ABORT_INTERRUPT_ABORT_1                     5:5
-#define DMA_ABORT_INTERRUPT_ABORT_1_ENABLE              0
-#define DMA_ABORT_INTERRUPT_ABORT_1_ABORT               1
-#define DMA_ABORT_INTERRUPT_ABORT_0                     4:4
-#define DMA_ABORT_INTERRUPT_ABORT_0_ENABLE              0
-#define DMA_ABORT_INTERRUPT_ABORT_0_ABORT               1
-#define DMA_ABORT_INTERRUPT_INT_1                       1:1
-#define DMA_ABORT_INTERRUPT_INT_1_CLEAR                 0
-#define DMA_ABORT_INTERRUPT_INT_1_FINISHED              1
-#define DMA_ABORT_INTERRUPT_INT_0                       0:0
-#define DMA_ABORT_INTERRUPT_INT_0_CLEAR                 0
-#define DMA_ABORT_INTERRUPT_INT_0_FINISHED              1
-
-
-
-
+#define DMA_ABORT_INTERRUPT_ABORT_1                     BIT(5)
+#define DMA_ABORT_INTERRUPT_ABORT_0                     BIT(4)
+#define DMA_ABORT_INTERRUPT_INT_1                       BIT(1)
+#define DMA_ABORT_INTERRUPT_INT_0                       BIT(0)
 
 /* Default i2c CLK and Data GPIO. These are the default i2c pins */
 #define DEFAULT_I2C_SCL                     30