18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * include/asm-parisc/irq.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2005 Matthew Wilcox <matthew@wil.cx> 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef _ASM_PARISC_IRQ_H 98c2ecf20Sopenharmony_ci#define _ASM_PARISC_IRQ_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <linux/cpumask.h> 128c2ecf20Sopenharmony_ci#include <asm/types.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#define NO_IRQ (-1) 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#ifdef CONFIG_GSC 178c2ecf20Sopenharmony_ci#define GSC_IRQ_BASE 16 188c2ecf20Sopenharmony_ci#define GSC_IRQ_MAX 63 198c2ecf20Sopenharmony_ci#define CPU_IRQ_BASE 64 208c2ecf20Sopenharmony_ci#else 218c2ecf20Sopenharmony_ci#define CPU_IRQ_BASE 16 228c2ecf20Sopenharmony_ci#endif 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define TIMER_IRQ (CPU_IRQ_BASE + 0) 258c2ecf20Sopenharmony_ci#define IPI_IRQ (CPU_IRQ_BASE + 1) 268c2ecf20Sopenharmony_ci#define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1)) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#define NR_IRQS (CPU_IRQ_MAX + 1) 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistatic __inline__ int irq_canonicalize(int irq) 318c2ecf20Sopenharmony_ci{ 328c2ecf20Sopenharmony_ci return (irq == 2) ? 9 : irq; 338c2ecf20Sopenharmony_ci} 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_cistruct irq_chip; 368c2ecf20Sopenharmony_cistruct irq_data; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_civoid cpu_ack_irq(struct irq_data *d); 398c2ecf20Sopenharmony_civoid cpu_eoi_irq(struct irq_data *d); 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ciextern int txn_alloc_irq(unsigned int nbits); 428c2ecf20Sopenharmony_ciextern int txn_claim_irq(int); 438c2ecf20Sopenharmony_ciextern unsigned int txn_alloc_data(unsigned int); 448c2ecf20Sopenharmony_ciextern unsigned long txn_alloc_addr(unsigned int); 458c2ecf20Sopenharmony_ciextern unsigned long txn_affinity_addr(unsigned int irq, int cpu); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ciextern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *); 488c2ecf20Sopenharmony_ciextern int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest); 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci/* soft power switch support (power.c) */ 518c2ecf20Sopenharmony_ciextern struct tasklet_struct power_tasklet; 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#endif /* _ASM_PARISC_IRQ_H */ 54