18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * (C) Copyright 2005 Tundra Semiconductor Corp. 48c2ecf20Sopenharmony_ci * Alex Bounine, <alexandreb at tundra.com). 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * See file CREDITS for list of people who contributed to this 78c2ecf20Sopenharmony_ci * project. 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* 118c2ecf20Sopenharmony_ci * definitions for interrupt controller initialization and external interrupt 128c2ecf20Sopenharmony_ci * demultiplexing on TSI108EMU/SVB boards. 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_TSI108_IRQ_H 168c2ecf20Sopenharmony_ci#define _ASM_POWERPC_TSI108_IRQ_H 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* 198c2ecf20Sopenharmony_ci * Tsi108 interrupts 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci#ifndef TSI108_IRQ_REG_BASE 228c2ecf20Sopenharmony_ci#define TSI108_IRQ_REG_BASE 0 238c2ecf20Sopenharmony_ci#endif 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define TSI108_IRQ(x) (TSI108_IRQ_REG_BASE + (x)) 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#define TSI108_MAX_VECTORS (36 + 4) /* 36 sources + PCI INT demux */ 288c2ecf20Sopenharmony_ci#define MAX_TASK_PRIO 0xF 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define TSI108_IRQ_SPURIOUS (TSI108_MAX_VECTORS) 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define DEFAULT_PRIO_LVL 10 /* initial priority level */ 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* Interrupt vectors assignment to external and internal 358c2ecf20Sopenharmony_ci * sources of requests. */ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* EXTERNAL INTERRUPT SOURCES */ 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define IRQ_TSI108_EXT_INT0 TSI108_IRQ(0) /* External Source at INT[0] */ 408c2ecf20Sopenharmony_ci#define IRQ_TSI108_EXT_INT1 TSI108_IRQ(1) /* External Source at INT[1] */ 418c2ecf20Sopenharmony_ci#define IRQ_TSI108_EXT_INT2 TSI108_IRQ(2) /* External Source at INT[2] */ 428c2ecf20Sopenharmony_ci#define IRQ_TSI108_EXT_INT3 TSI108_IRQ(3) /* External Source at INT[3] */ 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/* INTERNAL INTERRUPT SOURCES */ 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#define IRQ_TSI108_RESERVED0 TSI108_IRQ(4) /* Reserved IRQ */ 478c2ecf20Sopenharmony_ci#define IRQ_TSI108_RESERVED1 TSI108_IRQ(5) /* Reserved IRQ */ 488c2ecf20Sopenharmony_ci#define IRQ_TSI108_RESERVED2 TSI108_IRQ(6) /* Reserved IRQ */ 498c2ecf20Sopenharmony_ci#define IRQ_TSI108_RESERVED3 TSI108_IRQ(7) /* Reserved IRQ */ 508c2ecf20Sopenharmony_ci#define IRQ_TSI108_DMA0 TSI108_IRQ(8) /* DMA0 */ 518c2ecf20Sopenharmony_ci#define IRQ_TSI108_DMA1 TSI108_IRQ(9) /* DMA1 */ 528c2ecf20Sopenharmony_ci#define IRQ_TSI108_DMA2 TSI108_IRQ(10) /* DMA2 */ 538c2ecf20Sopenharmony_ci#define IRQ_TSI108_DMA3 TSI108_IRQ(11) /* DMA3 */ 548c2ecf20Sopenharmony_ci#define IRQ_TSI108_UART0 TSI108_IRQ(12) /* UART0 */ 558c2ecf20Sopenharmony_ci#define IRQ_TSI108_UART1 TSI108_IRQ(13) /* UART1 */ 568c2ecf20Sopenharmony_ci#define IRQ_TSI108_I2C TSI108_IRQ(14) /* I2C */ 578c2ecf20Sopenharmony_ci#define IRQ_TSI108_GPIO TSI108_IRQ(15) /* GPIO */ 588c2ecf20Sopenharmony_ci#define IRQ_TSI108_GIGE0 TSI108_IRQ(16) /* GIGE0 */ 598c2ecf20Sopenharmony_ci#define IRQ_TSI108_GIGE1 TSI108_IRQ(17) /* GIGE1 */ 608c2ecf20Sopenharmony_ci#define IRQ_TSI108_RESERVED4 TSI108_IRQ(18) /* Reserved IRQ */ 618c2ecf20Sopenharmony_ci#define IRQ_TSI108_HLP TSI108_IRQ(19) /* HLP */ 628c2ecf20Sopenharmony_ci#define IRQ_TSI108_SDRAM TSI108_IRQ(20) /* SDC */ 638c2ecf20Sopenharmony_ci#define IRQ_TSI108_PROC_IF TSI108_IRQ(21) /* Processor IF */ 648c2ecf20Sopenharmony_ci#define IRQ_TSI108_RESERVED5 TSI108_IRQ(22) /* Reserved IRQ */ 658c2ecf20Sopenharmony_ci#define IRQ_TSI108_PCI TSI108_IRQ(23) /* PCI/X block */ 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define IRQ_TSI108_MBOX0 TSI108_IRQ(24) /* Mailbox 0 register */ 688c2ecf20Sopenharmony_ci#define IRQ_TSI108_MBOX1 TSI108_IRQ(25) /* Mailbox 1 register */ 698c2ecf20Sopenharmony_ci#define IRQ_TSI108_MBOX2 TSI108_IRQ(26) /* Mailbox 2 register */ 708c2ecf20Sopenharmony_ci#define IRQ_TSI108_MBOX3 TSI108_IRQ(27) /* Mailbox 3 register */ 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci#define IRQ_TSI108_DBELL0 TSI108_IRQ(28) /* Doorbell 0 */ 738c2ecf20Sopenharmony_ci#define IRQ_TSI108_DBELL1 TSI108_IRQ(29) /* Doorbell 1 */ 748c2ecf20Sopenharmony_ci#define IRQ_TSI108_DBELL2 TSI108_IRQ(30) /* Doorbell 2 */ 758c2ecf20Sopenharmony_ci#define IRQ_TSI108_DBELL3 TSI108_IRQ(31) /* Doorbell 3 */ 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define IRQ_TSI108_TIMER0 TSI108_IRQ(32) /* Global Timer 0 */ 788c2ecf20Sopenharmony_ci#define IRQ_TSI108_TIMER1 TSI108_IRQ(33) /* Global Timer 1 */ 798c2ecf20Sopenharmony_ci#define IRQ_TSI108_TIMER2 TSI108_IRQ(34) /* Global Timer 2 */ 808c2ecf20Sopenharmony_ci#define IRQ_TSI108_TIMER3 TSI108_IRQ(35) /* Global Timer 3 */ 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci/* 838c2ecf20Sopenharmony_ci * PCI bus INTA# - INTD# lines demultiplexor 848c2ecf20Sopenharmony_ci */ 858c2ecf20Sopenharmony_ci#define IRQ_PCI_INTAD_BASE TSI108_IRQ(36) 868c2ecf20Sopenharmony_ci#define IRQ_PCI_INTA (IRQ_PCI_INTAD_BASE + 0) 878c2ecf20Sopenharmony_ci#define IRQ_PCI_INTB (IRQ_PCI_INTAD_BASE + 1) 888c2ecf20Sopenharmony_ci#define IRQ_PCI_INTC (IRQ_PCI_INTAD_BASE + 2) 898c2ecf20Sopenharmony_ci#define IRQ_PCI_INTD (IRQ_PCI_INTAD_BASE + 3) 908c2ecf20Sopenharmony_ci#define NUM_PCI_IRQS (4) 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci/* number of entries in vector dispatch table */ 938c2ecf20Sopenharmony_ci#define IRQ_TSI108_TAB_SIZE (TSI108_MAX_VECTORS + 1) 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci/* Mapping of MPIC outputs to processors' interrupt pins */ 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#define IDIR_INT_OUT0 0x1 988c2ecf20Sopenharmony_ci#define IDIR_INT_OUT1 0x2 998c2ecf20Sopenharmony_ci#define IDIR_INT_OUT2 0x4 1008c2ecf20Sopenharmony_ci#define IDIR_INT_OUT3 0x8 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci/*--------------------------------------------------------------- 1038c2ecf20Sopenharmony_ci * IRQ line configuration parameters */ 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci/* Interrupt delivery modes */ 1068c2ecf20Sopenharmony_citypedef enum { 1078c2ecf20Sopenharmony_ci TSI108_IRQ_DIRECTED, 1088c2ecf20Sopenharmony_ci TSI108_IRQ_DISTRIBUTED, 1098c2ecf20Sopenharmony_ci} TSI108_IRQ_MODE; 1108c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_TSI108_IRQ_H */ 111