18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * arch/arm/mach-footbridge/include/mach/irqs.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 1998 Russell King 68c2ecf20Sopenharmony_ci * Copyright (C) 1998 Phil Blundell 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Changelog: 98c2ecf20Sopenharmony_ci * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder 108c2ecf20Sopenharmony_ci * 01-Feb-1999 PJB ISA IRQs start at 0 not 16 118c2ecf20Sopenharmony_ci */ 128c2ecf20Sopenharmony_ci#include <asm/mach-types.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define NR_IRQS 36 158c2ecf20Sopenharmony_ci#define NR_DC21285_IRQS 16 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define _ISA_IRQ(x) (0 + (x)) 188c2ecf20Sopenharmony_ci#define _ISA_INR(x) ((x) - 0) 198c2ecf20Sopenharmony_ci#define _DC21285_IRQ(x) (16 + (x)) 208c2ecf20Sopenharmony_ci#define _DC21285_INR(x) ((x) - 16) 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* 238c2ecf20Sopenharmony_ci * This is a list of all interrupts that the 21285 248c2ecf20Sopenharmony_ci * can generate and we handle. 258c2ecf20Sopenharmony_ci */ 268c2ecf20Sopenharmony_ci#define IRQ_CONRX _DC21285_IRQ(0) 278c2ecf20Sopenharmony_ci#define IRQ_CONTX _DC21285_IRQ(1) 288c2ecf20Sopenharmony_ci#define IRQ_TIMER1 _DC21285_IRQ(2) 298c2ecf20Sopenharmony_ci#define IRQ_TIMER2 _DC21285_IRQ(3) 308c2ecf20Sopenharmony_ci#define IRQ_TIMER3 _DC21285_IRQ(4) 318c2ecf20Sopenharmony_ci#define IRQ_IN0 _DC21285_IRQ(5) 328c2ecf20Sopenharmony_ci#define IRQ_IN1 _DC21285_IRQ(6) 338c2ecf20Sopenharmony_ci#define IRQ_IN2 _DC21285_IRQ(7) 348c2ecf20Sopenharmony_ci#define IRQ_IN3 _DC21285_IRQ(8) 358c2ecf20Sopenharmony_ci#define IRQ_DOORBELLHOST _DC21285_IRQ(9) 368c2ecf20Sopenharmony_ci#define IRQ_DMA1 _DC21285_IRQ(10) 378c2ecf20Sopenharmony_ci#define IRQ_DMA2 _DC21285_IRQ(11) 388c2ecf20Sopenharmony_ci#define IRQ_PCI _DC21285_IRQ(12) 398c2ecf20Sopenharmony_ci#define IRQ_SDRAMPARITY _DC21285_IRQ(13) 408c2ecf20Sopenharmony_ci#define IRQ_I2OINPOST _DC21285_IRQ(14) 418c2ecf20Sopenharmony_ci#define IRQ_PCI_ABORT _DC21285_IRQ(15) 428c2ecf20Sopenharmony_ci#define IRQ_PCI_SERR _DC21285_IRQ(16) 438c2ecf20Sopenharmony_ci#define IRQ_DISCARD_TIMER _DC21285_IRQ(17) 448c2ecf20Sopenharmony_ci#define IRQ_PCI_DPERR _DC21285_IRQ(18) 458c2ecf20Sopenharmony_ci#define IRQ_PCI_PERR _DC21285_IRQ(19) 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#define IRQ_ISA_TIMER _ISA_IRQ(0) 488c2ecf20Sopenharmony_ci#define IRQ_ISA_KEYBOARD _ISA_IRQ(1) 498c2ecf20Sopenharmony_ci#define IRQ_ISA_CASCADE _ISA_IRQ(2) 508c2ecf20Sopenharmony_ci#define IRQ_ISA_UART2 _ISA_IRQ(3) 518c2ecf20Sopenharmony_ci#define IRQ_ISA_UART _ISA_IRQ(4) 528c2ecf20Sopenharmony_ci#define IRQ_ISA_FLOPPY _ISA_IRQ(6) 538c2ecf20Sopenharmony_ci#define IRQ_ISA_PRINTER _ISA_IRQ(7) 548c2ecf20Sopenharmony_ci#define IRQ_ISA_RTC_ALARM _ISA_IRQ(8) 558c2ecf20Sopenharmony_ci#define IRQ_ISA_2 _ISA_IRQ(9) 568c2ecf20Sopenharmony_ci#define IRQ_ISA_PS2MOUSE _ISA_IRQ(12) 578c2ecf20Sopenharmony_ci#define IRQ_ISA_HARDDISK1 _ISA_IRQ(14) 588c2ecf20Sopenharmony_ci#define IRQ_ISA_HARDDISK2 _ISA_IRQ(15) 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define IRQ_MASK_UART_RX (1 << 2) 618c2ecf20Sopenharmony_ci#define IRQ_MASK_UART_TX (1 << 3) 628c2ecf20Sopenharmony_ci#define IRQ_MASK_TIMER1 (1 << 4) 638c2ecf20Sopenharmony_ci#define IRQ_MASK_TIMER2 (1 << 5) 648c2ecf20Sopenharmony_ci#define IRQ_MASK_TIMER3 (1 << 6) 658c2ecf20Sopenharmony_ci#define IRQ_MASK_IN0 (1 << 8) 668c2ecf20Sopenharmony_ci#define IRQ_MASK_IN1 (1 << 9) 678c2ecf20Sopenharmony_ci#define IRQ_MASK_IN2 (1 << 10) 688c2ecf20Sopenharmony_ci#define IRQ_MASK_IN3 (1 << 11) 698c2ecf20Sopenharmony_ci#define IRQ_MASK_DOORBELLHOST (1 << 15) 708c2ecf20Sopenharmony_ci#define IRQ_MASK_DMA1 (1 << 16) 718c2ecf20Sopenharmony_ci#define IRQ_MASK_DMA2 (1 << 17) 728c2ecf20Sopenharmony_ci#define IRQ_MASK_PCI (1 << 18) 738c2ecf20Sopenharmony_ci#define IRQ_MASK_SDRAMPARITY (1 << 24) 748c2ecf20Sopenharmony_ci#define IRQ_MASK_I2OINPOST (1 << 25) 758c2ecf20Sopenharmony_ci#define IRQ_MASK_PCI_ABORT ((1 << 29) | (1 << 30)) 768c2ecf20Sopenharmony_ci#define IRQ_MASK_PCI_SERR (1 << 23) 778c2ecf20Sopenharmony_ci#define IRQ_MASK_DISCARD_TIMER (1 << 27) 788c2ecf20Sopenharmony_ci#define IRQ_MASK_PCI_DPERR (1 << 28) 798c2ecf20Sopenharmony_ci#define IRQ_MASK_PCI_PERR (1 << 31) 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci/* 828c2ecf20Sopenharmony_ci * Netwinder interrupt allocations 838c2ecf20Sopenharmony_ci */ 848c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_ETHER10 IRQ_IN0 858c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_ETHER100 IRQ_IN1 868c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_VIDCOMP IRQ_IN2 878c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_PS2MOUSE _ISA_IRQ(5) 888c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_IR _ISA_IRQ(6) 898c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_BUTTON _ISA_IRQ(10) 908c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_VGA _ISA_IRQ(11) 918c2ecf20Sopenharmony_ci#define IRQ_NETWINDER_SOUND _ISA_IRQ(12) 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci#define I8042_KBD_IRQ IRQ_ISA_KEYBOARD 948c2ecf20Sopenharmony_ci#define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE) 958c2ecf20Sopenharmony_ci#define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#define irq_canonicalize(_i) (((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i) 98