summaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb
diff options
context:
space:
mode:
authorMike Rapoport2016-02-10 17:34:17 +0100
committerGreg Kroah-Hartman2016-02-12 04:52:37 +0100
commit0f23be7050ca836398a5b3f2fd73227dce3ef37a (patch)
treef16916fe44848af3efbd5dbcbf17cd3479856229 /drivers/staging/sm750fb
parentstaging: sm750fb: change definition of PANEL_PLANE_BR fields (diff)
downloadkernel-qcow2-linux-0f23be7050ca836398a5b3f2fd73227dce3ef37a.tar.gz
kernel-qcow2-linux-0f23be7050ca836398a5b3f2fd73227dce3ef37a.tar.xz
kernel-qcow2-linux-0f23be7050ca836398a5b3f2fd73227dce3ef37a.zip
staging: sm750fb: use BIT macro for DMA_ABORT_INTERRUPT single-bit fields
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>
Diffstat (limited to 'drivers/staging/sm750fb')
-rw-r--r--drivers/staging/sm750fb/ddk750_chip.c2
-rw-r--r--drivers/staging/sm750fb/ddk750_reg.h20
2 files changed, 5 insertions, 17 deletions
diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index 37eae59b3726..e53a3d1271ac 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -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 */
diff --git a/drivers/staging/sm750fb/ddk750_reg.h b/drivers/staging/sm750fb/ddk750_reg.h
index 65510983bae2..73f3c34c236e 100644
--- a/drivers/staging/sm750fb/ddk750_reg.h
+++ b/drivers/staging/sm750fb/ddk750_reg.h
@@ -1973,22 +1973,10 @@
#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