irq.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __ASM_MACH_LOONGSON64_IRQ_H_
  2. #define __ASM_MACH_LOONGSON64_IRQ_H_
  3. #include <boot_param.h>
  4. #ifdef CONFIG_CPU_LOONGSON3
  5. /* cpu core interrupt numbers */
  6. #define MIPS_CPU_IRQ_BASE 56
  7. #define LOONGSON_UART_IRQ (MIPS_CPU_IRQ_BASE + 2) /* UART */
  8. #define LOONGSON_HT1_IRQ (MIPS_CPU_IRQ_BASE + 3) /* HT1 */
  9. #define LOONGSON_TIMER_IRQ (MIPS_CPU_IRQ_BASE + 7) /* CPU Timer */
  10. #define LOONGSON_HT1_CFG_BASE loongson_sysconf.ht_control_base
  11. #define LOONGSON_HT1_INT_VECTOR_BASE (LOONGSON_HT1_CFG_BASE + 0x80)
  12. #define LOONGSON_HT1_INT_EN_BASE (LOONGSON_HT1_CFG_BASE + 0xa0)
  13. #define LOONGSON_HT1_INT_VECTOR(n) \
  14. LOONGSON3_REG32(LOONGSON_HT1_INT_VECTOR_BASE, 4 * (n))
  15. #define LOONGSON_HT1_INTN_EN(n) \
  16. LOONGSON3_REG32(LOONGSON_HT1_INT_EN_BASE, 4 * (n))
  17. #define LOONGSON_INT_ROUTER_OFFSET 0x1400
  18. #define LOONGSON_INT_ROUTER_INTEN \
  19. LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x24)
  20. #define LOONGSON_INT_ROUTER_INTENSET \
  21. LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x28)
  22. #define LOONGSON_INT_ROUTER_INTENCLR \
  23. LOONGSON3_REG32(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + 0x2c)
  24. #define LOONGSON_INT_ROUTER_ENTRY(n) \
  25. LOONGSON3_REG8(LOONGSON3_REG_BASE, LOONGSON_INT_ROUTER_OFFSET + n)
  26. #define LOONGSON_INT_ROUTER_LPC LOONGSON_INT_ROUTER_ENTRY(0x0a)
  27. #define LOONGSON_INT_ROUTER_HT1(n) LOONGSON_INT_ROUTER_ENTRY(n + 0x18)
  28. #define LOONGSON_INT_COREx_INTy(x, y) (1<<(x) | 1<<(y+4)) /* route to int y of core x */
  29. #endif
  30. extern void fixup_irqs(void);
  31. extern void loongson3_ipi_interrupt(struct pt_regs *regs);
  32. #include_next <irq.h>
  33. #endif /* __ASM_MACH_LOONGSON64_IRQ_H_ */