162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * (C) Copyright 2005 Tundra Semiconductor Corp. 462306a36Sopenharmony_ci * Alex Bounine, <alexandreb at tundra.com). 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * See file CREDITS for list of people who contributed to this 762306a36Sopenharmony_ci * project. 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci/* 1162306a36Sopenharmony_ci * definitions for interrupt controller initialization and external interrupt 1262306a36Sopenharmony_ci * demultiplexing on TSI108EMU/SVB boards. 1362306a36Sopenharmony_ci */ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#ifndef _ASM_POWERPC_TSI108_IRQ_H 1662306a36Sopenharmony_ci#define _ASM_POWERPC_TSI108_IRQ_H 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci/* 1962306a36Sopenharmony_ci * Tsi108 interrupts 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci#ifndef TSI108_IRQ_REG_BASE 2262306a36Sopenharmony_ci#define TSI108_IRQ_REG_BASE 0 2362306a36Sopenharmony_ci#endif 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define TSI108_IRQ(x) (TSI108_IRQ_REG_BASE + (x)) 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci#define TSI108_MAX_VECTORS (36 + 4) /* 36 sources + PCI INT demux */ 2862306a36Sopenharmony_ci#define MAX_TASK_PRIO 0xF 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define TSI108_IRQ_SPURIOUS (TSI108_MAX_VECTORS) 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#define DEFAULT_PRIO_LVL 10 /* initial priority level */ 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci/* Interrupt vectors assignment to external and internal 3562306a36Sopenharmony_ci * sources of requests. */ 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/* EXTERNAL INTERRUPT SOURCES */ 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define IRQ_TSI108_EXT_INT0 TSI108_IRQ(0) /* External Source at INT[0] */ 4062306a36Sopenharmony_ci#define IRQ_TSI108_EXT_INT1 TSI108_IRQ(1) /* External Source at INT[1] */ 4162306a36Sopenharmony_ci#define IRQ_TSI108_EXT_INT2 TSI108_IRQ(2) /* External Source at INT[2] */ 4262306a36Sopenharmony_ci#define IRQ_TSI108_EXT_INT3 TSI108_IRQ(3) /* External Source at INT[3] */ 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci/* INTERNAL INTERRUPT SOURCES */ 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci#define IRQ_TSI108_RESERVED0 TSI108_IRQ(4) /* Reserved IRQ */ 4762306a36Sopenharmony_ci#define IRQ_TSI108_RESERVED1 TSI108_IRQ(5) /* Reserved IRQ */ 4862306a36Sopenharmony_ci#define IRQ_TSI108_RESERVED2 TSI108_IRQ(6) /* Reserved IRQ */ 4962306a36Sopenharmony_ci#define IRQ_TSI108_RESERVED3 TSI108_IRQ(7) /* Reserved IRQ */ 5062306a36Sopenharmony_ci#define IRQ_TSI108_DMA0 TSI108_IRQ(8) /* DMA0 */ 5162306a36Sopenharmony_ci#define IRQ_TSI108_DMA1 TSI108_IRQ(9) /* DMA1 */ 5262306a36Sopenharmony_ci#define IRQ_TSI108_DMA2 TSI108_IRQ(10) /* DMA2 */ 5362306a36Sopenharmony_ci#define IRQ_TSI108_DMA3 TSI108_IRQ(11) /* DMA3 */ 5462306a36Sopenharmony_ci#define IRQ_TSI108_UART0 TSI108_IRQ(12) /* UART0 */ 5562306a36Sopenharmony_ci#define IRQ_TSI108_UART1 TSI108_IRQ(13) /* UART1 */ 5662306a36Sopenharmony_ci#define IRQ_TSI108_I2C TSI108_IRQ(14) /* I2C */ 5762306a36Sopenharmony_ci#define IRQ_TSI108_GPIO TSI108_IRQ(15) /* GPIO */ 5862306a36Sopenharmony_ci#define IRQ_TSI108_GIGE0 TSI108_IRQ(16) /* GIGE0 */ 5962306a36Sopenharmony_ci#define IRQ_TSI108_GIGE1 TSI108_IRQ(17) /* GIGE1 */ 6062306a36Sopenharmony_ci#define IRQ_TSI108_RESERVED4 TSI108_IRQ(18) /* Reserved IRQ */ 6162306a36Sopenharmony_ci#define IRQ_TSI108_HLP TSI108_IRQ(19) /* HLP */ 6262306a36Sopenharmony_ci#define IRQ_TSI108_SDRAM TSI108_IRQ(20) /* SDC */ 6362306a36Sopenharmony_ci#define IRQ_TSI108_PROC_IF TSI108_IRQ(21) /* Processor IF */ 6462306a36Sopenharmony_ci#define IRQ_TSI108_RESERVED5 TSI108_IRQ(22) /* Reserved IRQ */ 6562306a36Sopenharmony_ci#define IRQ_TSI108_PCI TSI108_IRQ(23) /* PCI/X block */ 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci#define IRQ_TSI108_MBOX0 TSI108_IRQ(24) /* Mailbox 0 register */ 6862306a36Sopenharmony_ci#define IRQ_TSI108_MBOX1 TSI108_IRQ(25) /* Mailbox 1 register */ 6962306a36Sopenharmony_ci#define IRQ_TSI108_MBOX2 TSI108_IRQ(26) /* Mailbox 2 register */ 7062306a36Sopenharmony_ci#define IRQ_TSI108_MBOX3 TSI108_IRQ(27) /* Mailbox 3 register */ 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci#define IRQ_TSI108_DBELL0 TSI108_IRQ(28) /* Doorbell 0 */ 7362306a36Sopenharmony_ci#define IRQ_TSI108_DBELL1 TSI108_IRQ(29) /* Doorbell 1 */ 7462306a36Sopenharmony_ci#define IRQ_TSI108_DBELL2 TSI108_IRQ(30) /* Doorbell 2 */ 7562306a36Sopenharmony_ci#define IRQ_TSI108_DBELL3 TSI108_IRQ(31) /* Doorbell 3 */ 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci#define IRQ_TSI108_TIMER0 TSI108_IRQ(32) /* Global Timer 0 */ 7862306a36Sopenharmony_ci#define IRQ_TSI108_TIMER1 TSI108_IRQ(33) /* Global Timer 1 */ 7962306a36Sopenharmony_ci#define IRQ_TSI108_TIMER2 TSI108_IRQ(34) /* Global Timer 2 */ 8062306a36Sopenharmony_ci#define IRQ_TSI108_TIMER3 TSI108_IRQ(35) /* Global Timer 3 */ 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci/* 8362306a36Sopenharmony_ci * PCI bus INTA# - INTD# lines demultiplexor 8462306a36Sopenharmony_ci */ 8562306a36Sopenharmony_ci#define IRQ_PCI_INTAD_BASE TSI108_IRQ(36) 8662306a36Sopenharmony_ci#define IRQ_PCI_INTA (IRQ_PCI_INTAD_BASE + 0) 8762306a36Sopenharmony_ci#define IRQ_PCI_INTB (IRQ_PCI_INTAD_BASE + 1) 8862306a36Sopenharmony_ci#define IRQ_PCI_INTC (IRQ_PCI_INTAD_BASE + 2) 8962306a36Sopenharmony_ci#define IRQ_PCI_INTD (IRQ_PCI_INTAD_BASE + 3) 9062306a36Sopenharmony_ci#define NUM_PCI_IRQS (4) 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci/* number of entries in vector dispatch table */ 9362306a36Sopenharmony_ci#define IRQ_TSI108_TAB_SIZE (TSI108_MAX_VECTORS + 1) 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci/* Mapping of MPIC outputs to processors' interrupt pins */ 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#define IDIR_INT_OUT0 0x1 9862306a36Sopenharmony_ci#define IDIR_INT_OUT1 0x2 9962306a36Sopenharmony_ci#define IDIR_INT_OUT2 0x4 10062306a36Sopenharmony_ci#define IDIR_INT_OUT3 0x8 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci/*--------------------------------------------------------------- 10362306a36Sopenharmony_ci * IRQ line configuration parameters */ 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ci/* Interrupt delivery modes */ 10662306a36Sopenharmony_citypedef enum { 10762306a36Sopenharmony_ci TSI108_IRQ_DIRECTED, 10862306a36Sopenharmony_ci TSI108_IRQ_DISTRIBUTED, 10962306a36Sopenharmony_ci} TSI108_IRQ_MODE; 11062306a36Sopenharmony_ci#endif /* _ASM_POWERPC_TSI108_IRQ_H */ 111