* Copyright (c) 1992 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Sony Corp. and Kazumasa Utashiro of Software Research Associates, Inc.
* %sccs.include.redist.c%
* from: $Hdr: screg_1185.h,v 4.300 91/06/09 06:22:14 root Rel41 $ SONY
* @(#)screg_1185.h 7.1 (Berkeley) %G%
* Copyright (c) 1989- by SONY Corporation.
* for SCSI I/F Chip CXD1185Q
* SCSI I/F Chip CXD1185Q Register address assignment
# define SCSI_BASE 0xbfe00100
# define SCSI_BASE 0xe1900000
#define U_CHAR volatile u_char
#define sc_statr *( (U_CHAR *)(SCSI_BASE + 0x0) )
#define sc_comr *( (U_CHAR *)(SCSI_BASE + 0x0) )
#define sc_datr *( (U_CHAR *)(SCSI_BASE + 0x1) )
#define sc_intrq1 *( (U_CHAR *)(SCSI_BASE + 0x2) )
#define sc_intrq2 *( (U_CHAR *)(SCSI_BASE + 0x3) )
#define sc_envir *( (U_CHAR *)(SCSI_BASE + 0x3) )
#define sc_cmonr *( (U_CHAR *)(SCSI_BASE + 0x4) )
#define sc_timer *( (U_CHAR *)(SCSI_BASE + 0x4) )
#define sc_ffstr *( (U_CHAR *)(SCSI_BASE + 0x5) )
#define sc_idenr *( (U_CHAR *)(SCSI_BASE + 0x6) )
#define sc_tclow *( (U_CHAR *)(SCSI_BASE + 0x7) )
#define sc_tcmid *( (U_CHAR *)(SCSI_BASE + 0x8) )
#define sc_tchi *( (U_CHAR *)(SCSI_BASE + 0x9) )
#define sc_intok1 *( (U_CHAR *)(SCSI_BASE + 0xa) )
#define sc_intok2 *( (U_CHAR *)(SCSI_BASE + 0xb) )
#define sc_moder *( (U_CHAR *)(SCSI_BASE + 0xc) )
#define sc_syncr *( (U_CHAR *)(SCSI_BASE + 0xd) )
#define sc_busconr *( (U_CHAR *)(SCSI_BASE + 0xe) )
#define sc_ioptr *( (U_CHAR *)(SCSI_BASE + 0xf) )
* CXD1185Q Register bit assignment
/* sc_statr (status register) bit define
/* sc_comr (command register) bit define
/* sc_intrq1 (interrupt request register 1) bit define
/* sc_intrq2 (interrupt request register 2) bit define
/* sc_envir (environment register) bit define
/* sc_cmonr (scsi control monitor register) bit define
/* sc_ffstr (FIFO status register) bit define
/* sc_idenr (scsi identify register) bit define
/* sc_intok1 (interrupt enable register 1) bit define
/* sc_intok2 (interrupt enable register 2) bit define
/* sc_moder (mode register) bit define
/* sc_syncr (synchronous transfer control register) bit define
#define MIN_TP 62 /* minimum transfer period 4ns * 25 */
/* sc_busconr (scsi bus control register) bit define
/* sc_ioptr (I/O port) bit define
#define SCMD_CHIP_RST 0x01
#define SCMD_AST_RST 0x02
#define SCMD_FLSH_FIFO 0x03
#define SCMD_AST_CTRL 0x04
#define SCMD_NGT_CTRL 0x05
#define SCMD_AST_DATA 0x06
#define SCMD_NGT_DATA 0x07
#define SCMD_SEL_ATN 0x42
#define SCMD_ENB_SEL 0x43
#define SCMD_DIS_SEL 0x44
#define SCMD_SEND_MES 0x80
#define SCMD_SEND_STAT 0x81
#define SCMD_SEND_DATA 0x82
#define SCMD_DISCONNECT 0x83
#define SCMD_RCV_MOUT 0x84
#define SCMD_RCV_CMD 0x85
#define SCMD_RCV_DATA 0x86
#define SCMD_TR_INFO 0xc0
#define SCMD_NGT_ACK 0xc2
#define SCMD_AST_ATN 0xc3
#define SCMD_NGT_ATN 0xc4
* scsi parameter definition
#define SC_PMASK (R4_MMSG|R4_MCD|R4_MIO)
# define STAT_IN (R4_MCD|R4_MIO)
# define MES_OUT (R4_MMSG|R4_MCD)
# define MES_IN (R4_MMSG|R4_MCD|R4_MIO)
/* scsi command types define
#define CMD_TYPEMASK 0xe0
# define CMD_T0 0 /* 6 byte commands */
# define CMD_T1 0x20 /* 10 byte commands */
# define CMD_T5 0xa0 /* 12 byte commands */