Lines Matching +full:spare +full:- +full:regs

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * include/asm-m68k/dma.h
16 #define DVMA_PAGE_MASK (~(DVMA_PAGE_SIZE-1))
43 #define DVMA_SIZE (DVMA_END-DVMA_START)
47 /* empirical kludge -- dvma regions only seem to work right on 0x10000
50 #define DVMA_ALIGN(addr) (((addr)+DVMA_REGION_SIZE-1) & \
51 ~(DVMA_REGION_SIZE-1))
53 /* virt <-> phys conversions */
73 #define DVMA_SIZE (DVMA_END-DVMA_START)
76 #define IOMMU_ENTRIES (IOMMU_TOTAL_ENTRIES - 0x80)
113 struct sparc_dma_registers *regs; member
132 #define DMA_ISBROKEN(dma) ((dma)->revision == dvmarev1)
133 #define DMA_ISESC1(dma) ((dma)->revision == dvmaesc1)
171 #define DMA_BRST0 0x00080000 /* SCSI: no bursts (non-HME gate arrays) */
175 #define DMA_EN_ENETAUI DMA_3CLKS /* Put lance into AUI-cable mode */
183 /* Values describing the burst-size property from the PROM */
194 #define DMA_MAXEND(addr) (0x01000000UL-(((unsigned long)(addr))&0x00ffffffUL))
196 /* Yes, I hack a lot of elisp in my spare time... */
197 #define DMA_ERROR_P(regs) ((((regs)->cond_reg) & DMA_HNDL_ERROR)) argument
198 #define DMA_IRQ_P(regs) ((((regs)->cond_reg) & (DMA_HNDL_INTR | DMA_HNDL_ERROR))) argument
199 #define DMA_WRITE_P(regs) ((((regs)->cond_reg) & DMA_ST_WRITE)) argument
200 #define DMA_OFF(regs) ((((regs)->cond_reg) &= (~DMA_ENABLE))) argument
201 #define DMA_INTSOFF(regs) ((((regs)->cond_reg) &= (~DMA_INT_ENAB))) argument
202 #define DMA_INTSON(regs) ((((regs)->cond_reg) |= (DMA_INT_ENAB))) argument
203 #define DMA_PUNTFIFO(regs) ((((regs)->cond_reg) |= DMA_FIFO_INV)) argument
204 #define DMA_SETSTART(regs, addr) ((((regs)->st_addr) = (char *) addr)) argument
205 #define DMA_BEGINDMA_W(regs) \ argument
206 ((((regs)->cond_reg |= (DMA_ST_WRITE|DMA_ENABLE|DMA_INT_ENAB))))
207 #define DMA_BEGINDMA_R(regs) \ argument
208 ((((regs)->cond_reg |= ((DMA_ENABLE|DMA_INT_ENAB)&(~DMA_ST_WRITE)))))
225 struct sparc_dma_registers *regs = dma->regs; \
227 sparc_dma_pause(regs, (DMA_FIFO_ISDRAIN)); \
229 regs->cond_reg |= (DMA_RST_SCSI); /* assert */ \
231 regs->cond_reg &= ~(DMA_RST_SCSI); /* de-assert */ \
232 sparc_dma_enable_interrupts(regs); /* Re-enable interrupts */ \
234 if(dma->revision>dvmarev1) regs->cond_reg |= DMA_3CLKS; \
235 dma->running = 0; \