diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 17:20:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 17:20:17 +0000 |
commit | 0c04730b6718e2a9cd357673c6601fb978d07256 (patch) | |
tree | 8522f5db91f122a7907fb298a279ee46fc8255f9 /sys/arch/sparc/dev/dmareg.h | |
parent | 3e81c8c2af67101fa47ce68b5ee9a02c44c97a62 (diff) |
new driver by me
Diffstat (limited to 'sys/arch/sparc/dev/dmareg.h')
-rw-r--r-- | sys/arch/sparc/dev/dmareg.h | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/sys/arch/sparc/dev/dmareg.h b/sys/arch/sparc/dev/dmareg.h index ced68a3c057..d19c5c2960e 100644 --- a/sys/arch/sparc/dev/dmareg.h +++ b/sys/arch/sparc/dev/dmareg.h @@ -2,6 +2,8 @@ /* * Copyright (c) 1994 Peter Galbavy. All rights reserved. + * Copyright (c) 1995 Theo de Raadt. All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -12,7 +14,8 @@ * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: - * This product includes software developed by Peter Galbavy. + * This product includes software developed by Peter Galbavy and + * Theo de Raadt. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * @@ -29,42 +32,50 @@ */ struct dma_regs { - volatile u_long csr; /* DMA CSR */ -#define D_INT_PEND 0x00000001 /* interrupt pending */ -#define D_ERR_PEND 0x00000002 /* error pending */ -#define D_DRAINING 0x0000000c /* fifo draining */ -#define D_INT_EN 0x00000010 /* interrupt enable */ -#define D_INVALIDATE 0x00000020 /* invalidate fifo */ -#define D_SLAVE_ERR 0x00000040 /* slave access size error */ -#define D_DRAIN 0x00000040 /* drain fifo if DMAREV_1 */ -#define D_RESET 0x00000080 /* reset scsi */ -#define D_WRITE 0x00000100 /* 1 = dev -> mem */ -#define D_EN_DMA 0x00000200 /* enable DMA requests */ -#define D_R_PEND 0x00000400 /* something only on ver < 2 */ -#define D_EN_CNT 0x00002000 /* enable byte counter */ -#define D_TC 0x00004000 /* terminal count */ -#define D_DSBL_CSR_DRN 0x00010000 /* disable fifo drain on csr */ -#define D_DSBL_SCSI_DRN 0x00020000 /* disable fifo drain on reg */ -#define D_BURST_SIZE 0x000c0000 /* sbus read/write burst size */ -#define D_DIAG 0x00100000 /* disable fifo drain on addr */ -#define D_TWO_CYCLE 0x00200000 /* 2 clocks per transfer */ -#define D_FASTER 0x00400000 /* 3 clocks per transfer */ -#define D_TCI_DIS 0x00800000 /* disable intr on D_TC */ -#define D_EN_NEXT 0x01000000 /* enable auto next address */ -#define D_DMA_ON 0x02000000 /* enable dma from scsi */ -#define D_A_LOADED 0x04000000 /* address loaded */ -#define D_NA_LOADED 0x08000000 /* next address loaded */ -#define D_DEV_ID 0xf0000000 /* device ID */ -#define DMAREV_0 0x00000000 /* Sunray DMA */ -#define DMAREV_1 0x80000000 /* 'DMA' */ -#define DMAREV_PLUS 0x90000000 /* 'DMA+' */ -#define DMAREV_2 0xa0000000 /* 'DMA2' */ + volatile u_long csr; /* DMA CSR */ +#define D_INT_PEND 0x00000001 /* interrupt pending */ +#define D_ERR_PEND 0x00000002 /* error pending */ +#define D_DRAINING 0x0000000c /* fifo draining */ +#define D_INT_EN 0x00000010 /* interrupt enable */ +#define D_INVALIDATE 0x00000020 /* invalidate fifo */ +#define D_SLAVE_ERR 0x00000040 /* slave access size error */ +#define D_DRAIN 0x00000040 /* drain fifo if DMAREV_1 */ +#define D_RESET 0x00000080 /* reset scsi */ +#define D_WRITE 0x00000100 /* 1 = dev -> mem */ +#define D_EN_DMA 0x00000200 /* enable DMA requests */ +#define D_R_PEND 0x00000400 /* no reset/flush allowed! */ +#define D_BYTEADDR 0x00001800 /* next byte to be accessed by esp */ +#define D_EN_CNT 0x00002000 /* enable byte counter */ +#define D_TC 0x00004000 /* terminal count */ +#define D_ILLAC 0x00008000 /* enable lance ethernet */ +#define D_DSBL_CSR_DRN 0x00010000 /* disable fifo drain on csr */ +#define D_DSBL_SCSI_DRN 0x00020000 /* disable fifo drain on reg */ +#define D_BURST_SIZE 0x000c0000 /* sbus read/write burst size */ +#define D_DIAG 0x00100000 /* disable fifo drain on addr */ +#define D_TWO_CYCLE 0x00200000 /* 2 clocks per transfer */ +#define D_FASTER 0x00400000 /* 3 clocks per transfer */ +#define D_TCI_DIS 0x00800000 /* disable intr on D_TC */ +#define D_EN_NEXT 0x01000000 /* enable auto next address */ +#define D_DMA_ON 0x02000000 /* enable dma from scsi */ +#define D_A_LOADED 0x04000000 /* address loaded */ +#define D_NA_LOADED 0x08000000 /* next address loaded */ +#define D_DEV_ID 0xf0000000 /* device ID */ +#define DMAREV_4300 0x00000000 /* Sunray DMA */ +#define DMAREV_ESC1 0x40000000 /* ESC gate array */ +#define DMAREV_1 0x80000000 /* 'DMA' */ +#define DMAREV_PLUS 0x90000000 /* 'DMA+' */ +#define DMAREV_2 0xa0000000 /* 'DMA2' */ + + volatile caddr_t addr; +#define DMA_D_ADDR 0x01 /* DMA ADDR */ - volatile caddr_t addr; -#define DMA_D_ADDR 0x01 /* DMA ADDR (in u_longs) */ + /* + * some versions of dma controller lack the following + * two registers -- do not use them! + */ - volatile u_long bcnt; /* DMA COUNT (in u_longs) */ -#define D_BCNT_MASK 0x00ffffff /* only 24 bits */ + volatile u_long bcnt; /* DMA COUNT */ +#define D_BCNT_MASK 0x00ffffff /* only 24 bits */ - volatile u_long test; /* DMA TEST (in u_longs) */ + volatile u_long test; /* DMA TEST (in u_longs) */ }; |