Add the SiS "7007" OHCI IEEE 1394 controller.
[dragonfly.git] / sys / bus / firewire / fwohcireg.h
index 1fed943..9536c54 100644 (file)
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  * 
- * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.2.2.6 2003/04/28 03:29:18 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/fwohcireg.h,v 1.3 2003/11/15 21:05:33 dillon Exp $
+ * $FreeBSD: src/sys/dev/firewire/fwohcireg.h,v 1.15 2004/01/06 14:24:01 simokawa Exp $
+ * $DragonFly: src/sys/bus/firewire/fwohcireg.h,v 1.11 2004/07/16 12:37:02 asmodai Exp $
  *
  */
 #define                PCI_CBMEM               0x10
 
+#define                FW_VENDORID_NATSEMI     0x1000
 #define                FW_VENDORID_NEC         0x1033
+#define                FW_VENDORID_SIS         0x1039
 #define                FW_VENDORID_TI          0x104c
 #define                FW_VENDORID_SONY        0x104d
 #define                FW_VENDORID_VIA         0x1106
 #define                FW_VENDORID_RICOH       0x1180
 #define                FW_VENDORID_APPLE       0x106b
 #define                FW_VENDORID_LUCENT      0x11c1
+#define                FW_VENDORID_INTEL       0x8086
+#define                FW_VENDORID_ADAPTEC     0x9004
 
+#define                FW_DEVICE_CS4210        (0x000f << 16)
 #define                FW_DEVICE_UPD861        (0x0063 << 16)
 #define                FW_DEVICE_UPD871        (0x00ce << 16)
 #define                FW_DEVICE_UPD72870      (0x00cd << 16)
+#define                FW_DEVICE_UPD72873      (0x00e7 << 16)
 #define                FW_DEVICE_UPD72874      (0x00f2 << 16)
 #define                FW_DEVICE_TITSB22       (0x8009 << 16)
 #define                FW_DEVICE_TITSB23       (0x8019 << 16)
@@ -55,6 +61,8 @@
 #define                FW_DEVICE_TITSB43       (0x8021 << 16)
 #define                FW_DEVICE_TITSB43A      (0x8023 << 16)
 #define                FW_DEVICE_TITSB43AB23   (0x8024 << 16)
+#define                FW_DEVICE_TITSB82AA2    (0x8025 << 16)
+#define                FW_DEVICE_TITSB43AB21   (0x8026 << 16)
 #define                FW_DEVICE_TIPCI4410A    (0x8017 << 16)
 #define                FW_DEVICE_TIPCI4450     (0x8011 << 16)
 #define                FW_DEVICE_TIPCI4451     (0x8027 << 16)
 #define                FW_DEVICE_R5C552        (0x0552 << 16)
 #define                FW_DEVICE_PANGEA        (0x0030 << 16)
 #define                FW_DEVICE_UNINORTH      (0x0031 << 16)
+#define                FW_DEVICE_AIC5800       (0x5800 << 16)
 #define                FW_DEVICE_FW322         (0x5811 << 16)
+#define                FW_DEVICE_7007          (0x7007 << 16)
+#define                FW_DEVICE_82372FB       (0x7605 << 16)
 
 #define PCI_INTERFACE_OHCI     0x10
 
@@ -76,7 +87,7 @@
 #define                OHCI_MAX_DMA_CH         (0x4 + OHCI_DMA_ITCH + OHCI_DMA_IRCH)
 
 
-typedef volatile u_int32_t     fwohcireg_t;
+typedef u_int32_t      fwohcireg_t;
 
 /* for PCI */
 #if BYTE_ORDER == BIG_ENDIAN
@@ -94,12 +105,12 @@ typedef volatile u_int32_t         fwohcireg_t;
 struct fwohcidb {
        union {
                struct {
-                       volatile u_int32_t cmd;
-                       volatile u_int32_t addr;
-                       volatile u_int32_t depend;
-                       volatile u_int32_t res;
+                       u_int32_t cmd;
+                       u_int32_t addr;
+                       u_int32_t depend;
+                       u_int32_t res;
                } desc;
-               volatile u_int32_t immed[4];
+               u_int32_t immed[4];
        } db;
 #define OHCI_STATUS_SHIFT      16
 #define OHCI_COUNT_MASK                0xffff
@@ -312,14 +323,13 @@ struct ohci_registers {
 
        /*       0x400, 0x404, 0x408, 0x40c */
        /*       0x410, 0x404, 0x408, 0x40c */
-
        struct ohci_dma dma_irch[0x20];
 };
 
 struct fwohcidb_tr{
        STAILQ_ENTRY(fwohcidb_tr) link;
        struct fw_xfer *xfer;
-       volatile struct fwohcidb *db;
+       struct fwohcidb *db;
        bus_dmamap_t dma_map;
        caddr_t buf;
        bus_addr_t bus_addr;
@@ -334,8 +344,7 @@ struct fwohci_txpkthdr{
                u_int32_t ld[4];
                struct {
 #if BYTE_ORDER == BIG_ENDIAN
-                       u_int32_t :13,
-                                 spd:3,
+                       u_int32_t spd:16, /* XXX include reserved field */
                                  :8,
                                  tcode:4,
                                  :4;
@@ -343,8 +352,7 @@ struct fwohci_txpkthdr{
                        u_int32_t :4,
                                  tcode:4,
                                  :8,
-                                 spd:3,
-                                 :13;
+                                 spd:16; /* XXX include reserved fields */
 #endif
                }common;
                struct {