ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / ide / pci / pdc202xx_new.h
1 #ifndef PDC202XX_H
2 #define PDC202XX_H
3
4 #include <linux/config.h>
5 #include <linux/pci.h>
6 #include <linux/ide.h>
7
8 const static char *pdc_quirk_drives[] = {
9         "QUANTUM FIREBALLlct08 08",
10         "QUANTUM FIREBALLP KA6.4",
11         "QUANTUM FIREBALLP KA9.1",
12         "QUANTUM FIREBALLP LM20.4",
13         "QUANTUM FIREBALLP KX13.6",
14         "QUANTUM FIREBALLP KX20.5",
15         "QUANTUM FIREBALLP KX27.3",
16         "QUANTUM FIREBALLP LM20.5",
17         NULL
18 };
19
20 #define set_2regs(a, b)                                 \
21         do {                                            \
22                 hwif->OUTB((a + adj), indexreg);        \
23                 hwif->OUTB(b, datareg);                 \
24         } while(0)
25
26 #define set_ultra(a, b, c)                              \
27         do {                                            \
28                 set_2regs(0x10,(a));                    \
29                 set_2regs(0x11,(b));                    \
30                 set_2regs(0x12,(c));                    \
31         } while(0)
32
33 #define set_ata2(a, b)                                  \
34         do {                                            \
35                 set_2regs(0x0e,(a));                    \
36                 set_2regs(0x0f,(b));                    \
37         } while(0)
38
39 #define set_pio(a, b, c)                                \
40         do {                                            \
41                 set_2regs(0x0c,(a));                    \
42                 set_2regs(0x0d,(b));                    \
43                 set_2regs(0x13,(c));                    \
44         } while(0)
45
46 #define DISPLAY_PDC202XX_TIMINGS
47
48 static void init_setup_pdcnew(struct pci_dev *, ide_pci_device_t *);
49 static void init_setup_pdc20270(struct pci_dev *, ide_pci_device_t *);
50 static void init_setup_pdc20276(struct pci_dev *dev, ide_pci_device_t *d);
51 static unsigned int init_chipset_pdcnew(struct pci_dev *, const char *);
52 static void init_hwif_pdc202new(ide_hwif_t *);
53
54 static ide_pci_device_t pdcnew_chipsets[] __devinitdata = {
55         {       /* 0 */
56                 .vendor         = PCI_VENDOR_ID_PROMISE,
57                 .device         = PCI_DEVICE_ID_PROMISE_20268,
58                 .name           = "PDC20268",
59                 .init_setup     = init_setup_pdcnew,
60                 .init_chipset   = init_chipset_pdcnew,
61                 .init_iops      = NULL,
62                 .init_hwif      = init_hwif_pdc202new,
63                 .channels       = 2,
64                 .autodma        = AUTODMA,
65                 .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
66                 .bootable       = OFF_BOARD,
67                 .extra          = 0,
68         },{     /* 1 */
69                 .vendor         = PCI_VENDOR_ID_PROMISE,
70                 .device         = PCI_DEVICE_ID_PROMISE_20269,
71                 .name           = "PDC20269",
72                 .init_setup     = init_setup_pdcnew,
73                 .init_chipset   = init_chipset_pdcnew,
74                 .init_iops      = NULL,
75                 .init_hwif      = init_hwif_pdc202new,
76                 .channels       = 2,
77                 .autodma        = AUTODMA,
78                 .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
79                 .bootable       = OFF_BOARD,
80                 .extra          = 0,
81         },{     /* 2 */
82                 .vendor         = PCI_VENDOR_ID_PROMISE,
83                 .device         = PCI_DEVICE_ID_PROMISE_20270,
84                 .name           = "PDC20270",
85                 .init_setup     = init_setup_pdc20270,
86                 .init_chipset   = init_chipset_pdcnew,
87                 .init_iops      = NULL,
88                 .init_hwif      = init_hwif_pdc202new,
89                 .channels       = 2,
90                 .autodma        = AUTODMA,
91 #ifdef CONFIG_PDC202XX_FORCE
92                 .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
93 #else /* !CONFIG_PDC202XX_FORCE */
94                 .enablebits     = {{0x50,0x02,0x02}, {0x50,0x04,0x04}},
95 #endif
96                 .bootable       = OFF_BOARD,
97                 .extra          = 0,
98         },{     /* 3 */
99                 .vendor         = PCI_VENDOR_ID_PROMISE,
100                 .device         = PCI_DEVICE_ID_PROMISE_20271,
101                 .name           = "PDC20271",
102                 .init_setup     = init_setup_pdcnew,
103                 .init_chipset   = init_chipset_pdcnew,
104                 .init_iops      = NULL,
105                 .init_hwif      = init_hwif_pdc202new,
106                 .channels       = 2,
107                 .autodma        = AUTODMA,
108                 .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
109                 .bootable       = OFF_BOARD,
110                 .extra          = 0,
111         },{     /* 4 */
112                 .vendor         = PCI_VENDOR_ID_PROMISE,
113                 .device         = PCI_DEVICE_ID_PROMISE_20275,
114                 .name           = "PDC20275",
115                 .init_setup     = init_setup_pdcnew,
116                 .init_chipset   = init_chipset_pdcnew,
117                 .init_iops      = NULL,
118                 .init_hwif      = init_hwif_pdc202new,
119                 .channels       = 2,
120                 .autodma        = AUTODMA,
121                 .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
122                 .bootable       = OFF_BOARD,
123                 .extra          = 0,
124         },{     /* 5 */
125                 .vendor         = PCI_VENDOR_ID_PROMISE,
126                 .device         = PCI_DEVICE_ID_PROMISE_20276,
127                 .name           = "PDC20276",
128                 .init_setup     = init_setup_pdc20276,
129                 .init_chipset   = init_chipset_pdcnew,
130                 .init_iops      = NULL,
131                 .init_hwif      = init_hwif_pdc202new,
132                 .channels       = 2,
133                 .autodma        = AUTODMA,
134 #ifdef CONFIG_PDC202XX_FORCE
135                 .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
136 #else /* !CONFIG_PDC202XX_FORCE */
137                 .enablebits     = {{0x50,0x02,0x02}, {0x50,0x04,0x04}},
138 #endif
139                 .bootable       = OFF_BOARD,
140                 .extra          = 0,
141         },{     /* 6 */
142                 .vendor         = PCI_VENDOR_ID_PROMISE,
143                 .device         = PCI_DEVICE_ID_PROMISE_20277,
144                 .name           = "PDC20277",
145                 .init_setup     = init_setup_pdcnew,
146                 .init_chipset   = init_chipset_pdcnew,
147                 .init_iops      = NULL,
148                 .init_hwif      = init_hwif_pdc202new,
149                 .channels       = 2,
150                 .autodma        = AUTODMA,
151                 .enablebits     = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
152                 .bootable       = OFF_BOARD,
153                 .extra          = 0,
154         },{
155                 .vendor         = 0,
156                 .device         = 0,
157                 .channels       = 0,
158                 .bootable       = EOL,
159         }
160 };
161
162 #endif /* PDC202XX_H */