ipic.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_SIPRR_A_DEFAULT 0x05309770
  23. #define IPIC_SIPRR_D_DEFAULT 0x05309770
  24. #define IPIC_SMPRR_A_DEFAULT 0x05309770
  25. #define IPIC_SMPRR_B_DEFAULT 0x05309770
  26. /* System Global Interrupt Configuration Register */
  27. #define SICFR_IPSA 0x00010000
  28. #define SICFR_IPSD 0x00080000
  29. #define SICFR_MPSA 0x00200000
  30. #define SICFR_MPSB 0x00400000
  31. /* System External Interrupt Mask Register */
  32. #define SEMSR_SIRQ0 0x00008000
  33. /* System Error Control Register */
  34. #define SERCR_MCPR 0x00000001
  35. struct ipic {
  36. volatile u32 __iomem *regs;
  37. /* The remapper for this IPIC */
  38. struct irq_host *irqhost;
  39. /* The "linux" controller struct */
  40. struct irq_chip hc_irq;
  41. };
  42. struct ipic_info {
  43. u8 pend; /* pending register offset from base */
  44. u8 mask; /* mask register offset from base */
  45. u8 prio; /* priority register offset from base */
  46. u8 force; /* force register offset from base */
  47. u8 bit; /* register bit position (as per doc)
  48. bit mask = 1 << (31 - bit) */
  49. u8 prio_mask; /* priority mask value */
  50. };
  51. #endif /* __IPIC_H__ */