sys_dp264.c 17 KB

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