18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* ********************************************************************* 38c2ecf20Sopenharmony_ci * SB1250 Board Support Package 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Interrupt Mapper definitions File: sb1250_int.h 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This module contains constants for manipulating the SB1250's 88c2ecf20Sopenharmony_ci * interrupt mapper and definitions for the interrupt sources. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * SB1250 specification level: User's manual 1/02/02 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci ********************************************************************* 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * Copyright 2000, 2001, 2002, 2003 158c2ecf20Sopenharmony_ci * Broadcom Corporation. All rights reserved. 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci ********************************************************************* */ 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#ifndef _SB1250_INT_H 218c2ecf20Sopenharmony_ci#define _SB1250_INT_H 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#include <asm/sibyte/sb1250_defs.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci/* ********************************************************************* 268c2ecf20Sopenharmony_ci * Interrupt Mapper Constants 278c2ecf20Sopenharmony_ci ********************************************************************* */ 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci/* 308c2ecf20Sopenharmony_ci * Interrupt sources (Table 4-8, UM 0.2) 318c2ecf20Sopenharmony_ci * 328c2ecf20Sopenharmony_ci * First, the interrupt numbers. 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#define K_INT_SOURCES 64 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define K_INT_WATCHDOG_TIMER_0 0 388c2ecf20Sopenharmony_ci#define K_INT_WATCHDOG_TIMER_1 1 398c2ecf20Sopenharmony_ci#define K_INT_TIMER_0 2 408c2ecf20Sopenharmony_ci#define K_INT_TIMER_1 3 418c2ecf20Sopenharmony_ci#define K_INT_TIMER_2 4 428c2ecf20Sopenharmony_ci#define K_INT_TIMER_3 5 438c2ecf20Sopenharmony_ci#define K_INT_SMB_0 6 448c2ecf20Sopenharmony_ci#define K_INT_SMB_1 7 458c2ecf20Sopenharmony_ci#define K_INT_UART_0 8 468c2ecf20Sopenharmony_ci#define K_INT_UART_1 9 478c2ecf20Sopenharmony_ci#define K_INT_SER_0 10 488c2ecf20Sopenharmony_ci#define K_INT_SER_1 11 498c2ecf20Sopenharmony_ci#define K_INT_PCMCIA 12 508c2ecf20Sopenharmony_ci#define K_INT_ADDR_TRAP 13 518c2ecf20Sopenharmony_ci#define K_INT_PERF_CNT 14 528c2ecf20Sopenharmony_ci#define K_INT_TRACE_FREEZE 15 538c2ecf20Sopenharmony_ci#define K_INT_BAD_ECC 16 548c2ecf20Sopenharmony_ci#define K_INT_COR_ECC 17 558c2ecf20Sopenharmony_ci#define K_INT_IO_BUS 18 568c2ecf20Sopenharmony_ci#define K_INT_MAC_0 19 578c2ecf20Sopenharmony_ci#define K_INT_MAC_1 20 588c2ecf20Sopenharmony_ci#define K_INT_MAC_2 21 598c2ecf20Sopenharmony_ci#define K_INT_DM_CH_0 22 608c2ecf20Sopenharmony_ci#define K_INT_DM_CH_1 23 618c2ecf20Sopenharmony_ci#define K_INT_DM_CH_2 24 628c2ecf20Sopenharmony_ci#define K_INT_DM_CH_3 25 638c2ecf20Sopenharmony_ci#define K_INT_MBOX_0 26 648c2ecf20Sopenharmony_ci#define K_INT_MBOX_1 27 658c2ecf20Sopenharmony_ci#define K_INT_MBOX_2 28 668c2ecf20Sopenharmony_ci#define K_INT_MBOX_3 29 678c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 688c2ecf20Sopenharmony_ci#define K_INT_CYCLE_CP0_INT 30 698c2ecf20Sopenharmony_ci#define K_INT_CYCLE_CP1_INT 31 708c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 718c2ecf20Sopenharmony_ci#define K_INT_GPIO_0 32 728c2ecf20Sopenharmony_ci#define K_INT_GPIO_1 33 738c2ecf20Sopenharmony_ci#define K_INT_GPIO_2 34 748c2ecf20Sopenharmony_ci#define K_INT_GPIO_3 35 758c2ecf20Sopenharmony_ci#define K_INT_GPIO_4 36 768c2ecf20Sopenharmony_ci#define K_INT_GPIO_5 37 778c2ecf20Sopenharmony_ci#define K_INT_GPIO_6 38 788c2ecf20Sopenharmony_ci#define K_INT_GPIO_7 39 798c2ecf20Sopenharmony_ci#define K_INT_GPIO_8 40 808c2ecf20Sopenharmony_ci#define K_INT_GPIO_9 41 818c2ecf20Sopenharmony_ci#define K_INT_GPIO_10 42 828c2ecf20Sopenharmony_ci#define K_INT_GPIO_11 43 838c2ecf20Sopenharmony_ci#define K_INT_GPIO_12 44 848c2ecf20Sopenharmony_ci#define K_INT_GPIO_13 45 858c2ecf20Sopenharmony_ci#define K_INT_GPIO_14 46 868c2ecf20Sopenharmony_ci#define K_INT_GPIO_15 47 878c2ecf20Sopenharmony_ci#define K_INT_LDT_FATAL 48 888c2ecf20Sopenharmony_ci#define K_INT_LDT_NONFATAL 49 898c2ecf20Sopenharmony_ci#define K_INT_LDT_SMI 50 908c2ecf20Sopenharmony_ci#define K_INT_LDT_NMI 51 918c2ecf20Sopenharmony_ci#define K_INT_LDT_INIT 52 928c2ecf20Sopenharmony_ci#define K_INT_LDT_STARTUP 53 938c2ecf20Sopenharmony_ci#define K_INT_LDT_EXT 54 948c2ecf20Sopenharmony_ci#define K_INT_PCI_ERROR 55 958c2ecf20Sopenharmony_ci#define K_INT_PCI_INTA 56 968c2ecf20Sopenharmony_ci#define K_INT_PCI_INTB 57 978c2ecf20Sopenharmony_ci#define K_INT_PCI_INTC 58 988c2ecf20Sopenharmony_ci#define K_INT_PCI_INTD 59 998c2ecf20Sopenharmony_ci#define K_INT_SPARE_2 60 1008c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 1018c2ecf20Sopenharmony_ci#define K_INT_MAC_0_CH1 61 1028c2ecf20Sopenharmony_ci#define K_INT_MAC_1_CH1 62 1038c2ecf20Sopenharmony_ci#define K_INT_MAC_2_CH1 63 1048c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci/* 1078c2ecf20Sopenharmony_ci * Mask values for each interrupt 1088c2ecf20Sopenharmony_ci */ 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci#define M_INT_WATCHDOG_TIMER_0 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_0) 1118c2ecf20Sopenharmony_ci#define M_INT_WATCHDOG_TIMER_1 _SB_MAKEMASK1(K_INT_WATCHDOG_TIMER_1) 1128c2ecf20Sopenharmony_ci#define M_INT_TIMER_0 _SB_MAKEMASK1(K_INT_TIMER_0) 1138c2ecf20Sopenharmony_ci#define M_INT_TIMER_1 _SB_MAKEMASK1(K_INT_TIMER_1) 1148c2ecf20Sopenharmony_ci#define M_INT_TIMER_2 _SB_MAKEMASK1(K_INT_TIMER_2) 1158c2ecf20Sopenharmony_ci#define M_INT_TIMER_3 _SB_MAKEMASK1(K_INT_TIMER_3) 1168c2ecf20Sopenharmony_ci#define M_INT_SMB_0 _SB_MAKEMASK1(K_INT_SMB_0) 1178c2ecf20Sopenharmony_ci#define M_INT_SMB_1 _SB_MAKEMASK1(K_INT_SMB_1) 1188c2ecf20Sopenharmony_ci#define M_INT_UART_0 _SB_MAKEMASK1(K_INT_UART_0) 1198c2ecf20Sopenharmony_ci#define M_INT_UART_1 _SB_MAKEMASK1(K_INT_UART_1) 1208c2ecf20Sopenharmony_ci#define M_INT_SER_0 _SB_MAKEMASK1(K_INT_SER_0) 1218c2ecf20Sopenharmony_ci#define M_INT_SER_1 _SB_MAKEMASK1(K_INT_SER_1) 1228c2ecf20Sopenharmony_ci#define M_INT_PCMCIA _SB_MAKEMASK1(K_INT_PCMCIA) 1238c2ecf20Sopenharmony_ci#define M_INT_ADDR_TRAP _SB_MAKEMASK1(K_INT_ADDR_TRAP) 1248c2ecf20Sopenharmony_ci#define M_INT_PERF_CNT _SB_MAKEMASK1(K_INT_PERF_CNT) 1258c2ecf20Sopenharmony_ci#define M_INT_TRACE_FREEZE _SB_MAKEMASK1(K_INT_TRACE_FREEZE) 1268c2ecf20Sopenharmony_ci#define M_INT_BAD_ECC _SB_MAKEMASK1(K_INT_BAD_ECC) 1278c2ecf20Sopenharmony_ci#define M_INT_COR_ECC _SB_MAKEMASK1(K_INT_COR_ECC) 1288c2ecf20Sopenharmony_ci#define M_INT_IO_BUS _SB_MAKEMASK1(K_INT_IO_BUS) 1298c2ecf20Sopenharmony_ci#define M_INT_MAC_0 _SB_MAKEMASK1(K_INT_MAC_0) 1308c2ecf20Sopenharmony_ci#define M_INT_MAC_1 _SB_MAKEMASK1(K_INT_MAC_1) 1318c2ecf20Sopenharmony_ci#define M_INT_MAC_2 _SB_MAKEMASK1(K_INT_MAC_2) 1328c2ecf20Sopenharmony_ci#define M_INT_DM_CH_0 _SB_MAKEMASK1(K_INT_DM_CH_0) 1338c2ecf20Sopenharmony_ci#define M_INT_DM_CH_1 _SB_MAKEMASK1(K_INT_DM_CH_1) 1348c2ecf20Sopenharmony_ci#define M_INT_DM_CH_2 _SB_MAKEMASK1(K_INT_DM_CH_2) 1358c2ecf20Sopenharmony_ci#define M_INT_DM_CH_3 _SB_MAKEMASK1(K_INT_DM_CH_3) 1368c2ecf20Sopenharmony_ci#define M_INT_MBOX_0 _SB_MAKEMASK1(K_INT_MBOX_0) 1378c2ecf20Sopenharmony_ci#define M_INT_MBOX_1 _SB_MAKEMASK1(K_INT_MBOX_1) 1388c2ecf20Sopenharmony_ci#define M_INT_MBOX_2 _SB_MAKEMASK1(K_INT_MBOX_2) 1398c2ecf20Sopenharmony_ci#define M_INT_MBOX_3 _SB_MAKEMASK1(K_INT_MBOX_3) 1408c2ecf20Sopenharmony_ci#define M_INT_MBOX_ALL _SB_MAKEMASK(4, K_INT_MBOX_0) 1418c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 1428c2ecf20Sopenharmony_ci#define M_INT_CYCLE_CP0_INT _SB_MAKEMASK1(K_INT_CYCLE_CP0_INT) 1438c2ecf20Sopenharmony_ci#define M_INT_CYCLE_CP1_INT _SB_MAKEMASK1(K_INT_CYCLE_CP1_INT) 1448c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 1458c2ecf20Sopenharmony_ci#define M_INT_GPIO_0 _SB_MAKEMASK1(K_INT_GPIO_0) 1468c2ecf20Sopenharmony_ci#define M_INT_GPIO_1 _SB_MAKEMASK1(K_INT_GPIO_1) 1478c2ecf20Sopenharmony_ci#define M_INT_GPIO_2 _SB_MAKEMASK1(K_INT_GPIO_2) 1488c2ecf20Sopenharmony_ci#define M_INT_GPIO_3 _SB_MAKEMASK1(K_INT_GPIO_3) 1498c2ecf20Sopenharmony_ci#define M_INT_GPIO_4 _SB_MAKEMASK1(K_INT_GPIO_4) 1508c2ecf20Sopenharmony_ci#define M_INT_GPIO_5 _SB_MAKEMASK1(K_INT_GPIO_5) 1518c2ecf20Sopenharmony_ci#define M_INT_GPIO_6 _SB_MAKEMASK1(K_INT_GPIO_6) 1528c2ecf20Sopenharmony_ci#define M_INT_GPIO_7 _SB_MAKEMASK1(K_INT_GPIO_7) 1538c2ecf20Sopenharmony_ci#define M_INT_GPIO_8 _SB_MAKEMASK1(K_INT_GPIO_8) 1548c2ecf20Sopenharmony_ci#define M_INT_GPIO_9 _SB_MAKEMASK1(K_INT_GPIO_9) 1558c2ecf20Sopenharmony_ci#define M_INT_GPIO_10 _SB_MAKEMASK1(K_INT_GPIO_10) 1568c2ecf20Sopenharmony_ci#define M_INT_GPIO_11 _SB_MAKEMASK1(K_INT_GPIO_11) 1578c2ecf20Sopenharmony_ci#define M_INT_GPIO_12 _SB_MAKEMASK1(K_INT_GPIO_12) 1588c2ecf20Sopenharmony_ci#define M_INT_GPIO_13 _SB_MAKEMASK1(K_INT_GPIO_13) 1598c2ecf20Sopenharmony_ci#define M_INT_GPIO_14 _SB_MAKEMASK1(K_INT_GPIO_14) 1608c2ecf20Sopenharmony_ci#define M_INT_GPIO_15 _SB_MAKEMASK1(K_INT_GPIO_15) 1618c2ecf20Sopenharmony_ci#define M_INT_LDT_FATAL _SB_MAKEMASK1(K_INT_LDT_FATAL) 1628c2ecf20Sopenharmony_ci#define M_INT_LDT_NONFATAL _SB_MAKEMASK1(K_INT_LDT_NONFATAL) 1638c2ecf20Sopenharmony_ci#define M_INT_LDT_SMI _SB_MAKEMASK1(K_INT_LDT_SMI) 1648c2ecf20Sopenharmony_ci#define M_INT_LDT_NMI _SB_MAKEMASK1(K_INT_LDT_NMI) 1658c2ecf20Sopenharmony_ci#define M_INT_LDT_INIT _SB_MAKEMASK1(K_INT_LDT_INIT) 1668c2ecf20Sopenharmony_ci#define M_INT_LDT_STARTUP _SB_MAKEMASK1(K_INT_LDT_STARTUP) 1678c2ecf20Sopenharmony_ci#define M_INT_LDT_EXT _SB_MAKEMASK1(K_INT_LDT_EXT) 1688c2ecf20Sopenharmony_ci#define M_INT_PCI_ERROR _SB_MAKEMASK1(K_INT_PCI_ERROR) 1698c2ecf20Sopenharmony_ci#define M_INT_PCI_INTA _SB_MAKEMASK1(K_INT_PCI_INTA) 1708c2ecf20Sopenharmony_ci#define M_INT_PCI_INTB _SB_MAKEMASK1(K_INT_PCI_INTB) 1718c2ecf20Sopenharmony_ci#define M_INT_PCI_INTC _SB_MAKEMASK1(K_INT_PCI_INTC) 1728c2ecf20Sopenharmony_ci#define M_INT_PCI_INTD _SB_MAKEMASK1(K_INT_PCI_INTD) 1738c2ecf20Sopenharmony_ci#define M_INT_SPARE_2 _SB_MAKEMASK1(K_INT_SPARE_2) 1748c2ecf20Sopenharmony_ci#if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 1758c2ecf20Sopenharmony_ci#define M_INT_MAC_0_CH1 _SB_MAKEMASK1(K_INT_MAC_0_CH1) 1768c2ecf20Sopenharmony_ci#define M_INT_MAC_1_CH1 _SB_MAKEMASK1(K_INT_MAC_1_CH1) 1778c2ecf20Sopenharmony_ci#define M_INT_MAC_2_CH1 _SB_MAKEMASK1(K_INT_MAC_2_CH1) 1788c2ecf20Sopenharmony_ci#endif /* 1250 PASS2 || 112x PASS1 */ 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci/* 1818c2ecf20Sopenharmony_ci * Interrupt mappings 1828c2ecf20Sopenharmony_ci */ 1838c2ecf20Sopenharmony_ci 1848c2ecf20Sopenharmony_ci#define K_INT_MAP_I0 0 /* interrupt pins on processor */ 1858c2ecf20Sopenharmony_ci#define K_INT_MAP_I1 1 1868c2ecf20Sopenharmony_ci#define K_INT_MAP_I2 2 1878c2ecf20Sopenharmony_ci#define K_INT_MAP_I3 3 1888c2ecf20Sopenharmony_ci#define K_INT_MAP_I4 4 1898c2ecf20Sopenharmony_ci#define K_INT_MAP_I5 5 1908c2ecf20Sopenharmony_ci#define K_INT_MAP_NMI 6 /* nonmaskable */ 1918c2ecf20Sopenharmony_ci#define K_INT_MAP_DINT 7 /* debug interrupt */ 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_ci/* 1948c2ecf20Sopenharmony_ci * LDT Interrupt Set Register (table 4-5) 1958c2ecf20Sopenharmony_ci */ 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci#define S_INT_LDT_INTMSG 0 1988c2ecf20Sopenharmony_ci#define M_INT_LDT_INTMSG _SB_MAKEMASK(3, S_INT_LDT_INTMSG) 1998c2ecf20Sopenharmony_ci#define V_INT_LDT_INTMSG(x) _SB_MAKEVALUE(x, S_INT_LDT_INTMSG) 2008c2ecf20Sopenharmony_ci#define G_INT_LDT_INTMSG(x) _SB_GETVALUE(x, S_INT_LDT_INTMSG, M_INT_LDT_INTMSG) 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_FIXED 0 2038c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_ARBITRATED 1 2048c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_SMI 2 2058c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_NMI 3 2068c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_INIT 4 2078c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_STARTUP 5 2088c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_EXTINT 6 2098c2ecf20Sopenharmony_ci#define K_INT_LDT_INTMSG_RESERVED 7 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci#define M_INT_LDT_EDGETRIGGER 0 2128c2ecf20Sopenharmony_ci#define M_INT_LDT_LEVELTRIGGER _SB_MAKEMASK1(3) 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci#define M_INT_LDT_PHYSICALDEST 0 2158c2ecf20Sopenharmony_ci#define M_INT_LDT_LOGICALDEST _SB_MAKEMASK1(4) 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ci#define S_INT_LDT_INTDEST 5 2188c2ecf20Sopenharmony_ci#define M_INT_LDT_INTDEST _SB_MAKEMASK(10, S_INT_LDT_INTDEST) 2198c2ecf20Sopenharmony_ci#define V_INT_LDT_INTDEST(x) _SB_MAKEVALUE(x, S_INT_LDT_INTDEST) 2208c2ecf20Sopenharmony_ci#define G_INT_LDT_INTDEST(x) _SB_GETVALUE(x, S_INT_LDT_INTDEST, M_INT_LDT_INTDEST) 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci#define S_INT_LDT_VECTOR 13 2238c2ecf20Sopenharmony_ci#define M_INT_LDT_VECTOR _SB_MAKEMASK(8, S_INT_LDT_VECTOR) 2248c2ecf20Sopenharmony_ci#define V_INT_LDT_VECTOR(x) _SB_MAKEVALUE(x, S_INT_LDT_VECTOR) 2258c2ecf20Sopenharmony_ci#define G_INT_LDT_VECTOR(x) _SB_GETVALUE(x, S_INT_LDT_VECTOR, M_INT_LDT_VECTOR) 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci/* 2288c2ecf20Sopenharmony_ci * Vector format (Table 4-6) 2298c2ecf20Sopenharmony_ci */ 2308c2ecf20Sopenharmony_ci 2318c2ecf20Sopenharmony_ci#define M_LDTVECT_RAISEINT 0x00 2328c2ecf20Sopenharmony_ci#define M_LDTVECT_RAISEMBOX 0x40 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci#endif /* 1250/112x */ 236