Lines Matching +full:sync +full:- +full:flag
1 /* SPDX-License-Identifier: GPL-2.0 */
3 /* Driver for 53c700 and 53c700-66 chips from NCR and Symbios
17 /* Turn on for general debugging---too verbose for normal use */
41 #define NCR_700_LUN_MASK (NCR_700_MAX_LUNS - 1)
81 * for the annoying SCSI-2 requirement for LUN information in
89 /* The SYNC negotiation sequence looks like:
100 * 16 negotiated SYNC flag
101 * 17 begin SYNC negotiation flag
109 struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; in NCR_700_get_sense_cmnd()
111 return hostdata->cmnd; in NCR_700_get_sense_cmnd()
117 struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; in NCR_700_set_depth()
119 hostdata->depth = depth; in NCR_700_set_depth()
124 struct NCR_700_Device_Parameters *hostdata = SDp->hostdata; in NCR_700_get_depth()
126 return hostdata->depth; in NCR_700_get_depth()
129 NCR_700_is_flag_set(struct scsi_device *SDp, __u32 flag) in NCR_700_is_flag_set() argument
131 return (spi_flags(SDp->sdev_target) & flag) == flag; in NCR_700_is_flag_set()
134 NCR_700_is_flag_clear(struct scsi_device *SDp, __u32 flag) in NCR_700_is_flag_clear() argument
136 return (spi_flags(SDp->sdev_target) & flag) == 0; in NCR_700_is_flag_clear()
139 NCR_700_set_flag(struct scsi_device *SDp, __u32 flag) in NCR_700_set_flag() argument
141 spi_flags(SDp->sdev_target) |= flag; in NCR_700_set_flag()
144 NCR_700_clear_flag(struct scsi_device *SDp, __u32 flag) in NCR_700_clear_flag() argument
146 spi_flags(SDp->sdev_target) &= ~flag; in NCR_700_clear_flag()
158 return (enum NCR_700_tag_neg_state)((spi_flags(SDp->sdev_target)>>20) & 0x3); in NCR_700_get_tag_neg_state()
166 spi_flags(SDp->sdev_target) &= ~(0x3 << 20); in NCR_700_set_tag_neg_state()
167 spi_flags(SDp->sdev_target) |= ((__u32)state) << 20; in NCR_700_set_tag_neg_state()
211 __u32 noncoherent:1; /* needs to use non-coherent DMA */
215 speed (so can negiotiate sync) */
216 int sync_clock; /* The speed of the SYNC core */
255 * 53C700 Register Interface - the offset from the Selected base
258 #define bE (hostdata->force_le_on_be ? 0 : 3)
259 #define bSWAP (hostdata->force_le_on_be)
260 #define bEBus (!hostdata->force_le_on_be)
416 * the 53c700-66 cannot handle an offset >8, so don't change this */
484 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_readb()
486 return ioread8(hostdata->base + (reg^bE)); in NCR_700_readb()
493 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_readl()
494 __u32 value = bEBus ? ioread32be(hostdata->base + reg) : in NCR_700_readl()
495 ioread32(hostdata->base + reg); in NCR_700_readl()
508 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_writeb()
510 iowrite8(value, hostdata->base + (reg^bE)); in NCR_700_writeb()
517 = (struct NCR_700_Host_Parameters *)host->hostdata[0]; in NCR_700_writel()
524 bEBus ? iowrite32be(value, hostdata->base + reg): in NCR_700_writel()
525 iowrite32(value, hostdata->base + reg); in NCR_700_writel()