The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sparc64/sbus/lsi64854reg.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: lsi64854reg.h,v 1.6 2008/04/28 20:23:50 martin Exp $ */
    2 
    3 /*-
    4  * SPDX-License-Identifier: BSD-2-Clause-NetBSD
    5  *
    6  * Copyright (c) 1998 The NetBSD Foundation, Inc.
    7  * All rights reserved.
    8  *
    9  * This code is derived from software contributed to The NetBSD Foundation
   10  * by Paul Kranenburg.
   11  *
   12  * Redistribution and use in source and binary forms, with or without
   13  * modification, are permitted provided that the following conditions
   14  * are met:
   15  * 1. Redistributions of source code must retain the above copyright
   16  *    notice, this list of conditions and the following disclaimer.
   17  * 2. Redistributions in binary form must reproduce the above copyright
   18  *    notice, this list of conditions and the following disclaimer in the
   19  *    documentation and/or other materials provided with the distribution.
   20  *
   21  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   22  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   23  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   24  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   31  * POSSIBILITY OF SUCH DAMAGE.
   32  */
   33 
   34 /*      $FreeBSD: releng/12.0/sys/sparc64/sbus/lsi64854reg.h 326262 2017-11-27 15:10:39Z pfg $ */
   35 
   36 /*
   37  * LSI 64854 DMA engine. Contains three independent channels
   38  * designed to interface with (a) a NCR539X SCSI controller,
   39  * (b) a AM7990 Ethernet controller, (c) Parallel port hardware..
   40  */
   41 
   42 /*
   43  * Register offsets to bus handle.
   44  */
   45 #define L64854_REG_CSR          0               /* Control bits */
   46 #define L64854_REG_ADDR         4               /* DMA Address */
   47 #define L64854_REG_CNT          8               /* DMA count */
   48 #define L64854_REG_CNT_MASK     0x00ffffff      /*   only 24 bits */
   49 #define L64854_REG_ENBAR        12              /* ENET Base register */
   50 #define L64854_REG_TEST         12              /* SCSI Test register */
   51 #define L64854_REG_HCR          16              /* PP Hardware Configuration */
   52 #define L64854_REG_OCR          18              /* PP Operation Configuration */
   53 #define L64854_REG_DR           20              /* PP Data register */
   54 #define L64854_REG_TCR          21              /* PP Transfer Control */
   55 #define L64854_REG_OR           22              /* PP Output register */
   56 #define L64854_REG_IR           23              /* PP Input register */
   57 #define L64854_REG_ICR          24              /* PP Interrupt Control */
   58 
   59 
   60 /*
   61  * Control bits common to all three channels.
   62  */
   63 #define L64854_INT_PEND 0x00000001      /* Interrupt pending */
   64 #define L64854_ERR_PEND 0x00000002      /* Error pending */
   65 #define L64854_DRAINING 0x0000000c      /* FIFO draining */
   66 #define L64854_INT_EN   0x00000010      /* Interrupt enable */
   67 #define L64854_INVALIDATE       0x00000020      /* Invalidate FIFO */
   68 #define L64854_SLAVE_ERR        0x00000040      /* Slave access size error */
   69 #define L64854_RESET    0x00000080      /* Reset device */
   70 #define L64854_WRITE    0x00000100      /* 1: xfer to memory */
   71 #define L64854_EN_DMA   0x00000200      /* enable DMA transfers */
   72 
   73 #define L64854_BURST_SIZE       0x000c0000      /* Read/write burst size */
   74 #define  L64854_BURST_0         0x00080000      /*   no bursts (SCSI-only) */
   75 #define  L64854_BURST_16        0x00000000      /*   16-byte bursts */
   76 #define  L64854_BURST_32        0x00040000      /*   32-byte bursts */
   77 #define  L64854_BURST_64        0x000c0000      /*   64-byte bursts (fas) */
   78 
   79 #define L64854_RST_FAS366       0x08000000      /* FAS366 hardware reset */
   80 
   81 #define L64854_DEVID            0xf0000000      /* device ID bits */
   82 
   83 /*
   84  * SCSI DMA control bits.
   85  */
   86 #define D_INT_PEND      L64854_INT_PEND /* interrupt pending */
   87 #define D_ERR_PEND      L64854_ERR_PEND /* error pending */
   88 #define D_DRAINING      L64854_DRAINING /* fifo draining */
   89 #define D_INT_EN        L64854_INT_EN   /* interrupt enable */
   90 #define D_INVALIDATE    L64854_INVALIDATE/* invalidate fifo */
   91 #define D_SLAVE_ERR     L64854_SLAVE_ERR/* slave access size error */
   92 #define D_RESET         L64854_RESET    /* reset scsi */
   93 #define D_WRITE         L64854_WRITE    /* 1 = dev -> mem */
   94 #define D_EN_DMA        L64854_EN_DMA   /* enable DMA requests */
   95 #define D_EN_CNT        0x00002000      /* enable byte counter */
   96 #define D_TC            0x00004000      /* terminal count */
   97 #define D_WIDE_EN       0x00008000      /* enable wide mode SBUS DMA (fas) */
   98 #define D_DSBL_CSR_DRN  0x00010000      /* disable fifo drain on csr */
   99 #define D_DSBL_SCSI_DRN 0x00020000      /* disable fifo drain on reg */
  100 
  101 #define D_DIAG          0x00100000      /* disable fifo drain on addr */
  102 #define D_TWO_CYCLE     0x00200000      /* 2 clocks per transfer */
  103 #define D_FASTER        0x00400000      /* 3 clocks per transfer */
  104 #define D_TCI_DIS       0x00800000      /* disable intr on D_TC */
  105 #define D_EN_NEXT       0x01000000      /* enable auto next address */
  106 #define D_DMA_ON        0x02000000      /* enable dma from scsi XXX */
  107 #define D_DSBL_PARITY_CHK \
  108                         0x02000000      /* disable checking for parity on bus (default 1:fas) */
  109 #define D_A_LOADED      0x04000000      /* address loaded */
  110 #define D_NA_LOADED     0x08000000      /* next address loaded */
  111 #define D_HW_RESET_FAS366 \
  112                         0x08000000      /* hardware reset FAS366 (fas) */
  113 #define D_DEV_ID        L64854_DEVID    /* device ID */
  114 #define  DMAREV_0       0x00000000      /* Sunray DMA */
  115 #define  DMAREV_ESC     0x40000000      /*  DMA ESC array */
  116 #define  DMAREV_1       0x80000000      /* 'DMA' */
  117 #define  DMAREV_PLUS    0x90000000      /* 'DMA+' */
  118 #define  DMAREV_2       0xa0000000      /* 'DMA2' */
  119 #define  DMAREV_HME     0xb0000000      /* 'HME'  */
  120 
  121 /*
  122  * revisions 0,1 and ESC have different bits.
  123  */
  124 #define D_ESC_DRAIN     0x00000040      /* rev0,1,esc: drain fifo */
  125 #define D_ESC_R_PEND    0x00000400      /* rev0,1: request pending */
  126 #define D_ESC_BURST     0x00000800      /* DMA ESC: 16 byte bursts */
  127 #define D_ESC_AUTODRAIN 0x00040000      /* DMA ESC: Auto-drain */
  128 
  129 #define DDMACSR_BITS    "\177\020"                              \
  130         "b\00INT\0b\01ERR\0f\02\02DRAINING\0b\04IEN\0"          \
  131         "b\06SLVERR\0b\07RST\0b\10WRITE\0b\11ENDMA\0"           \
  132         "b\15ENCNT\0b\16TC\0\b\20DSBL_CSR_DRN\0"                \
  133         "b\21DSBL_SCSI_DRN\0f\22\2BURST\0b\25TWOCYCLE\0"        \
  134         "b\26FASTER\0b\27TCIDIS\0b\30ENNXT\0b\031DMAON\0"       \
  135         "b\32ALOADED\0b\33NALOADED\0"
  136 
  137 
  138 /*
  139  * ENET DMA control bits.
  140  */
  141 #define E_INT_PEND      L64854_INT_PEND /* interrupt pending */
  142 #define E_ERR_PEND      L64854_ERR_PEND /* error pending */
  143 #define E_DRAINING      L64854_DRAINING /* fifo draining */
  144 #define E_INT_EN        L64854_INT_EN   /* interrupt enable */
  145 #define E_INVALIDATE    L64854_INVALIDATE/* invalidate fifo */
  146 #define E_SLAVE_ERR     L64854_SLAVE_ERR/* slave access size error */
  147 #define E_RESET         L64854_RESET    /* reset ENET */
  148 #define E_reserved1     0x00000300      /* */
  149 #define E_DRAIN         0x00000400      /* force Ecache drain */
  150 #define E_DSBL_WR_DRN   0x00000800      /* disable Ecache drain on .. */
  151 #define E_DSBL_RD_DRN   0x00001000      /* disable Ecache drain on .. */
  152 #define E_reserved2     0x00006000      /* */
  153 #define E_ILACC         0x00008000      /* ... */
  154 #define E_DSBL_BUF_WR   0x00010000      /* no buffering of slave writes */
  155 #define E_DSBL_WR_INVAL 0x00020000      /* no Ecache invalidate on slave writes */
  156 
  157 #define E_reserved3     0x00100000      /* */
  158 #define E_LOOP_TEST     0x00200000      /* loopback mode */
  159 #define E_TP_AUI        0x00400000      /* 1 for TP, 0 for AUI */
  160 #define E_reserved4     0x0c800000      /* */
  161 #define E_DEV_ID        L64854_DEVID    /* ID bits */
  162 
  163 #define EDMACSR_BITS    "\177\020"                              \
  164         "b\00INT\0b\01ERR\0f\02\02DRAINING\0b\04IEN\0"          \
  165         "b\06SLVERR\0b\07RST\0b\10WRITE\0b\12DRAIN\0"           \
  166         "b\13DSBL_WR_DRN\0b\14DSBL_RD_DRN\0b\17ILACC\0"         \
  167         "b\20DSBL_BUF_WR\0b\21DSBL_WR_INVAL\0"                  \
  168         "b\25LOOPTEST\0b\26TP\0"
  169 
  170 /*
  171  * PP DMA control bits.
  172  */
  173 #define P_INT_PEND      L64854_INT_PEND /* interrupt pending */
  174 #define P_ERR_PEND      L64854_ERR_PEND /* error pending */
  175 #define P_DRAINING      L64854_DRAINING /* fifo draining */
  176 #define P_INT_EN        L64854_INT_EN   /* interrupt enable */
  177 #define P_INVALIDATE    L64854_INVALIDATE/* invalidate fifo */
  178 #define P_SLAVE_ERR     L64854_SLAVE_ERR/* slave access size error */
  179 #define P_RESET         L64854_RESET    /* reset PP */
  180 #define P_WRITE         L64854_WRITE    /* 1: xfer to memory */
  181 #define P_EN_DMA        L64854_EN_DMA   /* enable DMA transfers */
  182 #define P_reserved1     0x00001c00      /* */
  183 #define P_EN_CNT        0x00002000      /* enable counter */
  184 #define P_TC            0x00004000      /* terminal count */
  185 #define P_reserved2     0x00038000      /* */
  186 
  187 #define P_DIAG          0x00100000      /* ... */
  188 #define P_reserved3     0x00600000      /* */
  189 #define P_TCI_DIS       0x00800000      /* no interrupt on terminal count */
  190 #define P_EN_NEXT       0x01000000      /* enable DMA chaining */
  191 #define P_DMA_ON        0x02000000      /* DMA xfers enabled */
  192 #define P_A_LOADED      0x04000000      /* addr and byte count valid */
  193 #define P_NA_LOADED     0x08000000      /* next addr & count valid but not used */
  194 #define P_DEV_ID        L64854_DEVID    /* ID bits */
  195 
  196 #define PDMACSR_BITS    "\177\020"                              \
  197         "b\00INT\0b\01ERR\0f\02\02DRAINING\0b\04IEN\0"          \
  198         "b\06SLVERR\0b\07RST\0b\10WRITE\0b\11ENDMA\0"           \
  199         "b\15ENCNT\0b\16TC\0\b\24DIAG\0b\27TCIDIS\0"            \
  200         "b\30ENNXT\0b\031DMAON\0b\32ALOADED\0b\33NALOADED\0"

Cache object: 0ef0ffe6a6e8fe5b31a729b7dd67ed96


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.