sys_sable.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. /*
  2. * linux/arch/alpha/kernel/sys_sable.c
  3. *
  4. * Copyright (C) 1995 David A Rusling
  5. * Copyright (C) 1996 Jay A Estabrook
  6. * Copyright (C) 1998, 1999 Richard Henderson
  7. *
  8. * Code supporting the Sable, Sable-Gamma, and Lynx systems.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/types.h>
  12. #include <linux/mm.h>
  13. #include <linux/sched.h>
  14. #include <linux/pci.h>
  15. #include <linux/init.h>
  16. #include <asm/ptrace.h>
  17. #include <asm/system.h>
  18. #include <asm/dma.h>
  19. #include <asm/irq.h>
  20. #include <asm/mmu_context.h>
  21. #include <asm/io.h>
  22. #include <asm/pgtable.h>
  23. #include <asm/core_t2.h>
  24. #include <asm/tlbflush.h>
  25. #include "proto.h"
  26. #include "irq_impl.h"
  27. #include "pci_impl.h"
  28. #include "machvec_impl.h"
  29. DEFINE_SPINLOCK(sable_lynx_irq_lock);
  30. typedef struct irq_swizzle_struct
  31. {
  32. char irq_to_mask[64];
  33. char mask_to_irq[64];
  34. /* Note mask bit is true for DISABLED irqs. */
  35. unsigned long shadow_mask;
  36. void (*update_irq_hw)(unsigned long bit, unsigned long mask);
  37. void (*ack_irq_hw)(unsigned long bit);
  38. } irq_swizzle_t;
  39. static irq_swizzle_t *sable_lynx_irq_swizzle;
  40. static void sable_lynx_init_irq(int nr_of_irqs);
  41. #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SABLE)
  42. /***********************************************************************/
  43. /*
  44. * For SABLE, which is really baroque, we manage 40 IRQ's, but the
  45. * hardware really only supports 24, not via normal ISA PIC,
  46. * but cascaded custom 8259's, etc.
  47. * 0-7 (char at 536)
  48. * 8-15 (char at 53a)
  49. * 16-23 (char at 53c)
  50. *
  51. * Summary Registers (536/53a/53c):
  52. *
  53. * Bit Meaning Kernel IRQ
  54. *------------------------------------------
  55. * 0 PCI slot 0 34
  56. * 1 NCR810 (builtin) 33
  57. * 2 TULIP (builtin) 32
  58. * 3 mouse 12
  59. * 4 PCI slot 1 35
  60. * 5 PCI slot 2 36
  61. * 6 keyboard 1
  62. * 7 floppy 6
  63. * 8 COM2 3
  64. * 9 parallel port 7
  65. *10 EISA irq 3 -
  66. *11 EISA irq 4 -
  67. *12 EISA irq 5 5
  68. *13 EISA irq 6 -
  69. *14 EISA irq 7 -
  70. *15 COM1 4
  71. *16 EISA irq 9 9
  72. *17 EISA irq 10 10
  73. *18 EISA irq 11 11
  74. *19 EISA irq 12 -
  75. *20 EISA irq 13 -
  76. *21 EISA irq 14 14
  77. *22 NC 15
  78. *23 IIC -
  79. */
  80. static void
  81. sable_update_irq_hw(unsigned long bit, unsigned long mask)
  82. {
  83. int port = 0x537;
  84. if (bit >= 16) {
  85. port = 0x53d;
  86. mask >>= 16;
  87. } else if (bit >= 8) {
  88. port = 0x53b;
  89. mask >>= 8;
  90. }
  91. outb(mask, port);
  92. }
  93. static void
  94. sable_ack_irq_hw(unsigned long bit)
  95. {
  96. int port, val1, val2;
  97. if (bit >= 16) {
  98. port = 0x53c;
  99. val1 = 0xE0 | (bit - 16);
  100. val2 = 0xE0 | 4;
  101. } else if (bit >= 8) {
  102. port = 0x53a;
  103. val1 = 0xE0 | (bit - 8);
  104. val2 = 0xE0 | 3;
  105. } else {
  106. port = 0x536;
  107. val1 = 0xE0 | (bit - 0);
  108. val2 = 0xE0 | 1;
  109. }
  110. outb(val1, port); /* ack the slave */
  111. outb(val2, 0x534); /* ack the master */
  112. }
  113. static irq_swizzle_t sable_irq_swizzle = {
  114. {
  115. -1, 6, -1, 8, 15, 12, 7, 9, /* pseudo PIC 0-7 */
  116. -1, 16, 17, 18, 3, -1, 21, 22, /* pseudo PIC 8-15 */
  117. -1, -1, -1, -1, -1, -1, -1, -1, /* pseudo EISA 0-7 */
  118. -1, -1, -1, -1, -1, -1, -1, -1, /* pseudo EISA 8-15 */
  119. 2, 1, 0, 4, 5, -1, -1, -1, /* pseudo PCI */
  120. -1, -1, -1, -1, -1, -1, -1, -1, /* */
  121. -1, -1, -1, -1, -1, -1, -1, -1, /* */
  122. -1, -1, -1, -1, -1, -1, -1, -1 /* */
  123. },
  124. {
  125. 34, 33, 32, 12, 35, 36, 1, 6, /* mask 0-7 */
  126. 3, 7, -1, -1, 5, -1, -1, 4, /* mask 8-15 */
  127. 9, 10, 11, -1, -1, 14, 15, -1, /* mask 16-23 */
  128. -1, -1, -1, -1, -1, -1, -1, -1, /* */
  129. -1, -1, -1, -1, -1, -1, -1, -1, /* */
  130. -1, -1, -1, -1, -1, -1, -1, -1, /* */
  131. -1, -1, -1, -1, -1, -1, -1, -1, /* */
  132. -1, -1, -1, -1, -1, -1, -1, -1 /* */
  133. },
  134. -1,
  135. sable_update_irq_hw,
  136. sable_ack_irq_hw
  137. };
  138. static void __init
  139. sable_init_irq(void)
  140. {
  141. outb(-1, 0x537); /* slave 0 */
  142. outb(-1, 0x53b); /* slave 1 */
  143. outb(-1, 0x53d); /* slave 2 */
  144. outb(0x44, 0x535); /* enable cascades in master */
  145. sable_lynx_irq_swizzle = &sable_irq_swizzle;
  146. sable_lynx_init_irq(40);
  147. }
  148. /*
  149. * PCI Fixup configuration for ALPHA SABLE (2100).
  150. *
  151. * The device to slot mapping looks like:
  152. *
  153. * Slot Device
  154. * 0 TULIP
  155. * 1 SCSI
  156. * 2 PCI-EISA bridge
  157. * 3 none
  158. * 4 none
  159. * 5 none
  160. * 6 PCI on board slot 0
  161. * 7 PCI on board slot 1
  162. * 8 PCI on board slot 2
  163. *
  164. *
  165. * This two layered interrupt approach means that we allocate IRQ 16 and
  166. * above for PCI interrupts. The IRQ relates to which bit the interrupt
  167. * comes in on. This makes interrupt processing much easier.
  168. */
  169. /*
  170. * NOTE: the IRQ assignments below are arbitrary, but need to be consistent
  171. * with the values in the irq swizzling tables above.
  172. */
  173. static int __init
  174. sable_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  175. {
  176. static char irq_tab[9][5] __initdata = {
  177. /*INT INTA INTB INTC INTD */
  178. { 32+0, 32+0, 32+0, 32+0, 32+0}, /* IdSel 0, TULIP */
  179. { 32+1, 32+1, 32+1, 32+1, 32+1}, /* IdSel 1, SCSI */
  180. { -1, -1, -1, -1, -1}, /* IdSel 2, SIO */
  181. { -1, -1, -1, -1, -1}, /* IdSel 3, none */
  182. { -1, -1, -1, -1, -1}, /* IdSel 4, none */
  183. { -1, -1, -1, -1, -1}, /* IdSel 5, none */
  184. { 32+2, 32+2, 32+2, 32+2, 32+2}, /* IdSel 6, slot 0 */
  185. { 32+3, 32+3, 32+3, 32+3, 32+3}, /* IdSel 7, slot 1 */
  186. { 32+4, 32+4, 32+4, 32+4, 32+4} /* IdSel 8, slot 2 */
  187. };
  188. long min_idsel = 0, max_idsel = 8, irqs_per_slot = 5;
  189. return COMMON_TABLE_LOOKUP;
  190. }
  191. #endif /* defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SABLE) */
  192. #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_LYNX)
  193. /***********************************************************************/
  194. /* LYNX hardware specifics
  195. */
  196. /*
  197. * For LYNX, which is also baroque, we manage 64 IRQs, via a custom IC.
  198. *
  199. * Bit Meaning Kernel IRQ
  200. *------------------------------------------
  201. * 0
  202. * 1
  203. * 2
  204. * 3 mouse 12
  205. * 4
  206. * 5
  207. * 6 keyboard 1
  208. * 7 floppy 6
  209. * 8 COM2 3
  210. * 9 parallel port 7
  211. *10 EISA irq 3 -
  212. *11 EISA irq 4 -
  213. *12 EISA irq 5 5
  214. *13 EISA irq 6 -
  215. *14 EISA irq 7 -
  216. *15 COM1 4
  217. *16 EISA irq 9 9
  218. *17 EISA irq 10 10
  219. *18 EISA irq 11 11
  220. *19 EISA irq 12 -
  221. *20
  222. *21 EISA irq 14 14
  223. *22 EISA irq 15 15
  224. *23 IIC -
  225. *24 VGA (builtin) -
  226. *25
  227. *26
  228. *27
  229. *28 NCR810 (builtin) 28
  230. *29
  231. *30
  232. *31
  233. *32 PCI 0 slot 4 A primary bus 32
  234. *33 PCI 0 slot 4 B primary bus 33
  235. *34 PCI 0 slot 4 C primary bus 34
  236. *35 PCI 0 slot 4 D primary bus
  237. *36 PCI 0 slot 5 A primary bus
  238. *37 PCI 0 slot 5 B primary bus
  239. *38 PCI 0 slot 5 C primary bus
  240. *39 PCI 0 slot 5 D primary bus
  241. *40 PCI 0 slot 6 A primary bus
  242. *41 PCI 0 slot 6 B primary bus
  243. *42 PCI 0 slot 6 C primary bus
  244. *43 PCI 0 slot 6 D primary bus
  245. *44 PCI 0 slot 7 A primary bus
  246. *45 PCI 0 slot 7 B primary bus
  247. *46 PCI 0 slot 7 C primary bus
  248. *47 PCI 0 slot 7 D primary bus
  249. *48 PCI 0 slot 0 A secondary bus
  250. *49 PCI 0 slot 0 B secondary bus
  251. *50 PCI 0 slot 0 C secondary bus
  252. *51 PCI 0 slot 0 D secondary bus
  253. *52 PCI 0 slot 1 A secondary bus
  254. *53 PCI 0 slot 1 B secondary bus
  255. *54 PCI 0 slot 1 C secondary bus
  256. *55 PCI 0 slot 1 D secondary bus
  257. *56 PCI 0 slot 2 A secondary bus
  258. *57 PCI 0 slot 2 B secondary bus
  259. *58 PCI 0 slot 2 C secondary bus
  260. *59 PCI 0 slot 2 D secondary bus
  261. *60 PCI 0 slot 3 A secondary bus
  262. *61 PCI 0 slot 3 B secondary bus
  263. *62 PCI 0 slot 3 C secondary bus
  264. *63 PCI 0 slot 3 D secondary bus
  265. */
  266. static void
  267. lynx_update_irq_hw(unsigned long bit, unsigned long mask)
  268. {
  269. /*
  270. * Write the AIR register on the T3/T4 with the
  271. * address of the IC mask register (offset 0x40)
  272. */
  273. *(vulp)T2_AIR = 0x40;
  274. mb();
  275. *(vulp)T2_AIR; /* re-read to force write */
  276. mb();
  277. *(vulp)T2_DIR = mask;
  278. mb();
  279. mb();
  280. }
  281. static void
  282. lynx_ack_irq_hw(unsigned long bit)
  283. {
  284. *(vulp)T2_VAR = (u_long) bit;
  285. mb();
  286. mb();
  287. }
  288. static irq_swizzle_t lynx_irq_swizzle = {
  289. { /* irq_to_mask */
  290. -1, 6, -1, 8, 15, 12, 7, 9, /* pseudo PIC 0-7 */
  291. -1, 16, 17, 18, 3, -1, 21, 22, /* pseudo PIC 8-15 */
  292. -1, -1, -1, -1, -1, -1, -1, -1, /* pseudo */
  293. -1, -1, -1, -1, 28, -1, -1, -1, /* pseudo */
  294. 32, 33, 34, 35, 36, 37, 38, 39, /* mask 32-39 */
  295. 40, 41, 42, 43, 44, 45, 46, 47, /* mask 40-47 */
  296. 48, 49, 50, 51, 52, 53, 54, 55, /* mask 48-55 */
  297. 56, 57, 58, 59, 60, 61, 62, 63 /* mask 56-63 */
  298. },
  299. { /* mask_to_irq */
  300. -1, -1, -1, 12, -1, -1, 1, 6, /* mask 0-7 */
  301. 3, 7, -1, -1, 5, -1, -1, 4, /* mask 8-15 */
  302. 9, 10, 11, -1, -1, 14, 15, -1, /* mask 16-23 */
  303. -1, -1, -1, -1, 28, -1, -1, -1, /* mask 24-31 */
  304. 32, 33, 34, 35, 36, 37, 38, 39, /* mask 32-39 */
  305. 40, 41, 42, 43, 44, 45, 46, 47, /* mask 40-47 */
  306. 48, 49, 50, 51, 52, 53, 54, 55, /* mask 48-55 */
  307. 56, 57, 58, 59, 60, 61, 62, 63 /* mask 56-63 */
  308. },
  309. -1,
  310. lynx_update_irq_hw,
  311. lynx_ack_irq_hw
  312. };
  313. static void __init
  314. lynx_init_irq(void)
  315. {
  316. sable_lynx_irq_swizzle = &lynx_irq_swizzle;
  317. sable_lynx_init_irq(64);
  318. }
  319. /*
  320. * PCI Fixup configuration for ALPHA LYNX (2100A)
  321. *
  322. * The device to slot mapping looks like:
  323. *
  324. * Slot Device
  325. * 0 none
  326. * 1 none
  327. * 2 PCI-EISA bridge
  328. * 3 PCI-PCI bridge
  329. * 4 NCR 810 (Demi-Lynx only)
  330. * 5 none
  331. * 6 PCI on board slot 4
  332. * 7 PCI on board slot 5
  333. * 8 PCI on board slot 6
  334. * 9 PCI on board slot 7
  335. *
  336. * And behind the PPB we have:
  337. *
  338. * 11 PCI on board slot 0
  339. * 12 PCI on board slot 1
  340. * 13 PCI on board slot 2
  341. * 14 PCI on board slot 3
  342. */
  343. /*
  344. * NOTE: the IRQ assignments below are arbitrary, but need to be consistent
  345. * with the values in the irq swizzling tables above.
  346. */
  347. static int __init
  348. lynx_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
  349. {
  350. static char irq_tab[19][5] __initdata = {
  351. /*INT INTA INTB INTC INTD */
  352. { -1, -1, -1, -1, -1}, /* IdSel 13, PCEB */
  353. { -1, -1, -1, -1, -1}, /* IdSel 14, PPB */
  354. { 28, 28, 28, 28, 28}, /* IdSel 15, NCR demi */
  355. { -1, -1, -1, -1, -1}, /* IdSel 16, none */
  356. { 32, 32, 33, 34, 35}, /* IdSel 17, slot 4 */
  357. { 36, 36, 37, 38, 39}, /* IdSel 18, slot 5 */
  358. { 40, 40, 41, 42, 43}, /* IdSel 19, slot 6 */
  359. { 44, 44, 45, 46, 47}, /* IdSel 20, slot 7 */
  360. { -1, -1, -1, -1, -1}, /* IdSel 22, none */
  361. /* The following are actually behind the PPB. */
  362. { -1, -1, -1, -1, -1}, /* IdSel 16 none */
  363. { 28, 28, 28, 28, 28}, /* IdSel 17 NCR lynx */
  364. { -1, -1, -1, -1, -1}, /* IdSel 18 none */
  365. { -1, -1, -1, -1, -1}, /* IdSel 19 none */
  366. { -1, -1, -1, -1, -1}, /* IdSel 20 none */
  367. { -1, -1, -1, -1, -1}, /* IdSel 21 none */
  368. { 48, 48, 49, 50, 51}, /* IdSel 22 slot 0 */
  369. { 52, 52, 53, 54, 55}, /* IdSel 23 slot 1 */
  370. { 56, 56, 57, 58, 59}, /* IdSel 24 slot 2 */
  371. { 60, 60, 61, 62, 63} /* IdSel 25 slot 3 */
  372. };
  373. const long min_idsel = 2, max_idsel = 20, irqs_per_slot = 5;
  374. return COMMON_TABLE_LOOKUP;
  375. }
  376. static u8 __init
  377. lynx_swizzle(struct pci_dev *dev, u8 *pinp)
  378. {
  379. int slot, pin = *pinp;
  380. if (dev->bus->number == 0) {
  381. slot = PCI_SLOT(dev->devfn);
  382. }
  383. /* Check for the built-in bridge */
  384. else if (PCI_SLOT(dev->bus->self->devfn) == 3) {
  385. slot = PCI_SLOT(dev->devfn) + 11;
  386. }
  387. else
  388. {
  389. /* Must be a card-based bridge. */
  390. do {
  391. if (PCI_SLOT(dev->bus->self->devfn) == 3) {
  392. slot = PCI_SLOT(dev->devfn) + 11;
  393. break;
  394. }
  395. pin = pci_swizzle_interrupt_pin(dev, pin);
  396. /* Move up the chain of bridges. */
  397. dev = dev->bus->self;
  398. /* Slot of the next bridge. */
  399. slot = PCI_SLOT(dev->devfn);
  400. } while (dev->bus->self);
  401. }
  402. *pinp = pin;
  403. return slot;
  404. }
  405. #endif /* defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_LYNX) */
  406. /***********************************************************************/
  407. /* GENERIC irq routines */
  408. static inline void
  409. sable_lynx_enable_irq(struct irq_data *d)
  410. {
  411. unsigned long bit, mask;
  412. bit = sable_lynx_irq_swizzle->irq_to_mask[d->irq];
  413. spin_lock(&sable_lynx_irq_lock);
  414. mask = sable_lynx_irq_swizzle->shadow_mask &= ~(1UL << bit);
  415. sable_lynx_irq_swizzle->update_irq_hw(bit, mask);
  416. spin_unlock(&sable_lynx_irq_lock);
  417. #if 0
  418. printk("%s: mask 0x%lx bit 0x%lx irq 0x%x\n",
  419. __func__, mask, bit, irq);
  420. #endif
  421. }
  422. static void
  423. sable_lynx_disable_irq(struct irq_data *d)
  424. {
  425. unsigned long bit, mask;
  426. bit = sable_lynx_irq_swizzle->irq_to_mask[d->irq];
  427. spin_lock(&sable_lynx_irq_lock);
  428. mask = sable_lynx_irq_swizzle->shadow_mask |= 1UL << bit;
  429. sable_lynx_irq_swizzle->update_irq_hw(bit, mask);
  430. spin_unlock(&sable_lynx_irq_lock);
  431. #if 0
  432. printk("%s: mask 0x%lx bit 0x%lx irq 0x%x\n",
  433. __func__, mask, bit, irq);
  434. #endif
  435. }
  436. static void
  437. sable_lynx_mask_and_ack_irq(struct irq_data *d)
  438. {
  439. unsigned long bit, mask;
  440. bit = sable_lynx_irq_swizzle->irq_to_mask[d->irq];
  441. spin_lock(&sable_lynx_irq_lock);
  442. mask = sable_lynx_irq_swizzle->shadow_mask |= 1UL << bit;
  443. sable_lynx_irq_swizzle->update_irq_hw(bit, mask);
  444. sable_lynx_irq_swizzle->ack_irq_hw(bit);
  445. spin_unlock(&sable_lynx_irq_lock);
  446. }
  447. static struct irq_chip sable_lynx_irq_type = {
  448. .name = "SABLE/LYNX",
  449. .irq_unmask = sable_lynx_enable_irq,
  450. .irq_mask = sable_lynx_disable_irq,
  451. .irq_mask_ack = sable_lynx_mask_and_ack_irq,
  452. };
  453. static void
  454. sable_lynx_srm_device_interrupt(unsigned long vector)
  455. {
  456. /* Note that the vector reported by the SRM PALcode corresponds
  457. to the interrupt mask bits, but we have to manage via the
  458. so-called legacy IRQs for many common devices. */
  459. int bit, irq;
  460. bit = (vector - 0x800) >> 4;
  461. irq = sable_lynx_irq_swizzle->mask_to_irq[bit];
  462. #if 0
  463. printk("%s: vector 0x%lx bit 0x%x irq 0x%x\n",
  464. __func__, vector, bit, irq);
  465. #endif
  466. handle_irq(irq);
  467. }
  468. static void __init
  469. sable_lynx_init_irq(int nr_of_irqs)
  470. {
  471. long i;
  472. for (i = 0; i < nr_of_irqs; ++i) {
  473. irq_set_chip_and_handler(i, &sable_lynx_irq_type,
  474. handle_level_irq);
  475. irq_set_status_flags(i, IRQ_LEVEL);
  476. }
  477. common_init_isa_dma();
  478. }
  479. static void __init
  480. sable_lynx_init_pci(void)
  481. {
  482. common_init_pci();
  483. }
  484. /*****************************************************************/
  485. /*
  486. * The System Vectors
  487. *
  488. * In order that T2_HAE_ADDRESS should be a constant, we play
  489. * these games with GAMMA_BIAS.
  490. */
  491. #if defined(CONFIG_ALPHA_GENERIC) || \
  492. (defined(CONFIG_ALPHA_SABLE) && !defined(CONFIG_ALPHA_GAMMA))
  493. #undef GAMMA_BIAS
  494. #define GAMMA_BIAS 0
  495. struct alpha_machine_vector sable_mv __initmv = {
  496. .vector_name = "Sable",
  497. DO_EV4_MMU,
  498. DO_DEFAULT_RTC,
  499. DO_T2_IO,
  500. .machine_check = t2_machine_check,
  501. .max_isa_dma_address = ALPHA_SABLE_MAX_ISA_DMA_ADDRESS,
  502. .min_io_address = EISA_DEFAULT_IO_BASE,
  503. .min_mem_address = T2_DEFAULT_MEM_BASE,
  504. .nr_irqs = 40,
  505. .device_interrupt = sable_lynx_srm_device_interrupt,
  506. .init_arch = t2_init_arch,
  507. .init_irq = sable_init_irq,
  508. .init_rtc = common_init_rtc,
  509. .init_pci = sable_lynx_init_pci,
  510. .kill_arch = t2_kill_arch,
  511. .pci_map_irq = sable_map_irq,
  512. .pci_swizzle = common_swizzle,
  513. .sys = { .t2 = {
  514. .gamma_bias = 0
  515. } }
  516. };
  517. ALIAS_MV(sable)
  518. #endif /* GENERIC || (SABLE && !GAMMA) */
  519. #if defined(CONFIG_ALPHA_GENERIC) || \
  520. (defined(CONFIG_ALPHA_SABLE) && defined(CONFIG_ALPHA_GAMMA))
  521. #undef GAMMA_BIAS
  522. #define GAMMA_BIAS _GAMMA_BIAS
  523. struct alpha_machine_vector sable_gamma_mv __initmv = {
  524. .vector_name = "Sable-Gamma",
  525. DO_EV5_MMU,
  526. DO_DEFAULT_RTC,
  527. DO_T2_IO,
  528. .machine_check = t2_machine_check,
  529. .max_isa_dma_address = ALPHA_SABLE_MAX_ISA_DMA_ADDRESS,
  530. .min_io_address = EISA_DEFAULT_IO_BASE,
  531. .min_mem_address = T2_DEFAULT_MEM_BASE,
  532. .nr_irqs = 40,
  533. .device_interrupt = sable_lynx_srm_device_interrupt,
  534. .init_arch = t2_init_arch,
  535. .init_irq = sable_init_irq,
  536. .init_rtc = common_init_rtc,
  537. .init_pci = sable_lynx_init_pci,
  538. .kill_arch = t2_kill_arch,
  539. .pci_map_irq = sable_map_irq,
  540. .pci_swizzle = common_swizzle,
  541. .sys = { .t2 = {
  542. .gamma_bias = _GAMMA_BIAS
  543. } }
  544. };
  545. ALIAS_MV(sable_gamma)
  546. #endif /* GENERIC || (SABLE && GAMMA) */
  547. #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_LYNX)
  548. #undef GAMMA_BIAS
  549. #define GAMMA_BIAS _GAMMA_BIAS
  550. struct alpha_machine_vector lynx_mv __initmv = {
  551. .vector_name = "Lynx",
  552. DO_EV4_MMU,
  553. DO_DEFAULT_RTC,
  554. DO_T2_IO,
  555. .machine_check = t2_machine_check,
  556. .max_isa_dma_address = ALPHA_SABLE_MAX_ISA_DMA_ADDRESS,
  557. .min_io_address = EISA_DEFAULT_IO_BASE,
  558. .min_mem_address = T2_DEFAULT_MEM_BASE,
  559. .nr_irqs = 64,
  560. .device_interrupt = sable_lynx_srm_device_interrupt,
  561. .init_arch = t2_init_arch,
  562. .init_irq = lynx_init_irq,
  563. .init_rtc = common_init_rtc,
  564. .init_pci = sable_lynx_init_pci,
  565. .kill_arch = t2_kill_arch,
  566. .pci_map_irq = lynx_map_irq,
  567. .pci_swizzle = lynx_swizzle,
  568. .sys = { .t2 = {
  569. .gamma_bias = _GAMMA_BIAS
  570. } }
  571. };
  572. ALIAS_MV(lynx)
  573. #endif /* GENERIC || LYNX */