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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [uclinux/] [uClinux-2.0.x/] [drivers/] [scsi/] [a3000.h] - Blame information for rev 1765

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

Line No. Rev Author Line
1 199 simons
#ifndef A3000_H
2
 
3
/* $Id: a3000.h,v 1.1.1.1 2001-09-10 07:44:29 simons Exp $
4
 *
5
 * Header file for the Amiga 3000 built-in SCSI controller for Linux
6
 *
7
 * Written and (C) 1993, Hamish Macdonald, see a3000.c for more info
8
 *
9
 */
10
 
11
#include <linux/types.h>
12
 
13
int a3000_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_a3000;
34
 
35
#define A3000_SCSI {  /* next */                NULL,            \
36
                      /* usage_count */         NULL,            \
37
                      /* proc_dir_entry */      &proc_scsi_a3000, \
38
                      /* proc_info */           NULL,            \
39
                      /* name */                "Amiga 3000 built-in SCSI", \
40
                      /* detect */              a3000_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 A3000_XFER_MASK  (0x00000003)
63
 
64
typedef struct {
65
             unsigned char      pad1[2];
66
    volatile unsigned short     DAWR;
67
    volatile unsigned int       WTC;
68
             unsigned char      pad2[2];
69
    volatile unsigned short     CNTR;
70
    volatile unsigned long      ACR;
71
             unsigned char      pad3[2];
72
    volatile unsigned short     ST_DMA;
73
             unsigned char      pad4[2];
74
    volatile unsigned short     FLUSH;
75
             unsigned char      pad5[2];
76
    volatile unsigned short     CINT;
77
             unsigned char      pad6[2];
78
    volatile unsigned short     ISTR;
79
             unsigned char      pad7[30];
80
    volatile unsigned short     SP_DMA;
81
             unsigned char      pad8;
82
    volatile unsigned char      SASR;
83
             unsigned char      pad9;
84
    volatile unsigned char      SCMD;
85
} a3000_scsiregs;
86
 
87
#define DAWR_A3000              (3)
88
 
89
/* CNTR bits. */
90
#define CNTR_TCEN               (1<<5)
91
#define CNTR_PREST              (1<<4)
92
#define CNTR_PDMD               (1<<3)
93
#define CNTR_INTEN              (1<<2)
94
#define CNTR_DDIR               (1<<1)
95
#define CNTR_IO_DX              (1<<0)
96
 
97
/* ISTR bits. */
98
#define ISTR_INTX               (1<<8)
99
#define ISTR_INT_F              (1<<7)
100
#define ISTR_INTS               (1<<6)
101
#define ISTR_E_INT              (1<<5)
102
#define ISTR_INT_P              (1<<4)
103
#define ISTR_UE_INT             (1<<3)
104
#define ISTR_OE_INT             (1<<2)
105
#define ISTR_FF_FLG             (1<<1)
106
#define ISTR_FE_FLG             (1<<0)
107
 
108
#endif /* else def HOSTS_C */
109
 
110
#endif /* A3000_H */

powered by: WebSVN 2.1.0

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