ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / alpha / kernel / sys_dp264.c
1 /*
2  *      linux/arch/alpha/kernel/sys_dp264.c
3  *
4  *      Copyright (C) 1995 David A Rusling
5  *      Copyright (C) 1996, 1999 Jay A Estabrook
6  *      Copyright (C) 1998, 1999 Richard Henderson
7  *
8  *      Modified by Christopher C. Chimelis, 2001 to
9  *      add support for the addition of Shark to the
10  *      Tsunami family.
11  *
12  * Code supporting the DP264 (EV6+TSUNAMI).
13  */
14
15 #include <linux/config.h>
16 #include <linux/kernel.h>
17 #include <linux/types.h>
18 #include <linux/mm.h>
19 #include <linux/sched.h>
20 #include <linux/pci.h>
21 #include <linux/init.h>
22
23 #include <asm/ptrace.h>
24 #include <asm/system.h>
25 #include <asm/dma.h>
26 #include <asm/irq.h>
27 #include <asm/bitops.h>
28 #include <asm/mmu_context.h>
29 #include <asm/io.h>
30 #include <asm/pgtable.h>
31 #include <asm/core_tsunami.h>
32 #include <asm/hwrpb.h>
33 #include <asm/tlbflush.h>
34
35 #include "proto.h"
36 #include "irq_impl.h"
37 #include "pci_impl.h"
38 #include "machvec_impl.h"
39
40
41 /* Note mask bit is true for ENABLED irqs.  */
42 static unsigned long cached_irq_mask;
43 /* dp264 boards handle at max four CPUs */
44 static unsigned long cpu_irq_affinity[4] = { 0UL, 0UL, 0UL, 0UL };
45
46 spinlock_t dp264_irq_lock = SPIN_LOCK_UNLOCKED;
47
48 static void
49 tsunami_update_irq_hw(unsigned long mask)
50 {
51         register tsunami_cchip *cchip = TSUNAMI_cchip;
52         unsigned long isa_enable = 1UL << 55;
53         register int bcpu = boot_cpuid;
54
55 #ifdef CONFIG_SMP
56         register unsigned long cpm = cpu_present_mask;
57         volatile unsigned long *dim0, *dim1, *dim2, *dim3;
58         unsigned long mask0, mask1, mask2, mask3, dummy;
59
60         mask &= ~isa_enable;
61         mask0 = mask & cpu_irq_affinity[0];
62         mask1 = mask & cpu_irq_affinity[1];
63         mask2 = mask & cpu_irq_affinity[2];
64         mask3 = mask & cpu_irq_affinity[3];
65
66         if (bcpu == 0) mask0 |= isa_enable;
67         else if (bcpu == 1) mask1 |= isa_enable;
68         else if (bcpu == 2) mask2 |= isa_enable;
69         else mask3 |= isa_enable;
70
71         dim0 = &cchip->dim0.csr;
72         dim1 = &cchip->dim1.csr;
73         dim2 = &cchip->dim2.csr;
74         dim3 = &cchip->dim3.csr;
75         if ((cpm & 1) == 0) dim0 = &dummy;
76         if ((cpm & 2) == 0) dim1 = &dummy;
77         if ((cpm & 4) == 0) dim2 = &dummy;
78         if ((cpm & 8) == 0) dim3 = &dummy;
79
80         *dim0 = mask0;
81         *dim1 = mask1;
82         *dim2 = mask2;
83         *dim3 = mask3;
84         mb();
85         *dim0;
86         *dim1;
87         *dim2;
88         *dim3;
89 #else
90         volatile unsigned long *dimB;
91         if (bcpu == 0) dimB = &cchip->dim0.csr;
92         else if (bcpu == 1) dimB = &cchip->dim1.csr;
93         else if (bcpu == 2) dimB = &cchip->dim2.csr;
94         else dimB = &cchip->dim3.csr;
95
96         *dimB = mask | isa_enable;
97         mb();
98         *dimB;
99 #endif
100 }
101
102 static void
103 dp264_enable_irq(unsigned int irq)
104 {
105         spin_lock(&dp264_irq_lock);
106         cached_irq_mask |= 1UL << irq;
107         tsunami_update_irq_hw(cached_irq_mask);
108         spin_unlock(&dp264_irq_lock);
109 }
110
111 static void
112 dp264_disable_irq(unsigned int irq)
113 {
114         spin_lock(&dp264_irq_lock);
115         cached_irq_mask &= ~(1UL << irq);
116         tsunami_update_irq_hw(cached_irq_mask);
117         spin_unlock(&dp264_irq_lock);
118 }
119
120 static unsigned int
121 dp264_startup_irq(unsigned int irq)
122
123         dp264_enable_irq(irq);
124         return 0; /* never anything pending */
125 }
126
127 static void
128 dp264_end_irq(unsigned int irq)
129
130         if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
131                 dp264_enable_irq(irq);
132 }
133
134 static void
135 clipper_enable_irq(unsigned int irq)
136 {
137         spin_lock(&dp264_irq_lock);
138         cached_irq_mask |= 1UL << (irq - 16);
139         tsunami_update_irq_hw(cached_irq_mask);
140         spin_unlock(&dp264_irq_lock);
141 }
142
143 static void
144 clipper_disable_irq(unsigned int irq)
145 {
146         spin_lock(&dp264_irq_lock);
147         cached_irq_mask &= ~(1UL << (irq - 16));
148         tsunami_update_irq_hw(cached_irq_mask);
149         spin_unlock(&dp264_irq_lock);
150 }
151
152 static unsigned int
153 clipper_startup_irq(unsigned int irq)
154
155         clipper_enable_irq(irq);
156         return 0; /* never anything pending */
157 }
158
159 static void
160 clipper_end_irq(unsigned int irq)
161
162         if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
163                 clipper_enable_irq(irq);
164 }
165
166 static void
167 cpu_set_irq_affinity(unsigned int irq, unsigned long affinity)
168 {
169         int cpu;
170
171         for (cpu = 0; cpu < 4; cpu++) {
172                 unsigned long aff = cpu_irq_affinity[cpu];
173                 if (affinity & (1UL << cpu))
174                         aff |= 1UL << irq;
175                 else
176                         aff &= ~(1UL << irq);
177                 cpu_irq_affinity[cpu] = aff;
178         }
179 }
180
181 static void
182 dp264_set_affinity(unsigned int irq, unsigned long affinity)
183
184         spin_lock(&dp264_irq_lock);
185         cpu_set_irq_affinity(irq, affinity);
186         tsunami_update_irq_hw(cached_irq_mask);
187         spin_unlock(&dp264_irq_lock);
188 }
189
190 static void
191 clipper_set_affinity(unsigned int irq, unsigned long affinity)
192
193         spin_lock(&dp264_irq_lock);
194         cpu_set_irq_affinity(irq - 16, affinity);
195         tsunami_update_irq_hw(cached_irq_mask);
196         spin_unlock(&dp264_irq_lock);
197 }
198
199 static struct hw_interrupt_type dp264_irq_type = {
200         .typename       = "DP264",
201         .startup        = dp264_startup_irq,
202         .shutdown       = dp264_disable_irq,
203         .enable         = dp264_enable_irq,
204         .disable        = dp264_disable_irq,
205         .ack            = dp264_disable_irq,
206         .end            = dp264_end_irq,
207         .set_affinity   = dp264_set_affinity,
208 };
209
210 static struct hw_interrupt_type clipper_irq_type = {
211         .typename       = "CLIPPER",
212         .startup        = clipper_startup_irq,
213         .shutdown       = clipper_disable_irq,
214         .enable         = clipper_enable_irq,
215         .disable        = clipper_disable_irq,
216         .ack            = clipper_disable_irq,
217         .end            = clipper_end_irq,
218         .set_affinity   = clipper_set_affinity,
219 };
220
221 static void
222 dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
223 {
224 #if 1
225         printk("dp264_device_interrupt: NOT IMPLEMENTED YET!! \n");
226 #else
227         unsigned long pld;
228         unsigned int i;
229
230         /* Read the interrupt summary register of TSUNAMI */
231         pld = TSUNAMI_cchip->dir0.csr;
232
233         /*
234          * Now for every possible bit set, work through them and call
235          * the appropriate interrupt handler.
236          */
237         while (pld) {
238                 i = ffz(~pld);
239                 pld &= pld - 1; /* clear least bit set */
240                 if (i == 55)
241                         isa_device_interrupt(vector, regs);
242                 else
243                         handle_irq(16 + i, 16 + i, regs);
244 #if 0
245                 TSUNAMI_cchip->dir0.csr = 1UL << i; mb();
246                 tmp = TSUNAMI_cchip->dir0.csr;
247 #endif
248         }
249 #endif
250 }
251
252 static void 
253 dp264_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
254 {
255         int irq;
256
257         irq = (vector - 0x800) >> 4;
258
259         /*
260          * The SRM console reports PCI interrupts with a vector calculated by:
261          *
262          *      0x900 + (0x10 * DRIR-bit)
263          *
264          * So bit 16 shows up as IRQ 32, etc.
265          * 
266          * On DP264/BRICK/MONET, we adjust it down by 16 because at least
267          * that many of the low order bits of the DRIR are not used, and
268          * so we don't count them.
269          */
270         if (irq >= 32)
271                 irq -= 16;
272
273         handle_irq(irq, regs);
274 }
275
276 static void 
277 clipper_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
278 {
279         int irq;
280
281         irq = (vector - 0x800) >> 4;
282
283 /*
284          * The SRM console reports PCI interrupts with a vector calculated by:
285          *
286          *      0x900 + (0x10 * DRIR-bit)
287          *
288          * So bit 16 shows up as IRQ 32, etc.
289          * 
290          * CLIPPER uses bits 8-47 for PCI interrupts, so we do not need
291          * to scale down the vector reported, we just use it.
292          *
293          * Eg IRQ 24 is DRIR bit 8, etc, etc
294          */
295         handle_irq(irq, regs);
296 }
297
298 static void __init
299 init_tsunami_irqs(struct hw_interrupt_type * ops, int imin, int imax)
300 {
301         long i;
302         for (i = imin; i <= imax; ++i) {
303                 irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
304                 irq_desc[i].handler = ops;
305         }
306 }
307
308 static void __init
309 dp264_init_irq(void)
310 {
311         outb(0, DMA1_RESET_REG);
312         outb(0, DMA2_RESET_REG);
313         outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
314         outb(0, DMA2_MASK_REG);
315
316         if (alpha_using_srm)
317                 alpha_mv.device_interrupt = dp264_srm_device_interrupt;
318
319         tsunami_update_irq_hw(0);
320
321         init_i8259a_irqs();
322         init_tsunami_irqs(&dp264_irq_type, 16, 47);
323 }
324
325 static void __init
326 clipper_init_irq(void)
327 {
328         outb(0, DMA1_RESET_REG);
329         outb(0, DMA2_RESET_REG);
330         outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
331         outb(0, DMA2_MASK_REG);
332
333         if (alpha_using_srm)
334                 alpha_mv.device_interrupt = clipper_srm_device_interrupt;
335
336         tsunami_update_irq_hw(0);
337
338         init_i8259a_irqs();
339         init_tsunami_irqs(&clipper_irq_type, 24, 63);
340 }
341
342
343 /*
344  * PCI Fixup configuration.
345  *
346  * Summary @ TSUNAMI_CSR_DIM0:
347  * Bit      Meaning
348  * 0-17     Unused
349  *18        Interrupt SCSI B (Adaptec 7895 builtin)
350  *19        Interrupt SCSI A (Adaptec 7895 builtin)
351  *20        Interrupt Line D from slot 2 PCI0
352  *21        Interrupt Line C from slot 2 PCI0
353  *22        Interrupt Line B from slot 2 PCI0
354  *23        Interrupt Line A from slot 2 PCI0
355  *24        Interrupt Line D from slot 1 PCI0
356  *25        Interrupt Line C from slot 1 PCI0
357  *26        Interrupt Line B from slot 1 PCI0
358  *27        Interrupt Line A from slot 1 PCI0
359  *28        Interrupt Line D from slot 0 PCI0
360  *29        Interrupt Line C from slot 0 PCI0
361  *30        Interrupt Line B from slot 0 PCI0
362  *31        Interrupt Line A from slot 0 PCI0
363  *
364  *32        Interrupt Line D from slot 3 PCI1
365  *33        Interrupt Line C from slot 3 PCI1
366  *34        Interrupt Line B from slot 3 PCI1
367  *35        Interrupt Line A from slot 3 PCI1
368  *36        Interrupt Line D from slot 2 PCI1
369  *37        Interrupt Line C from slot 2 PCI1
370  *38        Interrupt Line B from slot 2 PCI1
371  *39        Interrupt Line A from slot 2 PCI1
372  *40        Interrupt Line D from slot 1 PCI1
373  *41        Interrupt Line C from slot 1 PCI1
374  *42        Interrupt Line B from slot 1 PCI1
375  *43        Interrupt Line A from slot 1 PCI1
376  *44        Interrupt Line D from slot 0 PCI1
377  *45        Interrupt Line C from slot 0 PCI1
378  *46        Interrupt Line B from slot 0 PCI1
379  *47        Interrupt Line A from slot 0 PCI1
380  *48-52     Unused
381  *53        PCI0 NMI (from Cypress)
382  *54        PCI0 SMI INT (from Cypress)
383  *55        PCI0 ISA Interrupt (from Cypress)
384  *56-60     Unused
385  *61        PCI1 Bus Error
386  *62        PCI0 Bus Error
387  *63        Reserved
388  *
389  * IdSel        
390  *   5   Cypress Bridge I/O
391  *   6   SCSI Adaptec builtin
392  *   7   64 bit PCI option slot 0 (all busses)
393  *   8   64 bit PCI option slot 1 (all busses)
394  *   9   64 bit PCI option slot 2 (all busses)
395  *  10   64 bit PCI option slot 3 (not bus 0)
396  */
397
398 static int __init
399 dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
400 {
401         static char irq_tab[6][5] __initdata = {
402                 /*INT    INTA   INTB   INTC   INTD */
403                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 5 ISA Bridge */
404                 { 16+ 3, 16+ 3, 16+ 2, 16+ 2, 16+ 2}, /* IdSel 6 SCSI builtin*/
405                 { 16+15, 16+15, 16+14, 16+13, 16+12}, /* IdSel 7 slot 0 */
406                 { 16+11, 16+11, 16+10, 16+ 9, 16+ 8}, /* IdSel 8 slot 1 */
407                 { 16+ 7, 16+ 7, 16+ 6, 16+ 5, 16+ 4}, /* IdSel 9 slot 2 */
408                 { 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0}  /* IdSel 10 slot 3 */
409         };
410         const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5;
411
412         struct pci_controller *hose = dev->sysdata;
413         int irq = COMMON_TABLE_LOOKUP;
414
415         if (irq > 0) {
416                 irq += 16 * hose->index;
417         } else {
418                 /* ??? The Contaq IDE controller on the ISA bridge uses
419                    "legacy" interrupts 14 and 15.  I don't know if anything
420                    can wind up at the same slot+pin on hose1, so we'll
421                    just have to trust whatever value the console might
422                    have assigned.  */
423
424                 u8 irq8;
425                 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8);
426                 irq = irq8;
427         }
428
429         return irq;
430 }
431
432 static int __init
433 monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
434 {
435         static char irq_tab[13][5] __initdata = {
436                 /*INT    INTA   INTB   INTC   INTD */
437                 {    45,    45,    45,    45,    45}, /* IdSel 3 21143 PCI1 */
438                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 4 unused */
439                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 5 unused */
440                 {    47,    47,    47,    47,    47}, /* IdSel 6 SCSI PCI1 */
441                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 7 ISA Bridge */
442                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 8 P2P PCI1 */
443 #if 1
444                 {    28,    28,    29,    30,    31}, /* IdSel 14 slot 4 PCI2*/
445                 {    24,    24,    25,    26,    27}, /* IdSel 15 slot 5 PCI2*/
446 #else
447                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 9 unused */
448                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 10 unused */
449 #endif
450                 {    40,    40,    41,    42,    43}, /* IdSel 11 slot 1 PCI0*/
451                 {    36,    36,    37,    38,    39}, /* IdSel 12 slot 2 PCI0*/
452                 {    32,    32,    33,    34,    35}, /* IdSel 13 slot 3 PCI0*/
453                 {    28,    28,    29,    30,    31}, /* IdSel 14 slot 4 PCI2*/
454                 {    24,    24,    25,    26,    27}  /* IdSel 15 slot 5 PCI2*/
455         };
456         const long min_idsel = 3, max_idsel = 15, irqs_per_slot = 5;
457         return COMMON_TABLE_LOOKUP;
458 }
459
460 static u8 __init
461 monet_swizzle(struct pci_dev *dev, u8 *pinp)
462 {
463         struct pci_controller *hose = dev->sysdata;
464         int slot, pin = *pinp;
465
466         if (!dev->bus->parent) {
467                 slot = PCI_SLOT(dev->devfn);
468         }
469         /* Check for the built-in bridge on hose 1. */
470         else if (hose->index == 1 && PCI_SLOT(dev->bus->self->devfn) == 8) {
471                 slot = PCI_SLOT(dev->devfn);
472         } else {
473                 /* Must be a card-based bridge.  */
474                 do {
475                         /* Check for built-in bridge on hose 1. */
476                         if (hose->index == 1 &&
477                             PCI_SLOT(dev->bus->self->devfn) == 8) {
478                                 slot = PCI_SLOT(dev->devfn);
479                                 break;
480                         }
481                         pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn)) ;
482
483                         /* Move up the chain of bridges.  */
484                         dev = dev->bus->self;
485                         /* Slot of the next bridge.  */
486                         slot = PCI_SLOT(dev->devfn);
487                 } while (dev->bus->self);
488         }
489         *pinp = pin;
490         return slot;
491 }
492
493 static int __init
494 webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
495 {
496         static char irq_tab[13][5] __initdata = {
497                 /*INT    INTA   INTB   INTC   INTD */
498                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 7 ISA Bridge */
499                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 8 unused */
500                 {    29,    29,    29,    29,    29}, /* IdSel 9 21143 #1 */
501                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 10 unused */
502                 {    30,    30,    30,    30,    30}, /* IdSel 11 21143 #2 */
503                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 12 unused */
504                 {    -1,    -1,    -1,    -1,    -1}, /* IdSel 13 unused */
505                 {    35,    35,    34,    33,    32}, /* IdSel 14 slot 0 */
506                 {    39,    39,    38,    37,    36}, /* IdSel 15 slot 1 */
507                 {    43,    43,    42,    41,    40}, /* IdSel 16 slot 2 */
508                 {    47,    47,    46,    45,    44}, /* IdSel 17 slot 3 */
509         };
510         const long min_idsel = 7, max_idsel = 17, irqs_per_slot = 5;
511         return COMMON_TABLE_LOOKUP;
512 }
513
514 static int __init
515 clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
516 {
517         static char irq_tab[7][5] __initdata = {
518                 /*INT    INTA   INTB   INTC   INTD */
519                 { 16+ 8, 16+ 8, 16+ 9, 16+10, 16+11}, /* IdSel 1 slot 1 */
520                 { 16+12, 16+12, 16+13, 16+14, 16+15}, /* IdSel 2 slot 2 */
521                 { 16+16, 16+16, 16+17, 16+18, 16+19}, /* IdSel 3 slot 3 */
522                 { 16+20, 16+20, 16+21, 16+22, 16+23}, /* IdSel 4 slot 4 */
523                 { 16+24, 16+24, 16+25, 16+26, 16+27}, /* IdSel 5 slot 5 */
524                 { 16+28, 16+28, 16+29, 16+30, 16+31}, /* IdSel 6 slot 6 */
525                 {    -1,    -1,    -1,    -1,    -1}  /* IdSel 7 ISA Bridge */
526         };
527         const long min_idsel = 1, max_idsel = 7, irqs_per_slot = 5;
528
529         struct pci_controller *hose = dev->sysdata;
530         int irq = COMMON_TABLE_LOOKUP;
531
532         if (irq > 0)
533                 irq += 16 * hose->index;
534
535         return irq;
536 }
537
538 static void __init
539 dp264_init_pci(void)
540 {
541         common_init_pci();
542         SMC669_Init(0);
543 }
544
545 static void __init
546 monet_init_pci(void)
547 {
548         common_init_pci();
549         SMC669_Init(1);
550         es1888_init();
551 }
552
553 static void __init
554 webbrick_init_arch(void)
555 {
556         tsunami_init_arch();
557
558         /* Tsunami caches 4 PTEs at a time; DS10 has only 1 hose. */
559         hose_head->sg_isa->align_entry = 4;
560         hose_head->sg_pci->align_entry = 4;
561 }
562
563
564 /*
565  * The System Vectors
566  */
567
568 struct alpha_machine_vector dp264_mv __initmv = {
569         .vector_name            = "DP264",
570         DO_EV6_MMU,
571         DO_DEFAULT_RTC,
572         DO_TSUNAMI_IO,
573         DO_TSUNAMI_BUS,
574         .machine_check          = tsunami_machine_check,
575         .max_isa_dma_address    = ALPHA_MAX_ISA_DMA_ADDRESS,
576         .min_io_address         = DEFAULT_IO_BASE,
577         .min_mem_address        = DEFAULT_MEM_BASE,
578         .pci_dac_offset         = TSUNAMI_DAC_OFFSET,
579
580         .nr_irqs                = 64,
581         .device_interrupt       = dp264_device_interrupt,
582
583         .init_arch              = tsunami_init_arch,
584         .init_irq               = dp264_init_irq,
585         .init_rtc               = common_init_rtc,
586         .init_pci               = dp264_init_pci,
587         .kill_arch              = tsunami_kill_arch,
588         .pci_map_irq            = dp264_map_irq,
589         .pci_swizzle            = common_swizzle,
590 };
591 ALIAS_MV(dp264)
592
593 struct alpha_machine_vector monet_mv __initmv = {
594         .vector_name            = "Monet",
595         DO_EV6_MMU,
596         DO_DEFAULT_RTC,
597         DO_TSUNAMI_IO,
598         DO_TSUNAMI_BUS,
599         .machine_check          = tsunami_machine_check,
600         .max_isa_dma_address    = ALPHA_MAX_ISA_DMA_ADDRESS,
601         .min_io_address         = DEFAULT_IO_BASE,
602         .min_mem_address        = DEFAULT_MEM_BASE,
603         .pci_dac_offset         = TSUNAMI_DAC_OFFSET,
604
605         .nr_irqs                = 64,
606         .device_interrupt       = dp264_device_interrupt,
607
608         .init_arch              = tsunami_init_arch,
609         .init_irq               = dp264_init_irq,
610         .init_rtc               = common_init_rtc,
611         .init_pci               = monet_init_pci,
612         .kill_arch              = tsunami_kill_arch,
613         .pci_map_irq            = monet_map_irq,
614         .pci_swizzle            = monet_swizzle,
615 };
616
617 struct alpha_machine_vector webbrick_mv __initmv = {
618         .vector_name            = "Webbrick",
619         DO_EV6_MMU,
620         DO_DEFAULT_RTC,
621         DO_TSUNAMI_IO,
622         DO_TSUNAMI_BUS,
623         .machine_check          = tsunami_machine_check,
624         .max_isa_dma_address    = ALPHA_MAX_ISA_DMA_ADDRESS,
625         .min_io_address         = DEFAULT_IO_BASE,
626         .min_mem_address        = DEFAULT_MEM_BASE,
627         .pci_dac_offset         = TSUNAMI_DAC_OFFSET,
628
629         .nr_irqs                = 64,
630         .device_interrupt       = dp264_device_interrupt,
631
632         .init_arch              = webbrick_init_arch,
633         .init_irq               = dp264_init_irq,
634         .init_rtc               = common_init_rtc,
635         .init_pci               = common_init_pci,
636         .kill_arch              = tsunami_kill_arch,
637         .pci_map_irq            = webbrick_map_irq,
638         .pci_swizzle            = common_swizzle,
639 };
640
641 struct alpha_machine_vector clipper_mv __initmv = {
642         .vector_name            = "Clipper",
643         DO_EV6_MMU,
644         DO_DEFAULT_RTC,
645         DO_TSUNAMI_IO,
646         DO_TSUNAMI_BUS,
647         .machine_check          = tsunami_machine_check,
648         .max_isa_dma_address    = ALPHA_MAX_ISA_DMA_ADDRESS,
649         .min_io_address         = DEFAULT_IO_BASE,
650         .min_mem_address        = DEFAULT_MEM_BASE,
651         .pci_dac_offset         = TSUNAMI_DAC_OFFSET,
652
653         .nr_irqs                = 64,
654         .device_interrupt       = dp264_device_interrupt,
655
656         .init_arch              = tsunami_init_arch,
657         .init_irq               = clipper_init_irq,
658         .init_rtc               = common_init_rtc,
659         .init_pci               = common_init_pci,
660         .kill_arch              = tsunami_kill_arch,
661         .pci_map_irq            = clipper_map_irq,
662         .pci_swizzle            = common_swizzle,
663 };
664
665 /* Sharks strongly resemble Clipper, at least as far
666  * as interrupt routing, etc, so we're using the
667  * same functions as Clipper does
668  */
669
670 struct alpha_machine_vector shark_mv __initmv = {
671         .vector_name            = "Shark",
672         DO_EV6_MMU,
673         DO_DEFAULT_RTC,
674         DO_TSUNAMI_IO,
675         DO_TSUNAMI_BUS,
676         .machine_check          = tsunami_machine_check,
677         .max_isa_dma_address    = ALPHA_MAX_ISA_DMA_ADDRESS,
678         .min_io_address         = DEFAULT_IO_BASE,
679         .min_mem_address        = DEFAULT_MEM_BASE,
680         .pci_dac_offset         = TSUNAMI_DAC_OFFSET,
681
682         .nr_irqs                = 64,
683         .device_interrupt       = dp264_device_interrupt,
684
685         .init_arch              = tsunami_init_arch,
686         .init_irq               = clipper_init_irq,
687         .init_rtc               = common_init_rtc,
688         .init_pci               = common_init_pci,
689         .kill_arch              = tsunami_kill_arch,
690         .pci_map_irq            = clipper_map_irq,
691         .pci_swizzle            = common_swizzle,
692 };
693
694 /* No alpha_mv alias for webbrick/monet/clipper, since we compile them
695    in unconditionally with DP264; setup_arch knows how to cope.  */