Lines Matching +full:dsa +full:- +full:specific

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 * of PCI-SCSI IO processors.
6 * Copyright (C) 1999-2001 Gerard Roudier <[email protected]>
9 * Copyright (C) 1998-2000 Gerard Roudier
12 * a port of the FreeBSD ncr driver to Linux-1.2.13.
16 * Stefan Esser <[email protected]-Koeln.de>
24 *-----------------------------------------------------------------------------
35 * They may be defined in platform specific headers, if they
55 * by the platform specific code to something else.
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))
291 * from DSA value.
295 #define CCB_HASH_MASK (CCB_HASH_SIZE-1)
297 #define CCB_HASH_CODE(dsa) \ argument
298 (((dsa) >> (_LGRU16_(sizeof(struct sym_ccb)))) & CCB_HASH_MASK)
300 #define CCB_HASH_CODE(dsa) (((dsa) >> 9) & CCB_HASH_MASK) argument
306 * 16 segments registers -> up to 64 GB addressable.
310 #define SYM_DMAP_MASK (SYM_DMAP_SIZE-1)
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 */
403 * O/S specific data structure.
497 * O/S specific data structure.
568 #define sym_lp(tp, lun) (!lun) ? (tp)->lun0p : NULL
571 (!lun) ? (tp)->lun0p : (tp)->lunmp ? (tp)->lunmp[((u8)lun)] : NULL
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)
687 * DSA (data structure address) register points to this
723 * This is the data structure which is pointed by the DSA
740 unsigned char odd_byte_adjustment; /* odd-sized req on wide bus */
790 #define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl))
829 * Bit 32-63 of the on-chip RAM bus address in LE format.
870 * O/S specific data structure
882 * 'script' is loaded in the on-chip RAM if present.
884 * 53C895A, 53C896 and 53C1010 that provide 8K on-chip RAM.
945 * Miscellaneous buffers accessed by the scripts-processor.
964 struct sym_ccb **ccbh; /* CCBs hashed by DSA value */
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))
1039 * Driver methods called from O/S specific code.
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)
1147 * The OS specific m_pool_id_t thing and the sym_m_pool_match()
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()