arm-gic-common.h 1021 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * include/linux/irqchip/arm-gic-common.h
  4. *
  5. * Copyright (C) 2016 ARM Limited, All Rights Reserved.
  6. */
  7. #ifndef __LINUX_IRQCHIP_ARM_GIC_COMMON_H
  8. #define __LINUX_IRQCHIP_ARM_GIC_COMMON_H
  9. #include <linux/types.h>
  10. #include <linux/ioport.h>
  11. #define GICD_INT_DEF_PRI 0xa0
  12. #define GICD_INT_DEF_PRI_X4 ((GICD_INT_DEF_PRI << 24) |\
  13. (GICD_INT_DEF_PRI << 16) |\
  14. (GICD_INT_DEF_PRI << 8) |\
  15. GICD_INT_DEF_PRI)
  16. enum gic_type {
  17. GIC_V2,
  18. GIC_V3,
  19. };
  20. struct gic_kvm_info {
  21. /* GIC type */
  22. enum gic_type type;
  23. /* Virtual CPU interface */
  24. struct resource vcpu;
  25. /* Interrupt number */
  26. unsigned int maint_irq;
  27. /* Virtual control interface */
  28. struct resource vctrl;
  29. /* vlpi support */
  30. bool has_v4;
  31. /* rvpeid support */
  32. bool has_v4_1;
  33. };
  34. const struct gic_kvm_info *gic_get_kvm_info(void);
  35. struct irq_domain;
  36. struct fwnode_handle;
  37. int gicv2m_init(struct fwnode_handle *parent_handle,
  38. struct irq_domain *parent);
  39. #endif /* __LINUX_IRQCHIP_ARM_GIC_COMMON_H */