Lines Matching +full:pci +full:- +full:host +full:- +full:cam +full:- +full:generic

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * of PCI-SCSI IO processors.
6 * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr>
9 * Copyright (C) 1998-2000 Gerard Roudier
12 * a port of the FreeBSD ncr driver to Linux-1.2.13.
16 * Stefan Esser <se@mi.Uni-Koeln.de>
24 *-----------------------------------------------------------------------------
33 * Generic driver options.
75 #define sym_verbose (np->verbose)
131 * Asynchronous pre-scaler (ns). Shall be 40 for
153 #define SYM_MEM_CLUSTER_MASK (SYM_MEM_CLUSTER_SIZE-1)
165 #define SYM_CONF_MAX_START (SYM_CONF_MAX_QUEUE-2)
172 #define SYM_CONF_MAX_START (SYM_CONF_MAX_QUEUE-2)
176 * For this one, we want a short name :-)
184 #define INB_OFF(np, o) ioread8(np->s.ioaddr + (o))
185 #define INW_OFF(np, o) ioread16(np->s.ioaddr + (o))
186 #define INL_OFF(np, o) ioread32(np->s.ioaddr + (o))
188 #define OUTB_OFF(np, o, val) iowrite8((val), np->s.ioaddr + (o))
189 #define OUTW_OFF(np, o, val) iowrite16((val), np->s.ioaddr + (o))
190 #define OUTL_OFF(np, o, val) iowrite32((val), np->s.ioaddr + (o))
295 #define CCB_HASH_MASK (CCB_HASH_SIZE-1)
306 * 16 segments registers -> up to 64 GB addressable.
310 #define SYM_DMAP_MASK (SYM_DMAP_SIZE-1)
322 * Host adapter miscellaneous flags.
359 * LUN #0 is a special case, since multi-lun devices are rare,
360 * and we we want to speed-up the general case and not waste
370 /*0*/ u_char uval; /* -> SCNTL4 register */
371 /*1*/ u_char sval; /* -> SXFER io register */
373 /*3*/ u_char wval; /* -> SCNTL3 io register */
568 #define sym_lp(tp, lun) (!lun) ? (tp)->lun0p : NULL
571 (!lun) ? (tp)->lun0p : (tp)->lunmp ? (tp)->lunmp[((u8)lun)] : NULL
575 * Status are used by the host and the script processor.
596 * Last four bytes (host)
604 * Host flags
618 * More host flags
659 * We must distinguish between the LOAD/STORE-based SCRIPTS
660 * that use directly the header in the CCB, and the NCR-GENERIC
666 if (np->features & FE_LDSTR) \
667 cp->phys.head.lastp = cpu_to_scr(dp); \
669 np->ccb_head.lastp = cpu_to_scr(dp); \
672 scr_to_cpu((np->features & FE_LDSTR) ? \
673 cp->phys.head.lastp : np->ccb_head.lastp)
677 cp->phys.head.lastp = cpu_to_scr(dp); \
680 #define sym_get_script_dp(np, cp) (cp->phys.head.lastp)
730 * Pointer to CAM ccb and related stuff.
732 struct scsi_cmnd *cmd; /* CAM scsiio ccb */
740 unsigned char odd_byte_adjustment; /* odd-sized req on wide bus */
774 struct sym_ccb *link_ccbh; /* Host adapter CCB hash chain */
790 #define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl))
795 * Host Control Block
824 * Bus address of this host control block.
829 * Bit 32-63 of the on-chip RAM bus address in LE format.
882 * 'script' is loaded in the on-chip RAM if present.
884 * 53C895A, 53C896 and 53C1010 that provide 8K on-chip RAM.
923 u32 pciclk_khz; /* Estimated PCI clock in KHz */
926 * It is filled up by the host processor and accessed by the
945 * Miscellaneous buffers accessed by the scripts-processor.
1013 u_char use_dac; /* Use PCI DAC cycles */
1025 #define use_dac(np) (np)->use_dac
1026 #define set_dac(np) (np)->use_dac = 1
1029 #define HCB_BA(np, lbl) (np->hcb_ba + offsetof(struct sym_hcb, lbl))
1067 * to provide bus address bits 32-39 to the SCRIPTS processor.
1075 (data)->addr = cpu_to_scr(badd); \
1076 (data)->size = cpu_to_scr(len); \
1082 (data)->addr = cpu_to_scr(badd); \
1083 (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len); \
1094 if (h != np->dmap_bah[s]) in sym_build_sge()
1097 (data)->addr = cpu_to_scr(badd); in sym_build_sge()
1098 (data)->size = cpu_to_scr((s<<24) + len); in sym_build_sge()
1137 #define VTOB_HASH_MASK (VTOB_HASH_SIZE-1)
1156 #define M_GET_MEM_CLUSTER() mp->get_mem_cluster(mp)
1157 #define M_FREE_MEM_CLUSTER(p) mp->free_mem_cluster(mp, p)
1161 struct sym_m_link h[SYM_MEM_CLUSTER_SHIFT - SYM_MEM_SHIFT + 1];
1179 #define _sym_calloc_dma(np, l, n) __sym_calloc_dma(np->bus_dmat, l, n)
1181 __sym_mfree_dma(np->bus_dmat, _uvptv_(p), l, n)
1184 #define vtobus(p) __vtobus(np->bus_dmat, _uvptv_(p))
1198 vaddr = dma_alloc_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, &baddr, in sym_m_get_dma_mem_cluster()
1201 vbp->vaddr = vaddr; in sym_m_get_dma_mem_cluster()
1202 vbp->baddr = baddr; in sym_m_get_dma_mem_cluster()
1209 dma_free_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, vbp->vaddr, in sym_m_free_dma_mem_cluster()
1210 vbp->baddr); in sym_m_free_dma_mem_cluster()