vserver 1.9.3
[linux-2.6.git] / drivers / ide / pci / cmd64x.h
1 #ifndef CMD64X_H
2 #define CMD64X_H
3
4 #include <linux/config.h>
5 #include <linux/pci.h>
6 #include <linux/ide.h>
7
8 #define DISPLAY_CMD64X_TIMINGS
9
10 #define CMD_DEBUG 0
11
12 #if CMD_DEBUG
13 #define cmdprintk(x...) printk(x)
14 #else
15 #define cmdprintk(x...)
16 #endif
17
18 /*
19  * CMD64x specific registers definition.
20  */
21 #define CFR             0x50
22 #define   CFR_INTR_CH0          0x02
23 #define CNTRL           0x51
24 #define   CNTRL_DIS_RA0         0x40
25 #define   CNTRL_DIS_RA1         0x80
26 #define   CNTRL_ENA_2ND         0x08
27
28 #define CMDTIM          0x52
29 #define ARTTIM0         0x53
30 #define DRWTIM0         0x54
31 #define ARTTIM1         0x55
32 #define DRWTIM1         0x56
33 #define ARTTIM23        0x57
34 #define   ARTTIM23_DIS_RA2      0x04
35 #define   ARTTIM23_DIS_RA3      0x08
36 #define   ARTTIM23_INTR_CH1     0x10
37 #define ARTTIM2         0x57
38 #define ARTTIM3         0x57
39 #define DRWTIM23        0x58
40 #define DRWTIM2         0x58
41 #define BRST            0x59
42 #define DRWTIM3         0x5b
43
44 #define BMIDECR0        0x70
45 #define MRDMODE         0x71
46 #define   MRDMODE_INTR_CH0      0x04
47 #define   MRDMODE_INTR_CH1      0x08
48 #define   MRDMODE_BLK_CH0       0x10
49 #define   MRDMODE_BLK_CH1       0x20
50 #define BMIDESR0        0x72
51 #define UDIDETCR0       0x73
52 #define DTPR0           0x74
53 #define BMIDECR1        0x78
54 #define BMIDECSR        0x79
55 #define BMIDESR1        0x7A
56 #define UDIDETCR1       0x7B
57 #define DTPR1           0x7C
58
59 static unsigned int init_chipset_cmd64x(struct pci_dev *, const char *);
60 static void init_hwif_cmd64x(ide_hwif_t *);
61
62 static ide_pci_device_t cmd64x_chipsets[] __devinitdata = {
63         {       /* 0 */
64                 .name           = "CMD643",
65                 .init_chipset   = init_chipset_cmd64x,
66                 .init_hwif      = init_hwif_cmd64x,
67                 .channels       = 2,
68                 .autodma        = AUTODMA,
69                 .bootable       = ON_BOARD,
70         },{     /* 1 */
71                 .name           = "CMD646",
72                 .init_chipset   = init_chipset_cmd64x,
73                 .init_hwif      = init_hwif_cmd64x,
74                 .channels       = 2,
75                 .autodma        = AUTODMA,
76                 .enablebits     = {{0x00,0x00,0x00}, {0x51,0x80,0x80}},
77                 .bootable       = ON_BOARD,
78         },{     /* 2 */
79                 .name           = "CMD648",
80                 .init_chipset   = init_chipset_cmd64x,
81                 .init_hwif      = init_hwif_cmd64x,
82                 .channels       = 2,
83                 .autodma        = AUTODMA,
84                 .bootable       = ON_BOARD,
85         },{
86                 .name           = "CMD649",
87                 .init_chipset   = init_chipset_cmd64x,
88                 .init_hwif      = init_hwif_cmd64x,
89                 .channels       = 2,
90                 .autodma        = AUTODMA,
91                 .bootable       = ON_BOARD,
92         }
93 };
94
95 #endif /* CMD64X_H */