sys_dp264.c 17 KB

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