18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * ip22.h: Definitions for SGI IP22 machines 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Copyright (C) 1996 David S. Miller 98c2ecf20Sopenharmony_ci * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef _SGI_IP22_H 138c2ecf20Sopenharmony_ci#define _SGI_IP22_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* 168c2ecf20Sopenharmony_ci * These are the virtual IRQ numbers, we divide all IRQ's into 178c2ecf20Sopenharmony_ci * 'spaces', the 'space' determines where and how to enable/disable 188c2ecf20Sopenharmony_ci * that particular IRQ on an SGI machine. HPC DMA and MC DMA interrupts 198c2ecf20Sopenharmony_ci * are not supported this way. Driver is supposed to allocate HPC/MC 208c2ecf20Sopenharmony_ci * interrupt as shareable and then look to proper status bit (see 218c2ecf20Sopenharmony_ci * HAL2 driver). This will prevent many complications, trust me ;-) 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#include <irq.h> 258c2ecf20Sopenharmony_ci#include <asm/sgi/ioc.h> 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#define SGINT_EISA 0 /* 16 EISA irq levels (Indigo2) */ 288c2ecf20Sopenharmony_ci#define SGINT_CPU MIPS_CPU_IRQ_BASE /* MIPS CPU define 8 interrupt sources */ 298c2ecf20Sopenharmony_ci#define SGINT_LOCAL0 (SGINT_CPU+8) /* 8 local0 irq levels */ 308c2ecf20Sopenharmony_ci#define SGINT_LOCAL1 (SGINT_CPU+16) /* 8 local1 irq levels */ 318c2ecf20Sopenharmony_ci#define SGINT_LOCAL2 (SGINT_CPU+24) /* 8 local2 vectored irq levels */ 328c2ecf20Sopenharmony_ci#define SGINT_LOCAL3 (SGINT_CPU+32) /* 8 local3 vectored irq levels */ 338c2ecf20Sopenharmony_ci#define SGINT_END (SGINT_CPU+40) /* End of 'spaces' */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci/* 368c2ecf20Sopenharmony_ci * Individual interrupt definitions for the Indy and Indigo2 378c2ecf20Sopenharmony_ci */ 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define SGI_SOFT_0_IRQ SGINT_CPU + 0 408c2ecf20Sopenharmony_ci#define SGI_SOFT_1_IRQ SGINT_CPU + 1 418c2ecf20Sopenharmony_ci#define SGI_LOCAL_0_IRQ SGINT_CPU + 2 428c2ecf20Sopenharmony_ci#define SGI_LOCAL_1_IRQ SGINT_CPU + 3 438c2ecf20Sopenharmony_ci#define SGI_8254_0_IRQ SGINT_CPU + 4 448c2ecf20Sopenharmony_ci#define SGI_8254_1_IRQ SGINT_CPU + 5 458c2ecf20Sopenharmony_ci#define SGI_BUSERR_IRQ SGINT_CPU + 6 468c2ecf20Sopenharmony_ci#define SGI_TIMER_IRQ SGINT_CPU + 7 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#define SGI_FIFO_IRQ SGINT_LOCAL0 + 0 /* FIFO full */ 498c2ecf20Sopenharmony_ci#define SGI_GIO_0_IRQ SGI_FIFO_IRQ /* GIO-0 */ 508c2ecf20Sopenharmony_ci#define SGI_WD93_0_IRQ SGINT_LOCAL0 + 1 /* 1st onboard WD93 */ 518c2ecf20Sopenharmony_ci#define SGI_WD93_1_IRQ SGINT_LOCAL0 + 2 /* 2nd onboard WD93 */ 528c2ecf20Sopenharmony_ci#define SGI_ENET_IRQ SGINT_LOCAL0 + 3 /* onboard ethernet */ 538c2ecf20Sopenharmony_ci#define SGI_MCDMA_IRQ SGINT_LOCAL0 + 4 /* MC DMA done */ 548c2ecf20Sopenharmony_ci#define SGI_PARPORT_IRQ SGINT_LOCAL0 + 5 /* Parallel port */ 558c2ecf20Sopenharmony_ci#define SGI_GIO_1_IRQ SGINT_LOCAL0 + 6 /* GE / GIO-1 / 2nd-HPC */ 568c2ecf20Sopenharmony_ci#define SGI_MAP_0_IRQ SGINT_LOCAL0 + 7 /* Mappable interrupt 0 */ 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci#define SGI_GPL0_IRQ SGINT_LOCAL1 + 0 /* General Purpose LOCAL1_N<0> */ 598c2ecf20Sopenharmony_ci#define SGI_PANEL_IRQ SGINT_LOCAL1 + 1 /* front panel */ 608c2ecf20Sopenharmony_ci#define SGI_GPL2_IRQ SGINT_LOCAL1 + 2 /* General Purpose LOCAL1_N<2> */ 618c2ecf20Sopenharmony_ci#define SGI_MAP_1_IRQ SGINT_LOCAL1 + 3 /* Mappable interrupt 1 */ 628c2ecf20Sopenharmony_ci#define SGI_HPCDMA_IRQ SGINT_LOCAL1 + 4 /* HPC DMA done */ 638c2ecf20Sopenharmony_ci#define SGI_ACFAIL_IRQ SGINT_LOCAL1 + 5 /* AC fail */ 648c2ecf20Sopenharmony_ci#define SGI_VINO_IRQ SGINT_LOCAL1 + 6 /* Indy VINO */ 658c2ecf20Sopenharmony_ci#define SGI_GIO_2_IRQ SGINT_LOCAL1 + 7 /* Vert retrace / GIO-2 */ 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci/* Mapped interrupts. These interrupts may be mapped to either 0, or 1 */ 688c2ecf20Sopenharmony_ci#define SGI_VERT_IRQ SGINT_LOCAL2 + 0 /* INT3: newport vertical status */ 698c2ecf20Sopenharmony_ci#define SGI_EISA_IRQ SGINT_LOCAL2 + 3 /* EISA interrupts */ 708c2ecf20Sopenharmony_ci#define SGI_KEYBD_IRQ SGINT_LOCAL2 + 4 /* keyboard */ 718c2ecf20Sopenharmony_ci#define SGI_SERIAL_IRQ SGINT_LOCAL2 + 5 /* onboard serial */ 728c2ecf20Sopenharmony_ci#define SGI_GIOEXP0_IRQ (SGINT_LOCAL2 + 6) /* Indy GIO EXP0 */ 738c2ecf20Sopenharmony_ci#define SGI_GIOEXP1_IRQ (SGINT_LOCAL2 + 7) /* Indy GIO EXP1 */ 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci#define ip22_is_fullhouse() (sgioc->sysid & SGIOC_SYSID_FULLHOUSE) 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ciextern unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg); 788c2ecf20Sopenharmony_ciextern unsigned short ip22_nvram_read(int reg); 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ci#endif 81