irq-gic-common.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2002 ARM Limited, All Rights Reserved.
  4. */
  5. #ifndef _IRQ_GIC_COMMON_H
  6. #define _IRQ_GIC_COMMON_H
  7. #include <linux/of.h>
  8. #include <linux/irqdomain.h>
  9. #include <linux/msi.h>
  10. #include <linux/irqchip/arm-gic-common.h>
  11. struct gic_quirk {
  12. const char *desc;
  13. const char *compatible;
  14. const char *property;
  15. bool (*init)(void *data);
  16. u32 iidr;
  17. u32 mask;
  18. };
  19. int gic_configure_irq(unsigned int irq, unsigned int type,
  20. void __iomem *base);
  21. void gic_dist_config(void __iomem *base, int gic_irqs, u8 priority);
  22. void gic_cpu_config(void __iomem *base, int nr, u8 priority);
  23. void gic_enable_quirks(u32 iidr, const struct gic_quirk *quirks,
  24. void *data);
  25. void gic_enable_of_quirks(const struct device_node *np,
  26. const struct gic_quirk *quirks, void *data);
  27. #define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0)
  28. #define RDIST_FLAGS_RD_TABLES_PREALLOCATED (1 << 1)
  29. #define RDIST_FLAGS_FORCE_NON_SHAREABLE (1 << 2)
  30. #endif /* _IRQ_GIC_COMMON_H */