157c801f5SMatt Jacob /* $Id: ispreg.h,v 1.6 1999/02/09 01:09:35 mjacob Exp $ */ 257c801f5SMatt Jacob /* release_03_16_99 */ 36054c3f6SMatt Jacob /* 46054c3f6SMatt Jacob * Machine Independent (well, as best as possible) register 56054c3f6SMatt Jacob * definitions for Qlogic ISP SCSI adapters. 66054c3f6SMatt Jacob * 76054c3f6SMatt Jacob *--------------------------------------- 86054c3f6SMatt Jacob * Copyright (c) 1997 by Matthew Jacob 96054c3f6SMatt Jacob * NASA/Ames Research Center 106054c3f6SMatt Jacob * All rights reserved. 116054c3f6SMatt Jacob *--------------------------------------- 126054c3f6SMatt Jacob * Redistribution and use in source and binary forms, with or without 136054c3f6SMatt Jacob * modification, are permitted provided that the following conditions 146054c3f6SMatt Jacob * are met: 156054c3f6SMatt Jacob * 1. Redistributions of source code must retain the above copyright 166054c3f6SMatt Jacob * notice immediately at the beginning of the file, without modification, 176054c3f6SMatt Jacob * this list of conditions, and the following disclaimer. 186054c3f6SMatt Jacob * 2. Redistributions in binary form must reproduce the above copyright 196054c3f6SMatt Jacob * notice, this list of conditions and the following disclaimer in the 206054c3f6SMatt Jacob * documentation and/or other materials provided with the distribution. 216054c3f6SMatt Jacob * 3. The name of the author may not be used to endorse or promote products 226054c3f6SMatt Jacob * derived from this software without specific prior written permission. 236054c3f6SMatt Jacob * 246054c3f6SMatt Jacob * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 256054c3f6SMatt Jacob * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 266054c3f6SMatt Jacob * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 276054c3f6SMatt Jacob * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 286054c3f6SMatt Jacob * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 296054c3f6SMatt Jacob * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 306054c3f6SMatt Jacob * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 316054c3f6SMatt Jacob * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 326054c3f6SMatt Jacob * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 336054c3f6SMatt Jacob * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 346054c3f6SMatt Jacob * SUCH DAMAGE. 356054c3f6SMatt Jacob */ 366054c3f6SMatt Jacob #ifndef _ISPREG_H 376054c3f6SMatt Jacob #define _ISPREG_H 386054c3f6SMatt Jacob 396054c3f6SMatt Jacob /* 406054c3f6SMatt Jacob * Hardware definitions for the Qlogic ISP registers. 416054c3f6SMatt Jacob */ 426054c3f6SMatt Jacob 436054c3f6SMatt Jacob /* 446054c3f6SMatt Jacob * This defines types of access to various registers. 456054c3f6SMatt Jacob * 466054c3f6SMatt Jacob * R: Read Only 476054c3f6SMatt Jacob * W: Write Only 486054c3f6SMatt Jacob * RW: Read/Write 496054c3f6SMatt Jacob * 506054c3f6SMatt Jacob * R*, W*, RW*: Read Only, Write Only, Read/Write, but only 516054c3f6SMatt Jacob * if RISC processor in ISP is paused. 526054c3f6SMatt Jacob */ 536054c3f6SMatt Jacob 546054c3f6SMatt Jacob /* 556054c3f6SMatt Jacob * Offsets for various register blocks. 566054c3f6SMatt Jacob * 576054c3f6SMatt Jacob * Sad but true, different architectures have different offsets. 586054c3f6SMatt Jacob */ 596054c3f6SMatt Jacob 606054c3f6SMatt Jacob #define BIU_REGS_OFF 0x00 616054c3f6SMatt Jacob 626054c3f6SMatt Jacob #define PCI_MBOX_REGS_OFF 0x70 636054c3f6SMatt Jacob #define PCI_MBOX_REGS2100_OFF 0x10 646054c3f6SMatt Jacob #define SBUS_MBOX_REGS_OFF 0x80 656054c3f6SMatt Jacob 666054c3f6SMatt Jacob #define PCI_SXP_REGS_OFF 0x80 676054c3f6SMatt Jacob #define SBUS_SXP_REGS_OFF 0x200 686054c3f6SMatt Jacob 696054c3f6SMatt Jacob #define PCI_RISC_REGS_OFF 0x80 706054c3f6SMatt Jacob #define SBUS_RISC_REGS_OFF 0x400 716054c3f6SMatt Jacob 7257c801f5SMatt Jacob /* Bless me! Chip designers have putzed it again! */ 7357c801f5SMatt Jacob #define ISP1080_DMA_REGS_OFF 0x60 7457c801f5SMatt Jacob #define DMA_REGS_OFF 0x00 /* same as BIU block */ 7557c801f5SMatt Jacob 766054c3f6SMatt Jacob /* 776054c3f6SMatt Jacob * NB: The *_BLOCK definitions have no specific hardware meaning. 786054c3f6SMatt Jacob * They serve simply to note to the MD layer which block of 796054c3f6SMatt Jacob * registers offsets are being accessed. 806054c3f6SMatt Jacob */ 8157c801f5SMatt Jacob #define _NREG_BLKS 5 8257c801f5SMatt Jacob #define _BLK_REG_SHFT 13 8357c801f5SMatt Jacob #define _BLK_REG_MASK (7 << _BLK_REG_SHFT) 8457c801f5SMatt Jacob #define BIU_BLOCK (0 << _BLK_REG_SHFT) 8557c801f5SMatt Jacob #define MBOX_BLOCK (1 << _BLK_REG_SHFT) 8657c801f5SMatt Jacob #define SXP_BLOCK (2 << _BLK_REG_SHFT) 8757c801f5SMatt Jacob #define RISC_BLOCK (3 << _BLK_REG_SHFT) 8857c801f5SMatt Jacob #define DMA_BLOCK (4 << _BLK_REG_SHFT) 896054c3f6SMatt Jacob 906054c3f6SMatt Jacob /* 916054c3f6SMatt Jacob * Bus Interface Block Register Offsets 926054c3f6SMatt Jacob */ 9357c801f5SMatt Jacob 946054c3f6SMatt Jacob #define BIU_ID_LO BIU_BLOCK+0x0 /* R : Bus ID, Low */ 956054c3f6SMatt Jacob #define BIU2100_FLASH_ADDR BIU_BLOCK+0x0 966054c3f6SMatt Jacob #define BIU_ID_HI BIU_BLOCK+0x2 /* R : Bus ID, High */ 976054c3f6SMatt Jacob #define BIU2100_FLASH_DATA BIU_BLOCK+0x2 986054c3f6SMatt Jacob #define BIU_CONF0 BIU_BLOCK+0x4 /* R : Bus Configuration #0 */ 996054c3f6SMatt Jacob #define BIU_CONF1 BIU_BLOCK+0x6 /* R : Bus Configuration #1 */ 1006054c3f6SMatt Jacob #define BIU2100_CSR BIU_BLOCK+0x6 1016054c3f6SMatt Jacob #define BIU_ICR BIU_BLOCK+0x8 /* RW : Bus Interface Ctrl */ 1026054c3f6SMatt Jacob #define BIU_ISR BIU_BLOCK+0xA /* R : Bus Interface Status */ 1036054c3f6SMatt Jacob #define BIU_SEMA BIU_BLOCK+0xC /* RW : Bus Semaphore */ 1046054c3f6SMatt Jacob #define BIU_NVRAM BIU_BLOCK+0xE /* RW : Bus NVRAM */ 1056054c3f6SMatt Jacob #define DFIFO_COMMAND BIU_BLOCK+0x60 /* RW : Command FIFO Port */ 1066054c3f6SMatt Jacob #define RDMA2100_CONTROL DFIFO_COMMAND 1076054c3f6SMatt Jacob #define DFIFO_DATA BIU_BLOCK+0x62 /* RW : Data FIFO Port */ 1086054c3f6SMatt Jacob 1096054c3f6SMatt Jacob /* 11057c801f5SMatt Jacob * Putzed DMA register layouts. 11157c801f5SMatt Jacob */ 11257c801f5SMatt Jacob #define CDMA_CONF DMA_BLOCK+0x20 /* RW*: DMA Configuration */ 11357c801f5SMatt Jacob #define CDMA2100_CONTROL CDMA_CONF 11457c801f5SMatt Jacob #define CDMA_CONTROL DMA_BLOCK+0x22 /* RW*: DMA Control */ 11557c801f5SMatt Jacob #define CDMA_STATUS DMA_BLOCK+0x24 /* R : DMA Status */ 11657c801f5SMatt Jacob #define CDMA_FIFO_STS DMA_BLOCK+0x26 /* R : DMA FIFO Status */ 11757c801f5SMatt Jacob #define CDMA_COUNT DMA_BLOCK+0x28 /* RW*: DMA Transfer Count */ 11857c801f5SMatt Jacob #define CDMA_ADDR0 DMA_BLOCK+0x2C /* RW*: DMA Address, Word 0 */ 11957c801f5SMatt Jacob #define CDMA_ADDR1 DMA_BLOCK+0x2E /* RW*: DMA Address, Word 1 */ 12057c801f5SMatt Jacob #define CDMA_ADDR2 DMA_BLOCK+0x30 /* RW*: DMA Address, Word 2 */ 12157c801f5SMatt Jacob #define CDMA_ADDR3 DMA_BLOCK+0x32 /* RW*: DMA Address, Word 3 */ 12257c801f5SMatt Jacob 12357c801f5SMatt Jacob #define DDMA_CONF DMA_BLOCK+0x40 /* RW*: DMA Configuration */ 12457c801f5SMatt Jacob #define TDMA2100_CONTROL DDMA_CONF 12557c801f5SMatt Jacob #define DDMA_CONTROL DMA_BLOCK+0x42 /* RW*: DMA Control */ 12657c801f5SMatt Jacob #define DDMA_STATUS DMA_BLOCK+0x44 /* R : DMA Status */ 12757c801f5SMatt Jacob #define DDMA_FIFO_STS DMA_BLOCK+0x46 /* R : DMA FIFO Status */ 12857c801f5SMatt Jacob #define DDMA_COUNT_LO DMA_BLOCK+0x48 /* RW*: DMA Xfer Count, Low */ 12957c801f5SMatt Jacob #define DDMA_COUNT_HI DMA_BLOCK+0x4A /* RW*: DMA Xfer Count, High */ 13057c801f5SMatt Jacob #define DDMA_ADDR0 DMA_BLOCK+0x4C /* RW*: DMA Address, Word 0 */ 13157c801f5SMatt Jacob #define DDMA_ADDR1 DMA_BLOCK+0x4E /* RW*: DMA Address, Word 1 */ 13257c801f5SMatt Jacob /* these are for the 1040A cards */ 13357c801f5SMatt Jacob #define DDMA_ADDR2 DMA_BLOCK+0x50 /* RW*: DMA Address, Word 2 */ 13457c801f5SMatt Jacob #define DDMA_ADDR3 DMA_BLOCK+0x52 /* RW*: DMA Address, Word 3 */ 13557c801f5SMatt Jacob 13657c801f5SMatt Jacob 13757c801f5SMatt Jacob /* 1386054c3f6SMatt Jacob * Bus Interface Block Register Definitions 1396054c3f6SMatt Jacob */ 1406054c3f6SMatt Jacob /* BUS CONFIGURATION REGISTER #0 */ 1416054c3f6SMatt Jacob #define BIU_CONF0_HW_MASK 0x000F /* Hardware revision mask */ 1426054c3f6SMatt Jacob /* BUS CONFIGURATION REGISTER #1 */ 1436054c3f6SMatt Jacob 1446054c3f6SMatt Jacob #define BIU_SBUS_CONF1_PARITY 0x0100 /* Enable parity checking */ 1456054c3f6SMatt Jacob #define BIU_SBUS_CONF1_FCODE_MASK 0x00F0 /* Fcode cycle mask */ 1466054c3f6SMatt Jacob 1476054c3f6SMatt Jacob #define BIU_PCI_CONF1_FIFO_128 0x0040 /* 128 bytes FIFO threshold */ 1486054c3f6SMatt Jacob #define BIU_PCI_CONF1_FIFO_64 0x0030 /* 64 bytes FIFO threshold */ 1496054c3f6SMatt Jacob #define BIU_PCI_CONF1_FIFO_32 0x0020 /* 32 bytes FIFO threshold */ 1506054c3f6SMatt Jacob #define BIU_PCI_CONF1_FIFO_16 0x0010 /* 16 bytes FIFO threshold */ 1516054c3f6SMatt Jacob #define BIU_BURST_ENABLE 0x0004 /* Global enable Bus bursts */ 1526054c3f6SMatt Jacob #define BIU_SBUS_CONF1_FIFO_64 0x0003 /* 64 bytes FIFO threshold */ 1536054c3f6SMatt Jacob #define BIU_SBUS_CONF1_FIFO_32 0x0002 /* 32 bytes FIFO threshold */ 1546054c3f6SMatt Jacob #define BIU_SBUS_CONF1_FIFO_16 0x0001 /* 16 bytes FIFO threshold */ 1556054c3f6SMatt Jacob #define BIU_SBUS_CONF1_FIFO_8 0x0000 /* 8 bytes FIFO threshold */ 1566054c3f6SMatt Jacob #define BIU_SBUS_CONF1_BURST8 0x0008 /* Enable 8-byte bursts */ 1576054c3f6SMatt Jacob #define BIU_PCI_CONF1_SXP 0x0008 /* SXP register select */ 1586054c3f6SMatt Jacob 15957c801f5SMatt Jacob #define BIU_PCI1080_CONF1_SXP 0x0100 /* SXP bank select */ 16057c801f5SMatt Jacob #define BIU_PCI1080_CONF1_DMA 0x0300 /* DMA bank select */ 16157c801f5SMatt Jacob 1626054c3f6SMatt Jacob /* ISP2100 Bus Control/Status Register */ 1636054c3f6SMatt Jacob 1646054c3f6SMatt Jacob #define BIU2100_ICSR_REGBSEL 0x30 /* RW: register bank select */ 1656054c3f6SMatt Jacob #define BIU2100_RISC_REGS (0 << 4) /* RISC Regs */ 1666054c3f6SMatt Jacob #define BIU2100_FB_REGS (1 << 4) /* FrameBuffer Regs */ 1676054c3f6SMatt Jacob #define BIU2100_FPM0_REGS (2 << 4) /* FPM 0 Regs */ 1686054c3f6SMatt Jacob #define BIU2100_FPM1_REGS (3 << 4) /* FPM 1 Regs */ 1696054c3f6SMatt Jacob #define BIU2100_PCI64 0x04 /* R: 64 Bit PCI slot */ 1706054c3f6SMatt Jacob #define BIU2100_FLASH_ENABLE 0x02 /* RW: Enable Flash RAM */ 1716054c3f6SMatt Jacob #define BIU2100_SOFT_RESET 0x01 1726054c3f6SMatt Jacob /* SOFT RESET FOR ISP2100 is same bit, but in this register, not ICR */ 1736054c3f6SMatt Jacob 1746054c3f6SMatt Jacob 1756054c3f6SMatt Jacob /* BUS CONTROL REGISTER */ 1766054c3f6SMatt Jacob #define BIU_ICR_ENABLE_DMA_INT 0x0020 /* Enable DMA interrupts */ 1776054c3f6SMatt Jacob #define BIU_ICR_ENABLE_CDMA_INT 0x0010 /* Enable CDMA interrupts */ 1786054c3f6SMatt Jacob #define BIU_ICR_ENABLE_SXP_INT 0x0008 /* Enable SXP interrupts */ 1796054c3f6SMatt Jacob #define BIU_ICR_ENABLE_RISC_INT 0x0004 /* Enable Risc interrupts */ 1806054c3f6SMatt Jacob #define BIU_ICR_ENABLE_ALL_INTS 0x0002 /* Global enable all inter */ 1816054c3f6SMatt Jacob #define BIU_ICR_SOFT_RESET 0x0001 /* Soft Reset of ISP */ 1826054c3f6SMatt Jacob 1836054c3f6SMatt Jacob #define BIU2100_ICR_ENABLE_ALL_INTS 0x8000 1846054c3f6SMatt Jacob #define BIU2100_ICR_ENA_FPM_INT 0x0020 1856054c3f6SMatt Jacob #define BIU2100_ICR_ENA_FB_INT 0x0010 1866054c3f6SMatt Jacob #define BIU2100_ICR_ENA_RISC_INT 0x0008 1876054c3f6SMatt Jacob #define BIU2100_ICR_ENA_CDMA_INT 0x0004 1886054c3f6SMatt Jacob #define BIU2100_ICR_ENABLE_RXDMA_INT 0x0002 1896054c3f6SMatt Jacob #define BIU2100_ICR_ENABLE_TXDMA_INT 0x0001 1906054c3f6SMatt Jacob #define BIU2100_ICR_DISABLE_ALL_INTS 0x0000 1916054c3f6SMatt Jacob 1926054c3f6SMatt Jacob #define ENABLE_INTS(isp) (isp->isp_type & ISP_HA_SCSI)? \ 1936054c3f6SMatt Jacob ISP_WRITE(isp, BIU_ICR, BIU_ICR_ENABLE_RISC_INT | BIU_ICR_ENABLE_ALL_INTS) : \ 1946054c3f6SMatt Jacob ISP_WRITE(isp, BIU_ICR, BIU2100_ICR_ENA_RISC_INT | BIU2100_ICR_ENABLE_ALL_INTS) 1956054c3f6SMatt Jacob 19657c801f5SMatt Jacob #define INTS_ENABLED(isp) ((isp->isp_type & ISP_HA_SCSI)? \ 19757c801f5SMatt Jacob (ISP_READ(isp, BIU_ICR) & (BIU_ICR_ENABLE_RISC_INT|BIU_ICR_ENABLE_ALL_INTS)) :\ 19857c801f5SMatt Jacob (ISP_READ(isp, BIU_ICR) & \ 19957c801f5SMatt Jacob (BIU2100_ICR_ENA_RISC_INT|BIU2100_ICR_ENABLE_ALL_INTS))) 20057c801f5SMatt Jacob 2016054c3f6SMatt Jacob #define DISABLE_INTS(isp) ISP_WRITE(isp, BIU_ICR, 0) 2026054c3f6SMatt Jacob 2036054c3f6SMatt Jacob /* BUS STATUS REGISTER */ 2046054c3f6SMatt Jacob #define BIU_ISR_DMA_INT 0x0020 /* DMA interrupt pending */ 2056054c3f6SMatt Jacob #define BIU_ISR_CDMA_INT 0x0010 /* CDMA interrupt pending */ 2066054c3f6SMatt Jacob #define BIU_ISR_SXP_INT 0x0008 /* SXP interrupt pending */ 2076054c3f6SMatt Jacob #define BIU_ISR_RISC_INT 0x0004 /* Risc interrupt pending */ 2086054c3f6SMatt Jacob #define BIU_ISR_IPEND 0x0002 /* Global interrupt pending */ 2096054c3f6SMatt Jacob 2106054c3f6SMatt Jacob #define BIU2100_ISR_INT_PENDING 0x8000 /* Global interrupt pending */ 2116054c3f6SMatt Jacob #define BIU2100_ISR_FPM_INT 0x0020 /* FPM interrupt pending */ 2126054c3f6SMatt Jacob #define BIU2100_ISR_FB_INT 0x0010 /* FB interrupt pending */ 2136054c3f6SMatt Jacob #define BIU2100_ISR_RISC_INT 0x0008 /* Risc interrupt pending */ 2146054c3f6SMatt Jacob #define BIU2100_ISR_CDMA_INT 0x0004 /* CDMA interrupt pending */ 2156054c3f6SMatt Jacob #define BIU2100_ISR_RXDMA_INT_PENDING 0x0002 /* Global interrupt pending */ 2166054c3f6SMatt Jacob #define BIU2100_ISR_TXDMA_INT_PENDING 0x0001 /* Global interrupt pending */ 2176054c3f6SMatt Jacob 2186054c3f6SMatt Jacob 2196054c3f6SMatt Jacob /* BUS SEMAPHORE REGISTER */ 2206054c3f6SMatt Jacob #define BIU_SEMA_STATUS 0x0002 /* Semaphore Status Bit */ 2216054c3f6SMatt Jacob #define BIU_SEMA_LOCK 0x0001 /* Semaphore Lock Bit */ 2226054c3f6SMatt Jacob 223478f8a96SJustin T. Gibbs /* NVRAM SEMAPHORE REGISTER */ 224478f8a96SJustin T. Gibbs #define BIU_NVRAM_CLOCK 0x0001 225478f8a96SJustin T. Gibbs #define BIU_NVRAM_SELECT 0x0002 226478f8a96SJustin T. Gibbs #define BIU_NVRAM_DATAOUT 0x0004 227478f8a96SJustin T. Gibbs #define BIU_NVRAM_DATAIN 0x0008 228478f8a96SJustin T. Gibbs #define ISP_NVRAM_READ 6 2296054c3f6SMatt Jacob 2306054c3f6SMatt Jacob /* COMNMAND && DATA DMA CONFIGURATION REGISTER */ 2316054c3f6SMatt Jacob #define DMA_ENABLE_SXP_DMA 0x0008 /* Enable SXP to DMA Data */ 2326054c3f6SMatt Jacob #define DMA_ENABLE_INTS 0x0004 /* Enable interrupts to RISC */ 2336054c3f6SMatt Jacob #define DMA_ENABLE_BURST 0x0002 /* Enable Bus burst trans */ 2346054c3f6SMatt Jacob #define DMA_DMA_DIRECTION 0x0001 /* 2356054c3f6SMatt Jacob * Set DMA direction: 2366054c3f6SMatt Jacob * 0 - DMA FIFO to host 2376054c3f6SMatt Jacob * 1 - Host to DMA FIFO 2386054c3f6SMatt Jacob */ 2396054c3f6SMatt Jacob 2406054c3f6SMatt Jacob /* COMMAND && DATA DMA CONTROL REGISTER */ 2416054c3f6SMatt Jacob #define DMA_CNTRL_SUSPEND_CHAN 0x0010 /* Suspend DMA transfer */ 2426054c3f6SMatt Jacob #define DMA_CNTRL_CLEAR_CHAN 0x0008 /* 2436054c3f6SMatt Jacob * Clear FIFO and DMA Channel, 2446054c3f6SMatt Jacob * reset DMA registers 2456054c3f6SMatt Jacob */ 2466054c3f6SMatt Jacob #define DMA_CNTRL_CLEAR_FIFO 0x0004 /* Clear DMA FIFO */ 2476054c3f6SMatt Jacob #define DMA_CNTRL_RESET_INT 0x0002 /* Clear DMA interrupt */ 2486054c3f6SMatt Jacob #define DMA_CNTRL_STROBE 0x0001 /* Start DMA transfer */ 2496054c3f6SMatt Jacob 2506054c3f6SMatt Jacob /* 2516054c3f6SMatt Jacob * Variants of same for 2100 2526054c3f6SMatt Jacob */ 2536054c3f6SMatt Jacob #define DMA_CNTRL2100_CLEAR_CHAN 0x0004 2546054c3f6SMatt Jacob #define DMA_CNTRL2100_RESET_INT 0x0002 2556054c3f6SMatt Jacob 2566054c3f6SMatt Jacob 2576054c3f6SMatt Jacob 2586054c3f6SMatt Jacob /* DMA STATUS REGISTER */ 2596054c3f6SMatt Jacob #define DMA_SBUS_STATUS_PIPE_MASK 0x00C0 /* DMA Pipeline status mask */ 2606054c3f6SMatt Jacob #define DMA_SBUS_STATUS_CHAN_MASK 0x0030 /* Channel status mask */ 2616054c3f6SMatt Jacob #define DMA_SBUS_STATUS_BUS_PARITY 0x0008 /* Parity Error on bus */ 2626054c3f6SMatt Jacob #define DMA_SBUS_STATUS_BUS_ERR 0x0004 /* Error Detected on bus */ 2636054c3f6SMatt Jacob #define DMA_SBUS_STATUS_TERM_COUNT 0x0002 /* DMA Transfer Completed */ 2646054c3f6SMatt Jacob #define DMA_SBUS_STATUS_INTERRUPT 0x0001 /* Enable DMA channel inter */ 2656054c3f6SMatt Jacob 2666054c3f6SMatt Jacob #define DMA_PCI_STATUS_INTERRUPT 0x8000 /* Enable DMA channel inter */ 2676054c3f6SMatt Jacob #define DMA_PCI_STATUS_RETRY_STAT 0x4000 /* Retry status */ 2686054c3f6SMatt Jacob #define DMA_PCI_STATUS_CHAN_MASK 0x3000 /* Channel status mask */ 2696054c3f6SMatt Jacob #define DMA_PCI_STATUS_FIFO_OVR 0x0100 /* DMA FIFO overrun cond */ 2706054c3f6SMatt Jacob #define DMA_PCI_STATUS_FIFO_UDR 0x0080 /* DMA FIFO underrun cond */ 2716054c3f6SMatt Jacob #define DMA_PCI_STATUS_BUS_ERR 0x0040 /* Error Detected on bus */ 2726054c3f6SMatt Jacob #define DMA_PCI_STATUS_BUS_PARITY 0x0020 /* Parity Error on bus */ 2736054c3f6SMatt Jacob #define DMA_PCI_STATUS_CLR_PEND 0x0010 /* DMA clear pending */ 2746054c3f6SMatt Jacob #define DMA_PCI_STATUS_TERM_COUNT 0x0008 /* DMA Transfer Completed */ 2756054c3f6SMatt Jacob #define DMA_PCI_STATUS_DMA_SUSP 0x0004 /* DMA suspended */ 2766054c3f6SMatt Jacob #define DMA_PCI_STATUS_PIPE_MASK 0x0003 /* DMA Pipeline status mask */ 2776054c3f6SMatt Jacob 2786054c3f6SMatt Jacob /* DMA Status Register, pipeline status bits */ 2796054c3f6SMatt Jacob #define DMA_SBUS_PIPE_FULL 0x00C0 /* Both pipeline stages full */ 2806054c3f6SMatt Jacob #define DMA_SBUS_PIPE_OVERRUN 0x0080 /* Pipeline overrun */ 2816054c3f6SMatt Jacob #define DMA_SBUS_PIPE_STAGE1 0x0040 /* 2826054c3f6SMatt Jacob * Pipeline stage 1 Loaded, 2836054c3f6SMatt Jacob * stage 2 empty 2846054c3f6SMatt Jacob */ 2856054c3f6SMatt Jacob #define DMA_PCI_PIPE_FULL 0x0003 /* Both pipeline stages full */ 2866054c3f6SMatt Jacob #define DMA_PCI_PIPE_OVERRUN 0x0002 /* Pipeline overrun */ 2876054c3f6SMatt Jacob #define DMA_PCI_PIPE_STAGE1 0x0001 /* 2886054c3f6SMatt Jacob * Pipeline stage 1 Loaded, 2896054c3f6SMatt Jacob * stage 2 empty 2906054c3f6SMatt Jacob */ 2916054c3f6SMatt Jacob #define DMA_PIPE_EMPTY 0x0000 /* All pipeline stages empty */ 2926054c3f6SMatt Jacob 2936054c3f6SMatt Jacob /* DMA Status Register, channel status bits */ 2946054c3f6SMatt Jacob #define DMA_SBUS_CHAN_SUSPEND 0x0030 /* Channel error or suspended */ 2956054c3f6SMatt Jacob #define DMA_SBUS_CHAN_TRANSFER 0x0020 /* Chan transfer in progress */ 2966054c3f6SMatt Jacob #define DMA_SBUS_CHAN_ACTIVE 0x0010 /* Chan trans to host active */ 2976054c3f6SMatt Jacob #define DMA_PCI_CHAN_TRANSFER 0x3000 /* Chan transfer in progress */ 2986054c3f6SMatt Jacob #define DMA_PCI_CHAN_SUSPEND 0x2000 /* Channel error or suspended */ 2996054c3f6SMatt Jacob #define DMA_PCI_CHAN_ACTIVE 0x1000 /* Chan trans to host active */ 3006054c3f6SMatt Jacob #define ISP_DMA_CHAN_IDLE 0x0000 /* Chan idle (normal comp) */ 3016054c3f6SMatt Jacob 3026054c3f6SMatt Jacob 3036054c3f6SMatt Jacob /* DMA FIFO STATUS REGISTER */ 3046054c3f6SMatt Jacob #define DMA_FIFO_STATUS_OVERRUN 0x0200 /* FIFO Overrun Condition */ 3056054c3f6SMatt Jacob #define DMA_FIFO_STATUS_UNDERRUN 0x0100 /* FIFO Underrun Condition */ 3066054c3f6SMatt Jacob #define DMA_FIFO_SBUS_COUNT_MASK 0x007F /* FIFO Byte count mask */ 3076054c3f6SMatt Jacob #define DMA_FIFO_PCI_COUNT_MASK 0x00FF /* FIFO Byte count mask */ 3086054c3f6SMatt Jacob 3096054c3f6SMatt Jacob /* 3106054c3f6SMatt Jacob * Mailbox Block Register Offsets 3116054c3f6SMatt Jacob */ 3126054c3f6SMatt Jacob 3136054c3f6SMatt Jacob #define INMAILBOX0 MBOX_BLOCK+0x0 3146054c3f6SMatt Jacob #define INMAILBOX1 MBOX_BLOCK+0x2 3156054c3f6SMatt Jacob #define INMAILBOX2 MBOX_BLOCK+0x4 3166054c3f6SMatt Jacob #define INMAILBOX3 MBOX_BLOCK+0x6 3176054c3f6SMatt Jacob #define INMAILBOX4 MBOX_BLOCK+0x8 3186054c3f6SMatt Jacob #define INMAILBOX5 MBOX_BLOCK+0xA 3196054c3f6SMatt Jacob #define INMAILBOX6 MBOX_BLOCK+0xC 3206054c3f6SMatt Jacob #define INMAILBOX7 MBOX_BLOCK+0xE 3216054c3f6SMatt Jacob 3226054c3f6SMatt Jacob #define OUTMAILBOX0 MBOX_BLOCK+0x0 3236054c3f6SMatt Jacob #define OUTMAILBOX1 MBOX_BLOCK+0x2 3246054c3f6SMatt Jacob #define OUTMAILBOX2 MBOX_BLOCK+0x4 3256054c3f6SMatt Jacob #define OUTMAILBOX3 MBOX_BLOCK+0x6 3266054c3f6SMatt Jacob #define OUTMAILBOX4 MBOX_BLOCK+0x8 3276054c3f6SMatt Jacob #define OUTMAILBOX5 MBOX_BLOCK+0xA 3286054c3f6SMatt Jacob #define OUTMAILBOX6 MBOX_BLOCK+0xC 3296054c3f6SMatt Jacob #define OUTMAILBOX7 MBOX_BLOCK+0xE 3306054c3f6SMatt Jacob 3316054c3f6SMatt Jacob #define OMBOX_OFFN(n) (MBOX_BLOCK + (n * 2)) 3326054c3f6SMatt Jacob #define NMBOX(isp) \ 3336054c3f6SMatt Jacob (((((isp)->isp_type & ISP_HA_SCSI) >= ISP_HA_SCSI_1040A) || \ 3346054c3f6SMatt Jacob ((isp)->isp_type & ISP_HA_FC))? 8 : 6) 3356054c3f6SMatt Jacob 3366054c3f6SMatt Jacob /* 3376054c3f6SMatt Jacob * SXP Block Register Offsets 3386054c3f6SMatt Jacob */ 3396054c3f6SMatt Jacob #define SXP_PART_ID SXP_BLOCK+0x0 /* R : Part ID Code */ 3406054c3f6SMatt Jacob #define SXP_CONFIG1 SXP_BLOCK+0x2 /* RW*: Configuration Reg #1 */ 3416054c3f6SMatt Jacob #define SXP_CONFIG2 SXP_BLOCK+0x4 /* RW*: Configuration Reg #2 */ 3426054c3f6SMatt Jacob #define SXP_CONFIG3 SXP_BLOCK+0x6 /* RW*: Configuration Reg #2 */ 3436054c3f6SMatt Jacob #define SXP_INSTRUCTION SXP_BLOCK+0xC /* RW*: Instruction Pointer */ 3446054c3f6SMatt Jacob #define SXP_RETURN_ADDR SXP_BLOCK+0x10 /* RW*: Return Address */ 3456054c3f6SMatt Jacob #define SXP_COMMAND SXP_BLOCK+0x14 /* RW*: Command */ 3466054c3f6SMatt Jacob #define SXP_INTERRUPT SXP_BLOCK+0x18 /* R : Interrupt */ 3476054c3f6SMatt Jacob #define SXP_SEQUENCE SXP_BLOCK+0x1C /* RW*: Sequence */ 3486054c3f6SMatt Jacob #define SXP_GROSS_ERR SXP_BLOCK+0x1E /* R : Gross Error */ 3496054c3f6SMatt Jacob #define SXP_EXCEPTION SXP_BLOCK+0x20 /* RW*: Exception Enable */ 3506054c3f6SMatt Jacob #define SXP_OVERRIDE SXP_BLOCK+0x24 /* RW*: Override */ 3516054c3f6SMatt Jacob #define SXP_LITERAL_BASE SXP_BLOCK+0x28 /* RW*: Literal Base */ 3526054c3f6SMatt Jacob #define SXP_USER_FLAGS SXP_BLOCK+0x2C /* RW*: User Flags */ 3536054c3f6SMatt Jacob #define SXP_USER_EXCEPT SXP_BLOCK+0x30 /* RW*: User Exception */ 3546054c3f6SMatt Jacob #define SXP_BREAKPOINT SXP_BLOCK+0x34 /* RW*: Breakpoint */ 3556054c3f6SMatt Jacob #define SXP_SCSI_ID SXP_BLOCK+0x40 /* RW*: SCSI ID */ 3566054c3f6SMatt Jacob #define SXP_DEV_CONFIG1 SXP_BLOCK+0x42 /* RW*: Device Config Reg #1 */ 3576054c3f6SMatt Jacob #define SXP_DEV_CONFIG2 SXP_BLOCK+0x44 /* RW*: Device Config Reg #2 */ 3586054c3f6SMatt Jacob #define SXP_PHASE_POINTER SXP_BLOCK+0x48 /* RW*: SCSI Phase Pointer */ 3596054c3f6SMatt Jacob #define SXP_BUF_POINTER SXP_BLOCK+0x4C /* RW*: SCSI Buffer Pointer */ 3606054c3f6SMatt Jacob #define SXP_BUF_COUNTER SXP_BLOCK+0x50 /* RW*: SCSI Buffer Counter */ 3616054c3f6SMatt Jacob #define SXP_BUFFER SXP_BLOCK+0x52 /* RW*: SCSI Buffer */ 3626054c3f6SMatt Jacob #define SXP_BUF_BYTE SXP_BLOCK+0x54 /* RW*: SCSI Buffer Byte */ 3636054c3f6SMatt Jacob #define SXP_BUF_WORD SXP_BLOCK+0x56 /* RW*: SCSI Buffer Word */ 3646054c3f6SMatt Jacob #define SXP_BUF_WORD_TRAN SXP_BLOCK+0x58 /* RW*: SCSI Buffer Wd xlate */ 3656054c3f6SMatt Jacob #define SXP_FIFO SXP_BLOCK+0x5A /* RW*: SCSI FIFO */ 3666054c3f6SMatt Jacob #define SXP_FIFO_STATUS SXP_BLOCK+0x5C /* RW*: SCSI FIFO Status */ 3676054c3f6SMatt Jacob #define SXP_FIFO_TOP SXP_BLOCK+0x5E /* RW*: SCSI FIFO Top Resid */ 3686054c3f6SMatt Jacob #define SXP_FIFO_BOTTOM SXP_BLOCK+0x60 /* RW*: SCSI FIFO Bot Resid */ 3696054c3f6SMatt Jacob #define SXP_TRAN_REG SXP_BLOCK+0x64 /* RW*: SCSI Transferr Reg */ 3706054c3f6SMatt Jacob #define SXP_TRAN_COUNT_LO SXP_BLOCK+0x68 /* RW*: SCSI Trans Count */ 3716054c3f6SMatt Jacob #define SXP_TRAN_COUNT_HI SXP_BLOCK+0x6A /* RW*: SCSI Trans Count */ 3726054c3f6SMatt Jacob #define SXP_TRAN_COUNTER_LO SXP_BLOCK+0x6C /* RW*: SCSI Trans Counter */ 3736054c3f6SMatt Jacob #define SXP_TRAN_COUNTER_HI SXP_BLOCK+0x6E /* RW*: SCSI Trans Counter */ 3746054c3f6SMatt Jacob #define SXP_ARB_DATA SXP_BLOCK+0x70 /* R : SCSI Arb Data */ 3756054c3f6SMatt Jacob #define SXP_PINS_CONTROL SXP_BLOCK+0x72 /* RW*: SCSI Control Pins */ 3766054c3f6SMatt Jacob #define SXP_PINS_DATA SXP_BLOCK+0x74 /* RW*: SCSI Data Pins */ 3776054c3f6SMatt Jacob #define SXP_PINS_DIFF SXP_BLOCK+0x76 /* RW*: SCSI Diff Pins */ 3786054c3f6SMatt Jacob 3796054c3f6SMatt Jacob 3806054c3f6SMatt Jacob /* SXP CONF1 REGISTER */ 3816054c3f6SMatt Jacob #define SXP_CONF1_ASYNCH_SETUP 0xF000 /* Asynchronous setup time */ 3826054c3f6SMatt Jacob #define SXP_CONF1_SELECTION_UNIT 0x0000 /* Selection time unit */ 3836054c3f6SMatt Jacob #define SXP_CONF1_SELECTION_TIMEOUT 0x0600 /* Selection timeout */ 3846054c3f6SMatt Jacob #define SXP_CONF1_CLOCK_FACTOR 0x00E0 /* Clock factor */ 3856054c3f6SMatt Jacob #define SXP_CONF1_SCSI_ID 0x000F /* SCSI id */ 3866054c3f6SMatt Jacob 3876054c3f6SMatt Jacob /* SXP CONF2 REGISTER */ 3886054c3f6SMatt Jacob #define SXP_CONF2_DISABLE_FILTER 0x0040 /* Disable SCSI rec filters */ 3896054c3f6SMatt Jacob #define SXP_CONF2_REQ_ACK_PULLUPS 0x0020 /* Enable req/ack pullups */ 3906054c3f6SMatt Jacob #define SXP_CONF2_DATA_PULLUPS 0x0010 /* Enable data pullups */ 3916054c3f6SMatt Jacob #define SXP_CONF2_CONFIG_AUTOLOAD 0x0008 /* Enable dev conf auto-load */ 3926054c3f6SMatt Jacob #define SXP_CONF2_RESELECT 0x0002 /* Enable reselection */ 3936054c3f6SMatt Jacob #define SXP_CONF2_SELECT 0x0001 /* Enable selection */ 3946054c3f6SMatt Jacob 3956054c3f6SMatt Jacob /* SXP INTERRUPT REGISTER */ 3966054c3f6SMatt Jacob #define SXP_INT_PARITY_ERR 0x8000 /* Parity error detected */ 3976054c3f6SMatt Jacob #define SXP_INT_GROSS_ERR 0x4000 /* Gross error detected */ 3986054c3f6SMatt Jacob #define SXP_INT_FUNCTION_ABORT 0x2000 /* Last cmd aborted */ 3996054c3f6SMatt Jacob #define SXP_INT_CONDITION_FAILED 0x1000 /* Last cond failed test */ 4006054c3f6SMatt Jacob #define SXP_INT_FIFO_EMPTY 0x0800 /* SCSI FIFO is empty */ 4016054c3f6SMatt Jacob #define SXP_INT_BUF_COUNTER_ZERO 0x0400 /* SCSI buf count == zero */ 4026054c3f6SMatt Jacob #define SXP_INT_XFER_ZERO 0x0200 /* SCSI trans count == zero */ 4036054c3f6SMatt Jacob #define SXP_INT_INT_PENDING 0x0080 /* SXP interrupt pending */ 4046054c3f6SMatt Jacob #define SXP_INT_CMD_RUNNING 0x0040 /* SXP is running a command */ 4056054c3f6SMatt Jacob #define SXP_INT_INT_RETURN_CODE 0x000F /* Interrupt return code */ 4066054c3f6SMatt Jacob 4076054c3f6SMatt Jacob 4086054c3f6SMatt Jacob /* SXP GROSS ERROR REGISTER */ 4096054c3f6SMatt Jacob #define SXP_GROSS_OFFSET_RESID 0x0040 /* Req/Ack offset not zero */ 4106054c3f6SMatt Jacob #define SXP_GROSS_OFFSET_UNDERFLOW 0x0020 /* Req/Ack offset underflow */ 4116054c3f6SMatt Jacob #define SXP_GROSS_OFFSET_OVERFLOW 0x0010 /* Req/Ack offset overflow */ 4126054c3f6SMatt Jacob #define SXP_GROSS_FIFO_UNDERFLOW 0x0008 /* SCSI FIFO underflow */ 4136054c3f6SMatt Jacob #define SXP_GROSS_FIFO_OVERFLOW 0x0004 /* SCSI FIFO overflow */ 4146054c3f6SMatt Jacob #define SXP_GROSS_WRITE_ERR 0x0002 /* SXP and RISC wrote to reg */ 4156054c3f6SMatt Jacob #define SXP_GROSS_ILLEGAL_INST 0x0001 /* Bad inst loaded into SXP */ 4166054c3f6SMatt Jacob 4176054c3f6SMatt Jacob /* SXP EXCEPTION REGISTER */ 4186054c3f6SMatt Jacob #define SXP_EXCEPT_USER_0 0x8000 /* Enable user exception #0 */ 4196054c3f6SMatt Jacob #define SXP_EXCEPT_USER_1 0x4000 /* Enable user exception #1 */ 4206054c3f6SMatt Jacob #define PCI_SXP_EXCEPT_SCAM 0x0400 /* SCAM Selection enable */ 4216054c3f6SMatt Jacob #define SXP_EXCEPT_BUS_FREE 0x0200 /* Enable Bus Free det */ 4226054c3f6SMatt Jacob #define SXP_EXCEPT_TARGET_ATN 0x0100 /* Enable TGT mode atten det */ 4236054c3f6SMatt Jacob #define SXP_EXCEPT_RESELECTED 0x0080 /* Enable ReSEL exc handling */ 4246054c3f6SMatt Jacob #define SXP_EXCEPT_SELECTED 0x0040 /* Enable SEL exc handling */ 4256054c3f6SMatt Jacob #define SXP_EXCEPT_ARBITRATION 0x0020 /* Enable ARB exc handling */ 4266054c3f6SMatt Jacob #define SXP_EXCEPT_GROSS_ERR 0x0010 /* Enable gross error except */ 4276054c3f6SMatt Jacob #define SXP_EXCEPT_BUS_RESET 0x0008 /* Enable Bus Reset except */ 4286054c3f6SMatt Jacob 4296054c3f6SMatt Jacob /* SXP OVERRIDE REGISTER */ 4306054c3f6SMatt Jacob #define SXP_ORIDE_EXT_TRIGGER 0x8000 /* Enable external trigger */ 4316054c3f6SMatt Jacob #define SXP_ORIDE_STEP 0x4000 /* Enable single step mode */ 4326054c3f6SMatt Jacob #define SXP_ORIDE_BREAKPOINT 0x2000 /* Enable breakpoint reg */ 4336054c3f6SMatt Jacob #define SXP_ORIDE_PIN_WRITE 0x1000 /* Enable write to SCSI pins */ 4346054c3f6SMatt Jacob #define SXP_ORIDE_FORCE_OUTPUTS 0x0800 /* Force SCSI outputs on */ 4356054c3f6SMatt Jacob #define SXP_ORIDE_LOOPBACK 0x0400 /* Enable SCSI loopback mode */ 4366054c3f6SMatt Jacob #define SXP_ORIDE_PARITY_TEST 0x0200 /* Enable parity test mode */ 4376054c3f6SMatt Jacob #define SXP_ORIDE_TRISTATE_ENA_PINS 0x0100 /* Tristate SCSI enable pins */ 4386054c3f6SMatt Jacob #define SXP_ORIDE_TRISTATE_PINS 0x0080 /* Tristate SCSI pins */ 4396054c3f6SMatt Jacob #define SXP_ORIDE_FIFO_RESET 0x0008 /* Reset SCSI FIFO */ 4406054c3f6SMatt Jacob #define SXP_ORIDE_CMD_TERMINATE 0x0004 /* Terminate cur SXP com */ 4416054c3f6SMatt Jacob #define SXP_ORIDE_RESET_REG 0x0002 /* Reset SXP registers */ 4426054c3f6SMatt Jacob #define SXP_ORIDE_RESET_MODULE 0x0001 /* Reset SXP module */ 4436054c3f6SMatt Jacob 4446054c3f6SMatt Jacob /* SXP COMMANDS */ 4456054c3f6SMatt Jacob #define SXP_RESET_BUS_CMD 0x300b 4466054c3f6SMatt Jacob 4476054c3f6SMatt Jacob /* SXP SCSI ID REGISTER */ 4486054c3f6SMatt Jacob #define SXP_SELECTING_ID 0x0F00 /* (Re)Selecting id */ 4496054c3f6SMatt Jacob #define SXP_SELECT_ID 0x000F /* Select id */ 4506054c3f6SMatt Jacob 4516054c3f6SMatt Jacob /* SXP DEV CONFIG1 REGISTER */ 4526054c3f6SMatt Jacob #define SXP_DCONF1_SYNC_HOLD 0x7000 /* Synchronous data hold */ 4536054c3f6SMatt Jacob #define SXP_DCONF1_SYNC_SETUP 0x0F00 /* Synchronous data setup */ 4546054c3f6SMatt Jacob #define SXP_DCONF1_SYNC_OFFSET 0x000F /* Synchronous data offset */ 4556054c3f6SMatt Jacob 4566054c3f6SMatt Jacob 4576054c3f6SMatt Jacob /* SXP DEV CONFIG2 REGISTER */ 4586054c3f6SMatt Jacob #define SXP_DCONF2_FLAGS_MASK 0xF000 /* Device flags */ 4596054c3f6SMatt Jacob #define SXP_DCONF2_WIDE 0x0400 /* Enable wide SCSI */ 4606054c3f6SMatt Jacob #define SXP_DCONF2_PARITY 0x0200 /* Enable parity checking */ 4616054c3f6SMatt Jacob #define SXP_DCONF2_BLOCK_MODE 0x0100 /* Enable blk mode xfr count */ 4626054c3f6SMatt Jacob #define SXP_DCONF2_ASSERTION_MASK 0x0007 /* Assersion period mask */ 4636054c3f6SMatt Jacob 4646054c3f6SMatt Jacob 4656054c3f6SMatt Jacob /* SXP PHASE POINTER REGISTER */ 4666054c3f6SMatt Jacob #define SXP_PHASE_STATUS_PTR 0x1000 /* Status buffer offset */ 4676054c3f6SMatt Jacob #define SXP_PHASE_MSG_IN_PTR 0x0700 /* Msg in buffer offset */ 4686054c3f6SMatt Jacob #define SXP_PHASE_COM_PTR 0x00F0 /* Command buffer offset */ 4696054c3f6SMatt Jacob #define SXP_PHASE_MSG_OUT_PTR 0x0007 /* Msg out buffer offset */ 4706054c3f6SMatt Jacob 4716054c3f6SMatt Jacob 4726054c3f6SMatt Jacob /* SXP FIFO STATUS REGISTER */ 4736054c3f6SMatt Jacob #define SXP_FIFO_TOP_RESID 0x8000 /* Top residue reg full */ 4746054c3f6SMatt Jacob #define SXP_FIFO_ACK_RESID 0x4000 /* Wide transfers odd resid */ 4756054c3f6SMatt Jacob #define SXP_FIFO_COUNT_MASK 0x001C /* Words in SXP FIFO */ 4766054c3f6SMatt Jacob #define SXP_FIFO_BOTTOM_RESID 0x0001 /* Bottom residue reg full */ 4776054c3f6SMatt Jacob 4786054c3f6SMatt Jacob 4796054c3f6SMatt Jacob /* SXP CONTROL PINS REGISTER */ 4806054c3f6SMatt Jacob #define SXP_PINS_CON_PHASE 0x8000 /* Scsi phase valid */ 4816054c3f6SMatt Jacob #define SXP_PINS_CON_PARITY_HI 0x0400 /* Parity pin */ 4826054c3f6SMatt Jacob #define SXP_PINS_CON_PARITY_LO 0x0200 /* Parity pin */ 4836054c3f6SMatt Jacob #define SXP_PINS_CON_REQ 0x0100 /* SCSI bus REQUEST */ 4846054c3f6SMatt Jacob #define SXP_PINS_CON_ACK 0x0080 /* SCSI bus ACKNOWLEDGE */ 4856054c3f6SMatt Jacob #define SXP_PINS_CON_RST 0x0040 /* SCSI bus RESET */ 4866054c3f6SMatt Jacob #define SXP_PINS_CON_BSY 0x0020 /* SCSI bus BUSY */ 4876054c3f6SMatt Jacob #define SXP_PINS_CON_SEL 0x0010 /* SCSI bus SELECT */ 4886054c3f6SMatt Jacob #define SXP_PINS_CON_ATN 0x0008 /* SCSI bus ATTENTION */ 4896054c3f6SMatt Jacob #define SXP_PINS_CON_MSG 0x0004 /* SCSI bus MESSAGE */ 4906054c3f6SMatt Jacob #define SXP_PINS_CON_CD 0x0002 /* SCSI bus COMMAND */ 4916054c3f6SMatt Jacob #define SXP_PINS_CON_IO 0x0001 /* SCSI bus INPUT */ 4926054c3f6SMatt Jacob 4936054c3f6SMatt Jacob /* 4946054c3f6SMatt Jacob * Set the hold time for the SCSI Bus Reset to be 250 ms 4956054c3f6SMatt Jacob */ 4966054c3f6SMatt Jacob #define SXP_SCSI_BUS_RESET_HOLD_TIME 250 4976054c3f6SMatt Jacob 4986054c3f6SMatt Jacob /* SXP DIFF PINS REGISTER */ 4996054c3f6SMatt Jacob #define SXP_PINS_DIFF_SENSE 0x0200 /* DIFFSENS sig on SCSI bus */ 5006054c3f6SMatt Jacob #define SXP_PINS_DIFF_MODE 0x0100 /* DIFFM signal */ 5016054c3f6SMatt Jacob #define SXP_PINS_DIFF_ENABLE_OUTPUT 0x0080 /* Enable SXP SCSI data drv */ 5026054c3f6SMatt Jacob #define SXP_PINS_DIFF_PINS_MASK 0x007C /* Differential control pins */ 5036054c3f6SMatt Jacob #define SXP_PINS_DIFF_TARGET 0x0002 /* Enable SXP target mode */ 5046054c3f6SMatt Jacob #define SXP_PINS_DIFF_INITIATOR 0x0001 /* Enable SXP initiator mode */ 5056054c3f6SMatt Jacob 5066054c3f6SMatt Jacob /* 5076054c3f6SMatt Jacob * RISC and Host Command and Control Block Register Offsets 5086054c3f6SMatt Jacob */ 5096054c3f6SMatt Jacob 5106054c3f6SMatt Jacob #define RISC_ACC RISC_BLOCK+0x0 /* RW*: Accumulator */ 5116054c3f6SMatt Jacob #define RISC_R1 RISC_BLOCK+0x2 /* RW*: GP Reg R1 */ 5126054c3f6SMatt Jacob #define RISC_R2 RISC_BLOCK+0x4 /* RW*: GP Reg R2 */ 5136054c3f6SMatt Jacob #define RISC_R3 RISC_BLOCK+0x6 /* RW*: GP Reg R3 */ 5146054c3f6SMatt Jacob #define RISC_R4 RISC_BLOCK+0x8 /* RW*: GP Reg R4 */ 5156054c3f6SMatt Jacob #define RISC_R5 RISC_BLOCK+0xA /* RW*: GP Reg R5 */ 5166054c3f6SMatt Jacob #define RISC_R6 RISC_BLOCK+0xC /* RW*: GP Reg R6 */ 5176054c3f6SMatt Jacob #define RISC_R7 RISC_BLOCK+0xE /* RW*: GP Reg R7 */ 5186054c3f6SMatt Jacob #define RISC_R8 RISC_BLOCK+0x10 /* RW*: GP Reg R8 */ 5196054c3f6SMatt Jacob #define RISC_R9 RISC_BLOCK+0x12 /* RW*: GP Reg R9 */ 5206054c3f6SMatt Jacob #define RISC_R10 RISC_BLOCK+0x14 /* RW*: GP Reg R10 */ 5216054c3f6SMatt Jacob #define RISC_R11 RISC_BLOCK+0x16 /* RW*: GP Reg R11 */ 5226054c3f6SMatt Jacob #define RISC_R12 RISC_BLOCK+0x18 /* RW*: GP Reg R12 */ 5236054c3f6SMatt Jacob #define RISC_R13 RISC_BLOCK+0x1a /* RW*: GP Reg R13 */ 5246054c3f6SMatt Jacob #define RISC_R14 RISC_BLOCK+0x1c /* RW*: GP Reg R14 */ 5256054c3f6SMatt Jacob #define RISC_R15 RISC_BLOCK+0x1e /* RW*: GP Reg R15 */ 5266054c3f6SMatt Jacob #define RISC_PSR RISC_BLOCK+0x20 /* RW*: Processor Status */ 5276054c3f6SMatt Jacob #define RISC_IVR RISC_BLOCK+0x22 /* RW*: Interrupt Vector */ 5286054c3f6SMatt Jacob #define RISC_PCR RISC_BLOCK+0x24 /* RW*: Processor Ctrl */ 5296054c3f6SMatt Jacob #define RISC_RAR0 RISC_BLOCK+0x26 /* RW*: Ram Address #0 */ 5306054c3f6SMatt Jacob #define RISC_RAR1 RISC_BLOCK+0x28 /* RW*: Ram Address #1 */ 5316054c3f6SMatt Jacob #define RISC_LCR RISC_BLOCK+0x2a /* RW*: Loop Counter */ 5326054c3f6SMatt Jacob #define RISC_PC RISC_BLOCK+0x2c /* R : Program Counter */ 5336054c3f6SMatt Jacob #define RISC_MTR RISC_BLOCK+0x2e /* RW*: Memory Timing */ 5346054c3f6SMatt Jacob #define RISC_MTR2100 RISC_BLOCK+0x30 5356054c3f6SMatt Jacob 5366054c3f6SMatt Jacob #define RISC_EMB RISC_BLOCK+0x30 /* RW*: Ext Mem Boundary */ 537cbf57b47SMatt Jacob #define DUAL_BANK 8 5386054c3f6SMatt Jacob #define RISC_SP RISC_BLOCK+0x32 /* RW*: Stack Pointer */ 5396054c3f6SMatt Jacob #define RISC_HRL RISC_BLOCK+0x3e /* R *: Hardware Rev Level */ 5406054c3f6SMatt Jacob #define HCCR RISC_BLOCK+0x40 /* RW : Host Command & Ctrl */ 5416054c3f6SMatt Jacob #define BP0 RISC_BLOCK+0x42 /* RW : Processor Brkpt #0 */ 5426054c3f6SMatt Jacob #define BP1 RISC_BLOCK+0x44 /* RW : Processor Brkpt #1 */ 5436054c3f6SMatt Jacob #define TCR RISC_BLOCK+0x46 /* W : Test Control */ 5446054c3f6SMatt Jacob #define TMR RISC_BLOCK+0x48 /* W : Test Mode */ 5456054c3f6SMatt Jacob 5466054c3f6SMatt Jacob 5476054c3f6SMatt Jacob /* PROCESSOR STATUS REGISTER */ 5486054c3f6SMatt Jacob #define RISC_PSR_FORCE_TRUE 0x8000 5496054c3f6SMatt Jacob #define RISC_PSR_LOOP_COUNT_DONE 0x4000 5506054c3f6SMatt Jacob #define RISC_PSR_RISC_INT 0x2000 5516054c3f6SMatt Jacob #define RISC_PSR_TIMER_ROLLOVER 0x1000 5526054c3f6SMatt Jacob #define RISC_PSR_ALU_OVERFLOW 0x0800 5536054c3f6SMatt Jacob #define RISC_PSR_ALU_MSB 0x0400 5546054c3f6SMatt Jacob #define RISC_PSR_ALU_CARRY 0x0200 5556054c3f6SMatt Jacob #define RISC_PSR_ALU_ZERO 0x0100 556478f8a96SJustin T. Gibbs 557478f8a96SJustin T. Gibbs #define RISC_PSR_PCI_ULTRA 0x0080 558478f8a96SJustin T. Gibbs #define RISC_PSR_SBUS_ULTRA 0x0020 559478f8a96SJustin T. Gibbs 5606054c3f6SMatt Jacob #define RISC_PSR_DMA_INT 0x0010 5616054c3f6SMatt Jacob #define RISC_PSR_SXP_INT 0x0008 5626054c3f6SMatt Jacob #define RISC_PSR_HOST_INT 0x0004 5636054c3f6SMatt Jacob #define RISC_PSR_INT_PENDING 0x0002 5646054c3f6SMatt Jacob #define RISC_PSR_FORCE_FALSE 0x0001 5656054c3f6SMatt Jacob 5666054c3f6SMatt Jacob 5676054c3f6SMatt Jacob /* Host Command and Control */ 5686054c3f6SMatt Jacob #define HCCR_CMD_NOP 0x0000 /* NOP */ 5696054c3f6SMatt Jacob #define HCCR_CMD_RESET 0x1000 /* Reset RISC */ 5706054c3f6SMatt Jacob #define HCCR_CMD_PAUSE 0x2000 /* Pause RISC */ 5716054c3f6SMatt Jacob #define HCCR_CMD_RELEASE 0x3000 /* Release Paused RISC */ 5726054c3f6SMatt Jacob #define HCCR_CMD_STEP 0x4000 /* Single Step RISC */ 5736054c3f6SMatt Jacob #define HCCR_CMD_SET_HOST_INT 0x5000 /* Set Host Interrupt */ 5746054c3f6SMatt Jacob #define HCCR_CMD_CLEAR_HOST_INT 0x6000 /* Clear Host Interrupt */ 5756054c3f6SMatt Jacob #define HCCR_CMD_CLEAR_RISC_INT 0x7000 /* Clear RISC interrupt */ 5766054c3f6SMatt Jacob #define HCCR_CMD_BREAKPOINT 0x8000 /* Change breakpoint enables */ 5776054c3f6SMatt Jacob #define PCI_HCCR_CMD_BIOS 0x9000 /* Write BIOS (disable) */ 5786054c3f6SMatt Jacob #define PCI_HCCR_CMD_PARITY 0xA000 /* Write parity enable */ 5796054c3f6SMatt Jacob #define PCI_HCCR_CMD_PARITY_ERR 0xE000 /* Generate parity error */ 5806054c3f6SMatt Jacob #define HCCR_CMD_TEST_MODE 0xF000 /* Set Test Mode */ 5816054c3f6SMatt Jacob 5826054c3f6SMatt Jacob #define ISP2100_HCCR_PARITY_ENABLE_2 0x0400 5836054c3f6SMatt Jacob #define ISP2100_HCCR_PARITY_ENABLE_1 0x0200 5846054c3f6SMatt Jacob #define ISP2100_HCCR_PARITY_ENABLE_0 0x0100 5856054c3f6SMatt Jacob #define ISP2100_HCCR_PARITY 0x0001 5866054c3f6SMatt Jacob 5876054c3f6SMatt Jacob #define PCI_HCCR_PARITY 0x0400 /* Parity error flag */ 5886054c3f6SMatt Jacob #define PCI_HCCR_PARITY_ENABLE_1 0x0200 /* Parity enable bank 1 */ 5896054c3f6SMatt Jacob #define PCI_HCCR_PARITY_ENABLE_0 0x0100 /* Parity enable bank 0 */ 5906054c3f6SMatt Jacob 5916054c3f6SMatt Jacob #define HCCR_HOST_INT 0x0080 /* R : Host interrupt set */ 5926054c3f6SMatt Jacob #define HCCR_RESET 0x0040 /* R : reset in progress */ 5936054c3f6SMatt Jacob #define HCCR_PAUSE 0x0020 /* R : RISC paused */ 5946054c3f6SMatt Jacob 5956054c3f6SMatt Jacob #define PCI_HCCR_BIOS 0x0001 /* W : BIOS enable */ 596478f8a96SJustin T. Gibbs 597478f8a96SJustin T. Gibbs /* 598478f8a96SJustin T. Gibbs * Qlogic 1XXX NVRAM is an array of 128 bytes. 599478f8a96SJustin T. Gibbs * 600478f8a96SJustin T. Gibbs * Some portion of the front of this is for general host adapter properties 601478f8a96SJustin T. Gibbs * This is followed by an array of per-target parameters, and is tailed off 602478f8a96SJustin T. Gibbs * with a checksum xor byte at offset 127. For non-byte entities data is 603478f8a96SJustin T. Gibbs * stored in Little Endian order. 604478f8a96SJustin T. Gibbs */ 605478f8a96SJustin T. Gibbs 606478f8a96SJustin T. Gibbs #define ISP_NVRAM_SIZE 128 607478f8a96SJustin T. Gibbs 608478f8a96SJustin T. Gibbs #define ISPBSMX(c, byte, shift, mask) \ 609478f8a96SJustin T. Gibbs (((c)[(byte)] >> (shift)) & (mask)) 610478f8a96SJustin T. Gibbs 611478f8a96SJustin T. Gibbs #define ISP_NVRAM_VERSION(c) (c)[4] 612478f8a96SJustin T. Gibbs #define ISP_NVRAM_FIFO_THRESHOLD(c) ISPBSMX(c, 5, 0, 0x03) 613478f8a96SJustin T. Gibbs #define ISP_NVRAM_BIOS_DISABLE(c) ISPBSMX(c, 5, 2, 0x01) 614478f8a96SJustin T. Gibbs #define ISP_NVRAM_HBA_ENABLE(c) ISPBSMX(c, 5, 3, 0x01) 615478f8a96SJustin T. Gibbs #define ISP_NVRAM_INITIATOR_ID(c) ISPBSMX(c, 5, 4, 0x0f) 616478f8a96SJustin T. Gibbs #define ISP_NVRAM_BUS_RESET_DELAY(c) (c)[6] 617478f8a96SJustin T. Gibbs #define ISP_NVRAM_BUS_RETRY_COUNT(c) (c)[7] 618478f8a96SJustin T. Gibbs #define ISP_NVRAM_BUS_RETRY_DELAY(c) (c)[8] 619478f8a96SJustin T. Gibbs #define ISP_NVRAM_ASYNC_DATA_SETUP_TIME(c) ISPBSMX(c, 9, 0, 0x0f) 620478f8a96SJustin T. Gibbs #define ISP_NVRAM_REQ_ACK_ACTIVE_NEGATION(c) ISPBSMX(c, 9, 4, 0x01) 621478f8a96SJustin T. Gibbs #define ISP_NVRAM_DATA_LINE_ACTIVE_NEGATION(c) ISPBSMX(c, 9, 5, 0x01) 622478f8a96SJustin T. Gibbs #define ISP_NVRAM_DATA_DMA_BURST_ENABLE(c) ISPBSMX(c, 9, 6, 0x01) 623478f8a96SJustin T. Gibbs #define ISP_NVRAM_CMD_DMA_BURST_ENABLE(c) ISPBSMX(c, 9, 7, 0x01) 624478f8a96SJustin T. Gibbs #define ISP_NVRAM_TAG_AGE_LIMIT(c) (c)[10] 625478f8a96SJustin T. Gibbs #define ISP_NVRAM_LOWTRM_ENABLE(c) ISPBSMX(c, 11, 0, 0x01) 626478f8a96SJustin T. Gibbs #define ISP_NVRAM_HITRM_ENABLE(c) ISPBSMX(c, 11, 1, 0x01) 627478f8a96SJustin T. Gibbs #define ISP_NVRAM_PCMC_BURST_ENABLE(c) ISPBSMX(c, 11, 2, 0x01) 628478f8a96SJustin T. Gibbs #define ISP_NVRAM_ENABLE_60_MHZ(c) ISPBSMX(c, 11, 3, 0x01) 629478f8a96SJustin T. Gibbs #define ISP_NVRAM_SCSI_RESET_DISABLE(c) ISPBSMX(c, 11, 4, 0x01) 630478f8a96SJustin T. Gibbs #define ISP_NVRAM_ENABLE_AUTO_TERM(c) ISPBSMX(c, 11, 5, 0x01) 631478f8a96SJustin T. Gibbs #define ISP_NVRAM_FIFO_THRESHOLD_128(c) ISPBSMX(c, 11, 6, 0x01) 632478f8a96SJustin T. Gibbs #define ISP_NVRAM_AUTO_TERM_SUPPORT(c) ISPBSMX(c, 11, 7, 0x01) 633478f8a96SJustin T. Gibbs #define ISP_NVRAM_SELECTION_TIMEOUT(c) (((c)[12]) | ((c)[13] << 8)) 634478f8a96SJustin T. Gibbs #define ISP_NVRAM_MAX_QUEUE_DEPTH(c) (((c)[14]) | ((c)[15] << 8)) 635478f8a96SJustin T. Gibbs #define ISP_NVRAM_SCSI_BUS_SIZE(c) ISPBSMX(c, 16, 0, 0x01) 636478f8a96SJustin T. Gibbs #define ISP_NVRAM_SCSI_BUS_TYPE(c) ISPBSMX(c, 16, 1, 0x01) 637478f8a96SJustin T. Gibbs #define ISP_NVRAM_ADAPTER_CLK_SPEED(c) ISPBSMX(c, 16, 2, 0x01) 638478f8a96SJustin T. Gibbs #define ISP_NVRAM_SOFT_TERM_SUPPORT(c) ISPBSMX(c, 16, 3, 0x01) 639478f8a96SJustin T. Gibbs #define ISP_NVRAM_FLASH_ONBOARD(c) ISPBSMX(c, 16, 4, 0x01) 640478f8a96SJustin T. Gibbs #define ISP_NVRAM_FAST_MTTR_ENABLE(c) ISPBSMX(c, 22, 0, 0x01) 641478f8a96SJustin T. Gibbs 642478f8a96SJustin T. Gibbs #define ISP_NVRAM_TARGOFF 28 643478f8a96SJustin T. Gibbs #define ISP_NVARM_TARGSIZE 6 644478f8a96SJustin T. Gibbs #define _IxT(tgt, tidx) \ 645478f8a96SJustin T. Gibbs (ISP_NVRAM_TARGOFF + (ISP_NVARM_TARGSIZE * (tgt)) + (tidx)) 646478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_RENEG(c, t) ISPBSMX(c, _IxT(t, 0), 0, 0x01) 647478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_QFRZ(c, t) ISPBSMX(c, _IxT(t, 0), 1, 0x01) 648478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_ARQ(c, t) ISPBSMX(c, _IxT(t, 0), 2, 0x01) 649478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_TQING(c, t) ISPBSMX(c, _IxT(t, 0), 3, 0x01) 650478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_SYNC(c, t) ISPBSMX(c, _IxT(t, 0), 4, 0x01) 651478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_WIDE(c, t) ISPBSMX(c, _IxT(t, 0), 5, 0x01) 652478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_PARITY(c, t) ISPBSMX(c, _IxT(t, 0), 6, 0x01) 653478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_DISC(c, t) ISPBSMX(c, _IxT(t, 0), 7, 0x01) 654478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_EXEC_THROTTLE(c, t) ISPBSMX(c, _IxT(t, 1), 0, 0xff) 655478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_SYNC_PERIOD(c, t) ISPBSMX(c, _IxT(t, 2), 0, 0xff) 656478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_SYNC_OFFSET(c, t) ISPBSMX(c, _IxT(t, 3), 0, 0x0f) 657478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_DEVICE_ENABLE(c, t) ISPBSMX(c, _IxT(t, 3), 4, 0x01) 658478f8a96SJustin T. Gibbs #define ISP_NVRAM_TGT_LUN_DISABLE(c, t) ISPBSMX(c, _IxT(t, 3), 5, 0x01) 659478f8a96SJustin T. Gibbs 660478f8a96SJustin T. Gibbs /* 661478f8a96SJustin T. Gibbs * Qlogic 2XXX NVRAM is an array of 256 bytes. 662478f8a96SJustin T. Gibbs * 663478f8a96SJustin T. Gibbs * Some portion of the front of this is for general RISC engine parameters, 664478f8a96SJustin T. Gibbs * mostly reflecting the state of the last INITIALIZE FIRMWARE mailbox command. 665478f8a96SJustin T. Gibbs * 666478f8a96SJustin T. Gibbs * This is followed by some general host adapter parameters, and ends with 667478f8a96SJustin T. Gibbs * a checksum xor byte at offset 255. For non-byte entities data is stored 668478f8a96SJustin T. Gibbs * in Little Endian order. 669478f8a96SJustin T. Gibbs */ 670478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_SIZE 256 671478f8a96SJustin T. Gibbs /* ISP_NVRAM_VERSION is in same overall place */ 672478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_RISCVER(c) (c)[6] 67368ce4ba5SMatt Jacob #define ISP2100_NVRAM_OPTIONS(c) (c)[8] 674478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_MAXFRAMELENGTH(c) (((c)[10]) | ((c)[11] << 8)) 675478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_MAXIOCBALLOCATION(c) (((c)[12]) | ((c)[13] << 8)) 676478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_EXECUTION_THROTTLE(c) (((c)[14]) | ((c)[15] << 8)) 677478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_RETRY_COUNT(c) (c)[16] 678478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_RETRY_DELAY(c) (c)[17] 679478f8a96SJustin T. Gibbs 680478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_NODE_NAME(c) ( \ 681478f8a96SJustin T. Gibbs (((u_int64_t)(c)[18]) << 56) | \ 682478f8a96SJustin T. Gibbs (((u_int64_t)(c)[19]) << 48) | \ 683478f8a96SJustin T. Gibbs (((u_int64_t)(c)[20]) << 40) | \ 684478f8a96SJustin T. Gibbs (((u_int64_t)(c)[21]) << 32) | \ 685478f8a96SJustin T. Gibbs (((u_int64_t)(c)[22]) << 24) | \ 686478f8a96SJustin T. Gibbs (((u_int64_t)(c)[23]) << 16) | \ 687478f8a96SJustin T. Gibbs (((u_int64_t)(c)[24]) << 8) | \ 688478f8a96SJustin T. Gibbs (((u_int64_t)(c)[25]) << 0)) 689f1535c02SMatt Jacob #define ISP2100_NVRAM_HARDLOOPID(c) (c)[26] 690478f8a96SJustin T. Gibbs 69168ce4ba5SMatt Jacob #define ISP2100_NVRAM_HBA_OPTIONS(c) (c)[70] 692478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_HBA_DISABLE(c) ISPBSMX(c, 70, 0, 0x01) 693478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_BIOS_DISABLE(c) ISPBSMX(c, 70, 1, 0x01) 694478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_LUN_DISABLE(c) ISPBSMX(c, 70, 2, 0x01) 695478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_ENABLE_SELECT_BOOT(c) ISPBSMX(c, 70, 3, 0x01) 696478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_DISABLE_CODELOAD(c) ISPBSMX(c, 70, 4, 0x01) 697478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_SET_CACHELINESZ(c) ISPBSMX(c, 70, 5, 0x01) 698478f8a96SJustin T. Gibbs 699478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_BOOT_NODE_NAME(c) ( \ 700478f8a96SJustin T. Gibbs (((u_int64_t)(c)[72]) << 56) | \ 701478f8a96SJustin T. Gibbs (((u_int64_t)(c)[73]) << 48) | \ 702478f8a96SJustin T. Gibbs (((u_int64_t)(c)[74]) << 40) | \ 703478f8a96SJustin T. Gibbs (((u_int64_t)(c)[75]) << 32) | \ 704478f8a96SJustin T. Gibbs (((u_int64_t)(c)[76]) << 24) | \ 705478f8a96SJustin T. Gibbs (((u_int64_t)(c)[77]) << 16) | \ 706478f8a96SJustin T. Gibbs (((u_int64_t)(c)[78]) << 8) | \ 707478f8a96SJustin T. Gibbs (((u_int64_t)(c)[79]) << 0)) 70868ce4ba5SMatt Jacob 709478f8a96SJustin T. Gibbs #define ISP2100_NVRAM_BOOT_LUN(c) (c)[80] 710478f8a96SJustin T. Gibbs 7116054c3f6SMatt Jacob #endif /* _ISPREG_H */ 712