18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * EHV_PIC private definitions and structure. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright 2008-2010 Freescale Semiconductor, Inc. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This file is licensed under the terms of the GNU General Public License 78c2ecf20Sopenharmony_ci * version 2. This program is licensed "as is" without any warranty of any 88c2ecf20Sopenharmony_ci * kind, whether express or implied. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#ifndef __EHV_PIC_H__ 118c2ecf20Sopenharmony_ci#define __EHV_PIC_H__ 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/irq.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#define NR_EHV_PIC_INTS 1024 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define EHV_PIC_INFO(name) EHV_PIC_##name 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define EHV_PIC_VECPRI_POLARITY_NEGATIVE 0 208c2ecf20Sopenharmony_ci#define EHV_PIC_VECPRI_POLARITY_POSITIVE 1 218c2ecf20Sopenharmony_ci#define EHV_PIC_VECPRI_SENSE_EDGE 0 228c2ecf20Sopenharmony_ci#define EHV_PIC_VECPRI_SENSE_LEVEL 0x2 238c2ecf20Sopenharmony_ci#define EHV_PIC_VECPRI_POLARITY_MASK 0x1 248c2ecf20Sopenharmony_ci#define EHV_PIC_VECPRI_SENSE_MASK 0x2 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_cistruct ehv_pic { 278c2ecf20Sopenharmony_ci /* The remapper for this EHV_PIC */ 288c2ecf20Sopenharmony_ci struct irq_domain *irqhost; 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci /* The "linux" controller struct */ 318c2ecf20Sopenharmony_ci struct irq_chip hc_irq; 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci /* core int flag */ 348c2ecf20Sopenharmony_ci int coreint_flag; 358c2ecf20Sopenharmony_ci}; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_civoid ehv_pic_init(void); 388c2ecf20Sopenharmony_ciunsigned int ehv_pic_get_irq(void); 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#endif /* __EHV_PIC_H__ */ 41