ipic.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * IPIC private definitions and structure.
  3. *
  4. * Maintainer: Kumar Gala <galak@kernel.crashing.org>
  5. *
  6. * Copyright 2005 Freescale Semiconductor, Inc
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. */
  13. #ifndef __IPIC_H__
  14. #define __IPIC_H__
  15. #include <asm/ipic.h>
  16. #define NR_IPIC_INTS 128
  17. /* External IRQS */
  18. #define IPIC_IRQ_EXT0 48
  19. #define IPIC_IRQ_EXT1 17
  20. #define IPIC_IRQ_EXT7 23
  21. /* Default Priority Registers */
  22. #define IPIC_PRIORITY_DEFAULT 0x05309770
  23. /* System Global Interrupt Configuration Register */
  24. #define SICFR_IPSA 0x00010000
  25. #define SICFR_IPSB 0x00020000
  26. #define SICFR_IPSC 0x00040000
  27. #define SICFR_IPSD 0x00080000
  28. #define SICFR_MPSA 0x00200000
  29. #define SICFR_MPSB 0x00400000
  30. /* System External Interrupt Mask Register */
  31. #define SEMSR_SIRQ0 0x00008000
  32. /* System Error Control Register */
  33. #define SERCR_MCPR 0x00000001
  34. struct ipic {
  35. volatile u32 __iomem *regs;
  36. /* The remapper for this IPIC */
  37. struct irq_domain *irqhost;
  38. };
  39. struct ipic_info {
  40. u8 ack; /* pending register offset from base if the irq
  41. supports ack operation */
  42. u8 mask; /* mask register offset from base */
  43. u8 prio; /* priority register offset from base */
  44. u8 force; /* force register offset from base */
  45. u8 bit; /* register bit position (as per doc)
  46. bit mask = 1 << (31 - bit) */
  47. u8 prio_mask; /* priority mask value */
  48. };
  49. #endif /* __IPIC_H__ */