sys_sable.c 17 KB

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