]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/mips/include/asm/mach-loongson64/irq.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / mips / include / asm / mach-loongson64 / irq.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
30ad29bb
HC
2#ifndef __ASM_MACH_LOONGSON64_IRQ_H_
3#define __ASM_MACH_LOONGSON64_IRQ_H_
d788bfa9
HC
4
5#include <boot_param.h>
6
7#ifdef CONFIG_CPU_LOONGSON3
8
9/* cpu core interrupt numbers */
10#define MIPS_CPU_IRQ_BASE 56
11
12#define LOONGSON_UART_IRQ (MIPS_CPU_IRQ_BASE + 2) /* UART */
13#define LOONGSON_HT1_IRQ (MIPS_CPU_IRQ_BASE + 3) /* HT1 */
14#define LOONGSON_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) /* CPU Timer */
15
16#define LOONGSON_HT1_CFG_BASE loongson_sysconf.ht_control_base
17#define LOONGSON_HT1_INT_VECTOR_BASE (LOONGSON_HT1_CFG_BASE + 0x80)
18#define LOONGSON_HT1_INT_EN_BASE (LOONGSON_HT1_CFG_BASE + 0xa0)
19#define LOONGSON_HT1_INT_VECTOR(n) \
20 LOONGSON3_REG32(LOONGSON_HT1_INT_VECTOR_BASE, 4 * (n))
21#define LOONGSON_HT1_INTN_EN(n) \
22 LOONGSON3_REG32(LOONGSON_HT1_INT_EN_BASE, 4 * (n))
23
24#define LOONGSON_INT_ROUTER_OFFSET 0x1400
25#define LOONGSON_INT_ROUTER_INTEN \
26 LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x24)
27#define LOONGSON_INT_ROUTER_INTENSET \
28 LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x28)
29#define LOONGSON_INT_ROUTER_INTENCLR \
30 LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x2c)
31#define LOONGSON_INT_ROUTER_ENTRY(n) \
32 LOONGSON3_REG8(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + n)
33#define LOONGSON_INT_ROUTER_LPC LOONGSON_INT_ROUTER_ENTRY(0x0a)
34#define LOONGSON_INT_ROUTER_HT1(n) LOONGSON_INT_ROUTER_ENTRY(n + 0x18)
35
ec0f8d3f 36#define LOONGSON_INT_COREx_INTy(x, y) (1<<(x) | 1<<(y+4)) /* route to int y of core x */
d788bfa9
HC
37
38#endif
39
c4a987db 40extern void fixup_irqs(void);
300459d5
HC
41extern void loongson3_ipi_interrupt(struct pt_regs *regs);
42
d788bfa9 43#include_next <irq.h>
30ad29bb 44#endif /* __ASM_MACH_LOONGSON64_IRQ_H_ */