sirc.h 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef __ASM_ARCH_MSM_SIRC_H
  13. #define __ASM_ARCH_MSM_SIRC_H
  14. struct sirc_regs_t {
  15. void *int_enable;
  16. void *int_enable_clear;
  17. void *int_enable_set;
  18. void *int_type;
  19. void *int_polarity;
  20. void *int_clear;
  21. };
  22. struct sirc_cascade_regs {
  23. void *int_status;
  24. unsigned int cascade_irq;
  25. };
  26. void msm_init_sirc(void);
  27. void msm_sirc_enter_sleep(void);
  28. void msm_sirc_exit_sleep(void);
  29. #if defined(CONFIG_ARCH_MSM_SCORPION)
  30. #include <mach/msm_iomap.h>
  31. /*
  32. * Secondary interrupt controller interrupts
  33. */
  34. #define FIRST_SIRC_IRQ (NR_MSM_IRQS + NR_GPIO_IRQS)
  35. #define INT_UART1 (FIRST_SIRC_IRQ + 0)
  36. #define INT_UART2 (FIRST_SIRC_IRQ + 1)
  37. #define INT_UART3 (FIRST_SIRC_IRQ + 2)
  38. #define INT_UART1_RX (FIRST_SIRC_IRQ + 3)
  39. #define INT_UART2_RX (FIRST_SIRC_IRQ + 4)
  40. #define INT_UART3_RX (FIRST_SIRC_IRQ + 5)
  41. #define INT_SPI_INPUT (FIRST_SIRC_IRQ + 6)
  42. #define INT_SPI_OUTPUT (FIRST_SIRC_IRQ + 7)
  43. #define INT_SPI_ERROR (FIRST_SIRC_IRQ + 8)
  44. #define INT_GPIO_GROUP1 (FIRST_SIRC_IRQ + 9)
  45. #define INT_GPIO_GROUP2 (FIRST_SIRC_IRQ + 10)
  46. #define INT_GPIO_GROUP1_SECURE (FIRST_SIRC_IRQ + 11)
  47. #define INT_GPIO_GROUP2_SECURE (FIRST_SIRC_IRQ + 12)
  48. #define INT_AVS_SVIC (FIRST_SIRC_IRQ + 13)
  49. #define INT_AVS_REQ_UP (FIRST_SIRC_IRQ + 14)
  50. #define INT_AVS_REQ_DOWN (FIRST_SIRC_IRQ + 15)
  51. #define INT_PBUS_ERR (FIRST_SIRC_IRQ + 16)
  52. #define INT_AXI_ERR (FIRST_SIRC_IRQ + 17)
  53. #define INT_SMI_ERR (FIRST_SIRC_IRQ + 18)
  54. #define INT_EBI1_ERR (FIRST_SIRC_IRQ + 19)
  55. #define INT_IMEM_ERR (FIRST_SIRC_IRQ + 20)
  56. #define INT_TEMP_SENSOR (FIRST_SIRC_IRQ + 21)
  57. #define INT_TV_ENC (FIRST_SIRC_IRQ + 22)
  58. #define INT_GRP2D (FIRST_SIRC_IRQ + 23)
  59. #define INT_GSBI_QUP (FIRST_SIRC_IRQ + 24)
  60. #define INT_SC_ACG (FIRST_SIRC_IRQ + 25)
  61. #define INT_WDT0 (FIRST_SIRC_IRQ + 26)
  62. #define INT_WDT1 (FIRST_SIRC_IRQ + 27)
  63. #if defined(CONFIG_MSM_SOC_REV_A)
  64. #define NR_SIRC_IRQS 28
  65. #define SIRC_MASK 0x0FFFFFFF
  66. #else
  67. #define NR_SIRC_IRQS 23
  68. #define SIRC_MASK 0x007FFFFF
  69. #endif
  70. #define LAST_SIRC_IRQ (FIRST_SIRC_IRQ + NR_SIRC_IRQS - 1)
  71. #define SPSS_SIRC_INT_SELECT (MSM_SIRC_BASE + 0x00)
  72. #define SPSS_SIRC_INT_ENABLE (MSM_SIRC_BASE + 0x04)
  73. #define SPSS_SIRC_INT_ENABLE_CLEAR (MSM_SIRC_BASE + 0x08)
  74. #define SPSS_SIRC_INT_ENABLE_SET (MSM_SIRC_BASE + 0x0C)
  75. #define SPSS_SIRC_INT_TYPE (MSM_SIRC_BASE + 0x10)
  76. #define SPSS_SIRC_INT_POLARITY (MSM_SIRC_BASE + 0x14)
  77. #define SPSS_SIRC_SECURITY (MSM_SIRC_BASE + 0x18)
  78. #define SPSS_SIRC_IRQ_STATUS (MSM_SIRC_BASE + 0x1C)
  79. #define SPSS_SIRC_IRQ1_STATUS (MSM_SIRC_BASE + 0x20)
  80. #define SPSS_SIRC_RAW_STATUS (MSM_SIRC_BASE + 0x24)
  81. #define SPSS_SIRC_INT_CLEAR (MSM_SIRC_BASE + 0x28)
  82. #define SPSS_SIRC_SOFT_INT (MSM_SIRC_BASE + 0x2C)
  83. #endif
  84. #endif