Lines Matching +full:fixed +full:- +full:factor +full:- +full:clock
3 * of PCI-SCSI IO processors.
5 * Copyright (C) 1999-2001 Gerard Roudier <groudier@free.fr>
8 * Copyright (C) 1998-2000 Gerard Roudier
11 * a port of the FreeBSD ncr driver to Linux-1.2.13.
15 * Stefan Esser <se@mi.Uni-Koeln.de>
23 *-----------------------------------------------------------------------------
37 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
88 #define sym_verbose (np->verbose)
144 * Asynchronous pre-scaler (ns). Shall be 40 for
166 #define SYM_MEM_CLUSTER_MASK (SYM_MEM_CLUSTER_SIZE-1)
178 #define SYM_CONF_MAX_START (SYM_CONF_MAX_QUEUE-2)
185 #define SYM_CONF_MAX_START (SYM_CONF_MAX_QUEUE-2)
189 * For this one, we want a short name :-)
197 #define INB_OFF(np, o) ioread8(np->s.ioaddr + (o))
198 #define INW_OFF(np, o) ioread16(np->s.ioaddr + (o))
199 #define INL_OFF(np, o) ioread32(np->s.ioaddr + (o))
201 #define OUTB_OFF(np, o, val) iowrite8((val), np->s.ioaddr + (o))
202 #define OUTW_OFF(np, o, val) iowrite16((val), np->s.ioaddr + (o))
203 #define OUTL_OFF(np, o, val) iowrite32((val), np->s.ioaddr + (o))
308 #define CCB_HASH_MASK (CCB_HASH_SIZE-1)
319 * 16 segments registers -> up to 64 GB addressable.
323 #define SYM_DMAP_MASK (SYM_DMAP_SIZE-1)
372 * LUN #0 is a special case, since multi-lun devices are rare,
373 * and we we want to speed-up the general case and not waste
383 /*0*/ u_char uval; /* -> SCNTL4 register */
384 /*1*/ u_char sval; /* -> SXFER io register */
386 /*3*/ u_char wval; /* -> SCNTL3 io register */
581 #define sym_lp(tp, lun) (!lun) ? (tp)->lun0p : NULL
584 (!lun) ? (tp)->lun0p : (tp)->lunmp ? (tp)->lunmp[(lun)] : NULL
672 * We must distinguish between the LOAD/STORE-based SCRIPTS
673 * that use directly the header in the CCB, and the NCR-GENERIC
679 if (np->features & FE_LDSTR) \
680 cp->phys.head.lastp = cpu_to_scr(dp); \
682 np->ccb_head.lastp = cpu_to_scr(dp); \
685 scr_to_cpu((np->features & FE_LDSTR) ? \
686 cp->phys.head.lastp : np->ccb_head.lastp)
690 cp->phys.head.lastp = cpu_to_scr(dp); \
693 #define sym_get_script_dp(np, cp) (cp->phys.head.lastp)
753 unsigned char odd_byte_adjustment; /* odd-sized req on wide bus */
803 #define CCB_BA(cp,lbl) cpu_to_scr(cp->ccb_ba + offsetof(struct sym_ccb, lbl))
815 * (CCB, TCB and LCB) in fixed areas.
842 * Bit 32-63 of the on-chip RAM bus address in LE format.
895 * 'script' is loaded in the on-chip RAM if present.
897 * 53C895A, 53C896 and 53C1010 that provide 8K on-chip RAM.
927 u_char minsync; /* Min sync period factor (ST) */
928 u_char maxsync; /* Max sync period factor (ST) */
930 u_char minsync_dt; /* Min sync period factor (DT) */
931 u_char maxsync_dt; /* Max sync period factor (DT) */
933 u_char multiplier; /* Clock multiplier (1,2,4) */
934 u_char clock_divn; /* Number of clock divisors */
935 u32 clock_khz; /* SCSI clock frequency in KHz */
936 u32 pciclk_khz; /* Estimated PCI clock in KHz */
958 * Miscellaneous buffers accessed by the scripts-processor.
1038 #define use_dac(np) (np)->use_dac
1039 #define set_dac(np) (np)->use_dac = 1
1042 #define HCB_BA(np, lbl) (np->hcb_ba + offsetof(struct sym_hcb, lbl))
1080 * to provide bus address bits 32-39 to the SCRIPTS processor.
1088 (data)->addr = cpu_to_scr(badd); \
1089 (data)->size = cpu_to_scr(len); \
1095 (data)->addr = cpu_to_scr(badd); \
1096 (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len); \
1107 if (h != np->dmap_bah[s]) in sym_build_sge()
1110 (data)->addr = cpu_to_scr(badd); in sym_build_sge()
1111 (data)->size = cpu_to_scr((s<<24) + len); in sym_build_sge()
1150 #define VTOB_HASH_MASK (VTOB_HASH_SIZE-1)
1169 #define M_GET_MEM_CLUSTER() mp->get_mem_cluster(mp)
1170 #define M_FREE_MEM_CLUSTER(p) mp->free_mem_cluster(mp, p)
1174 struct sym_m_link h[SYM_MEM_CLUSTER_SHIFT - SYM_MEM_SHIFT + 1];
1192 #define _sym_calloc_dma(np, l, n) __sym_calloc_dma(np->bus_dmat, l, n)
1194 __sym_mfree_dma(np->bus_dmat, _uvptv_(p), l, n)
1197 #define vtobus(p) __vtobus(np->bus_dmat, _uvptv_(p))
1211 vaddr = dma_alloc_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, &baddr, in sym_m_get_dma_mem_cluster()
1214 vbp->vaddr = vaddr; in sym_m_get_dma_mem_cluster()
1215 vbp->baddr = baddr; in sym_m_get_dma_mem_cluster()
1222 dma_free_coherent(mp->dev_dmat, SYM_MEM_CLUSTER_SIZE, vbp->vaddr, in sym_m_free_dma_mem_cluster()
1223 vbp->baddr); in sym_m_free_dma_mem_cluster()