sys_dp264.c 17 KB

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