OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [scsi/] [a2091.h] - Blame information for rev 1626

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
#ifndef A2091_H
2
 
3
/* $Id: a2091.h,v 1.1 2005-12-20 10:17:45 jcastillo Exp $
4
 *
5
 * Header file for the Commodore A2091 Zorro II SCSI controller for Linux
6
 *
7
 * Written and (C) 1993, Hamish Macdonald, see a2091.c for more info
8
 *
9
 */
10
 
11
#include <linux/types.h>
12
 
13
int a2091_detect(Scsi_Host_Template *);
14
const char *wd33c93_info(void);
15
int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
16
int wd33c93_abort(Scsi_Cmnd *);
17
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
18
 
19
#ifndef NULL
20
#define NULL 0
21
#endif
22
 
23
#ifndef CMD_PER_LUN
24
#define CMD_PER_LUN 2
25
#endif
26
 
27
#ifndef CAN_QUEUE
28
#define CAN_QUEUE 16
29
#endif
30
 
31
#ifdef HOSTS_C
32
 
33
extern struct proc_dir_entry proc_scsi_a2091;
34
 
35
#define A2091_SCSI {  /* next */                NULL,            \
36
                      /* usage_count */         NULL,            \
37
                      /* proc_dir_entry */      &proc_scsi_a2091, \
38
                      /* proc_info */           NULL,            \
39
                      /* name */                "Commodore A2091/A590 SCSI", \
40
                      /* detect */              a2091_detect,    \
41
                      /* release */             NULL,            \
42
                      /* info */                NULL,            \
43
                      /* command */             NULL,            \
44
                      /* queuecommand */        wd33c93_queuecommand, \
45
                      /* abort */               wd33c93_abort,   \
46
                      /* reset */               wd33c93_reset,   \
47
                      /* slave_attach */        NULL,            \
48
                      /* bios_param */          NULL,            \
49
                      /* can_queue */           CAN_QUEUE,       \
50
                      /* this_id */             7,               \
51
                      /* sg_tablesize */        SG_ALL,          \
52
                      /* cmd_per_lun */         CMD_PER_LUN,     \
53
                      /* present */             0,               \
54
                      /* unchecked_isa_dma */   0,               \
55
                      /* use_clustering */      DISABLE_CLUSTERING }
56
#else
57
 
58
/*
59
 * if the transfer address ANDed with this results in a non-zero
60
 * result, then we can't use DMA.
61
 */
62
#define A2091_XFER_MASK  (0xff000001)
63
 
64
typedef struct {
65
             unsigned char      pad1[64];
66
    volatile unsigned short     ISTR;
67
    volatile unsigned short     CNTR;
68
             unsigned char      pad2[60];
69
    volatile unsigned int       WTC;
70
    volatile unsigned long      ACR;
71
             unsigned char      pad3[6];
72
    volatile unsigned short     DAWR;
73
             unsigned char      pad4;
74
    volatile unsigned char      SASR;
75
             unsigned char      pad5;
76
    volatile unsigned char      SCMD;
77
             unsigned char      pad6[76];
78
    volatile unsigned short     ST_DMA;
79
    volatile unsigned short     SP_DMA;
80
    volatile unsigned short     CINT;
81
             unsigned char      pad7[2];
82
    volatile unsigned short     FLUSH;
83
} a2091_scsiregs;
84
 
85
#define DAWR_A2091              (3)
86
 
87
/* CNTR bits. */
88
#define CNTR_TCEN               (1<<7)
89
#define CNTR_PREST              (1<<6)
90
#define CNTR_PDMD               (1<<5)
91
#define CNTR_INTEN              (1<<4)
92
#define CNTR_DDIR               (1<<3)
93
 
94
/* ISTR bits. */
95
#define ISTR_INTX               (1<<8)
96
#define ISTR_INT_F              (1<<7)
97
#define ISTR_INTS               (1<<6)
98
#define ISTR_E_INT              (1<<5)
99
#define ISTR_INT_P              (1<<4)
100
#define ISTR_UE_INT             (1<<3)
101
#define ISTR_OE_INT             (1<<2)
102
#define ISTR_FF_FLG             (1<<1)
103
#define ISTR_FE_FLG             (1<<0)
104
 
105
#endif /* else def HOSTS_C */
106
 
107
#endif /* A2091_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.