Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1404470
| From | Ian Abbott <abbotti@mev.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 17/20] staging: comedi: drivers: add PLX PCI 9080 DMATHR register values |
| Date | 2016-05-20 16:00 +0200 |
| Message-ID | <rAT87-6ck-45@gated-at.bofh.it> (permalink) |
| References | <rASYp-68P-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Add macros in "plx9080.h" that define values for the DMATHR register
values. Use the prefix `PLX_DMATHR_` for the macros. Make use of the
`BIT(x)` and `GENMASK(h,l)` macros to define the values.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
drivers/staging/comedi/drivers/plx9080.h | 41 ++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/drivers/staging/comedi/drivers/plx9080.h b/drivers/staging/comedi/drivers/plx9080.h
index 9e76342..50d0b1b 100644
--- a/drivers/staging/comedi/drivers/plx9080.h
+++ b/drivers/staging/comedi/drivers/plx9080.h
@@ -544,6 +544,47 @@ struct plx_dma_desc {
#define PLX_REG_DMATHR 0x00b0
/*
+ * DMA Threshold constraints:
+ * (C0PLAF + 1) + (C0PLAE + 1) <= 32
+ * (C0LPAF + 1) + (C0LPAE + 1) <= 32
+ * (C1PLAF + 1) + (C1PLAE + 1) <= 16
+ * (C1LPAF + 1) + (C1LPAE + 1) <= 16
+ */
+
+/* DMA Channel 0 PCI-to-Local Almost Full (divided by 2, minus 1) */
+#define PLX_DMATHR_C0PLAF(x) (BIT(0) * ((x) & 0xf))
+#define PLX_DMATHR_C0PLAF_MASK GENMASK(3, 0)
+#define PLX_DMATHR_C0PLAF_SHIFT 0
+/* DMA Channel 0 Local-to-PCI Almost Empty (divided by 2, minus 1) */
+#define PLX_DMATHR_C0LPAE(x) (BIT(4) * ((x) & 0xf))
+#define PLX_DMATHR_C0LPAE_MASK GENMASK(7, 4)
+#define PLX_DMATHR_C0LPAE_SHIFT 4
+/* DMA Channel 0 Local-to-PCI Almost Full (divided by 2, minus 1) */
+#define PLX_DMATHR_C0LPAF(x) (BIT(8) * ((x) & 0xf))
+#define PLX_DMATHR_C0LPAF_MASK GENMASK(11, 8)
+#define PLX_DMATHR_C0LPAF_SHIFT 8
+/* DMA Channel 0 PCI-to-Local Almost Empty (divided by 2, minus 1) */
+#define PLX_DMATHR_C0PLAE(x) (BIT(12) * ((x) & 0xf))
+#define PLX_DMATHR_C0PLAE_MASK GENMASK(15, 12)
+#define PLX_DMATHR_C0PLAE_SHIFT 12
+/* DMA Channel 1 PCI-to-Local Almost Full (divided by 2, minus 1) */
+#define PLX_DMATHR_C1PLAF(x) (BIT(16) * ((x) & 0xf))
+#define PLX_DMATHR_C1PLAF_MASK GENMASK(19, 16)
+#define PLX_DMATHR_C1PLAF_SHIFT 16
+/* DMA Channel 1 Local-to-PCI Almost Empty (divided by 2, minus 1) */
+#define PLX_DMATHR_C1LPAE(x) (BIT(20) * ((x) & 0xf))
+#define PLX_DMATHR_C1LPAE_MASK GENMASK(23, 20)
+#define PLX_DMATHR_C1LPAE_SHIFT 20
+/* DMA Channel 1 Local-to-PCI Almost Full (divided by 2, minus 1) */
+#define PLX_DMATHR_C1LPAF(x) (BIT(24) * ((x) & 0xf))
+#define PLX_DMATHR_C1LPAF_MASK GENMASK(27, 24)
+#define PLX_DMATHR_C1LPAF_SHIFT 24
+/* DMA Channel 1 PCI-to-Local Almost Empty (divided by 2, minus 1) */
+#define PLX_DMATHR_C1PLAE(x) (BIT(28) * ((x) & 0xf))
+#define PLX_DMATHR_C1PLAE_MASK GENMASK(31, 28)
+#define PLX_DMATHR_C1PLAE_SHIFT 28
+
+/*
* Messaging Queue Registers OPLFIS, OPLFIM, IQP, OQP, MQCR, QBAR, IFHPR,
* IFTPR, IPHPR, IPTPR, OFHPR, OFTPR, OPHPR, OPTPR, and QSR have been omitted.
* They are used by the I2O feature. (IQP and OQP occupy the usual offsets of
--
2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/20] staging: comedi: re-do drivers/plx9080.h Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 15:50 +0200
[PATCH 20/20] staging: comedi: plx9080.h: include headers for declarations Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 16/20] staging: comedi: drivers: re-do PLX PCI 9080 DMACSRx register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 14/20] staging: comedi: drivers: re-do PLX PCI 9080 DMAMODEx register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 18/20] staging: comedi: plx9080.h: tidy up some comments Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 15/20] staging: comedi: drivers: re-do PLX PCI 9080 DMADPRx register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 13/20] staging: comedi: plx9080.h: add hard-coded PCIHIDR register value Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 01/20] staging: comedi: plx9080.h: correct LRNG_IO_MASK and LMAP_IO_MASK Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 09/20] staging: comedi: drivers: re-do PLX PCI 9080 DMPBAM register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 07/20] staging: comedi: drivers: re-do PLX PCI 9080 BIGEND register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 06/20] staging: comedi: drivers: re-do PLX PCI 9080 MARBR register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 05/20] staging: comedi: drivers: re-do macros for PLX PCI 9080 LASxBA values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 19/20] staging: comedi: plx9080.h: Add kerneldoc comments Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 12/20] staging: comedi: drivers: re-do PLX PCI 9080 CNTRL register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 10/20] staging: comedi: drivers: re-do PLX PCI 9080 DMCFGA register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 11/20] staging: comedi: drivers: re-do PLX PCI 9080 INTCSR register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 17/20] staging: comedi: drivers: add PLX PCI 9080 DMATHR register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 08/20] staging: comedi: drivers: re-do PLX PCI 9080 LBRDx register values Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
[PATCH 03/20] staging: comedi: drivers: rename PLX PCI 9080 register offsets Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 16:00 +0200
RE: [PATCH 03/20] staging: comedi: drivers: rename PLX PCI 9080 register offsets Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-20 18:30 +0200
Re: [PATCH 03/20] staging: comedi: drivers: rename PLX PCI 9080 register offsets Ian Abbott <abbotti@mev.co.uk> - 2016-05-20 18:40 +0200
RE: [PATCH 03/20] staging: comedi: drivers: rename PLX PCI 9080 register offsets Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-20 19:00 +0200
csiph-web