blob: 607bab5da5bd19b5617a57d4df55a51d70d5f818 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
Gregory Beanec4d7922010-04-30 21:59:38 -07002 *
David Brown3162aa22011-02-14 16:15:26 -08003 * 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.
Gregory Beanec4d7922010-04-30 21:59:38 -07006 *
David Brown3162aa22011-02-14 16:15:26 -08007 * 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.
Gregory Beanec4d7922010-04-30 21:59:38 -070011 */
12
13#ifndef __ASM_ARCH_MSM_SIRC_H
14#define __ASM_ARCH_MSM_SIRC_H
15
16struct sirc_regs_t {
17 void *int_enable;
18 void *int_enable_clear;
19 void *int_enable_set;
20 void *int_type;
21 void *int_polarity;
22 void *int_clear;
23};
24
25struct sirc_cascade_regs {
26 void *int_status;
27 unsigned int cascade_irq;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070028 unsigned int cascade_fiq;
Gregory Beanec4d7922010-04-30 21:59:38 -070029};
30
31void msm_init_sirc(void);
Gregory Beanec4d7922010-04-30 21:59:38 -070032
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070033#if defined(CONFIG_ARCH_MSM_SCORPION) && !defined(CONFIG_MSM_SMP)
Gregory Beanec4d7922010-04-30 21:59:38 -070034
35#include <mach/msm_iomap.h>
36
37/*
38 * Secondary interrupt controller interrupts
39 */
40
41#define FIRST_SIRC_IRQ (NR_MSM_IRQS + NR_GPIO_IRQS)
42
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070043#if defined(CONFIG_ARCH_FSM9XXX)
44#include <mach/sirc-fsm9xxx.h>
45#else /* CONFIG_ARCH_FSM9XXX */
46
Gregory Beanec4d7922010-04-30 21:59:38 -070047#define INT_UART1 (FIRST_SIRC_IRQ + 0)
48#define INT_UART2 (FIRST_SIRC_IRQ + 1)
49#define INT_UART3 (FIRST_SIRC_IRQ + 2)
50#define INT_UART1_RX (FIRST_SIRC_IRQ + 3)
51#define INT_UART2_RX (FIRST_SIRC_IRQ + 4)
52#define INT_UART3_RX (FIRST_SIRC_IRQ + 5)
53#define INT_SPI_INPUT (FIRST_SIRC_IRQ + 6)
54#define INT_SPI_OUTPUT (FIRST_SIRC_IRQ + 7)
55#define INT_SPI_ERROR (FIRST_SIRC_IRQ + 8)
56#define INT_GPIO_GROUP1 (FIRST_SIRC_IRQ + 9)
57#define INT_GPIO_GROUP2 (FIRST_SIRC_IRQ + 10)
58#define INT_GPIO_GROUP1_SECURE (FIRST_SIRC_IRQ + 11)
59#define INT_GPIO_GROUP2_SECURE (FIRST_SIRC_IRQ + 12)
60#define INT_AVS_SVIC (FIRST_SIRC_IRQ + 13)
61#define INT_AVS_REQ_UP (FIRST_SIRC_IRQ + 14)
62#define INT_AVS_REQ_DOWN (FIRST_SIRC_IRQ + 15)
63#define INT_PBUS_ERR (FIRST_SIRC_IRQ + 16)
64#define INT_AXI_ERR (FIRST_SIRC_IRQ + 17)
65#define INT_SMI_ERR (FIRST_SIRC_IRQ + 18)
66#define INT_EBI1_ERR (FIRST_SIRC_IRQ + 19)
67#define INT_IMEM_ERR (FIRST_SIRC_IRQ + 20)
68#define INT_TEMP_SENSOR (FIRST_SIRC_IRQ + 21)
69#define INT_TV_ENC (FIRST_SIRC_IRQ + 22)
70#define INT_GRP2D (FIRST_SIRC_IRQ + 23)
71#define INT_GSBI_QUP (FIRST_SIRC_IRQ + 24)
72#define INT_SC_ACG (FIRST_SIRC_IRQ + 25)
73#define INT_WDT0 (FIRST_SIRC_IRQ + 26)
74#define INT_WDT1 (FIRST_SIRC_IRQ + 27)
75
76#if defined(CONFIG_MSM_SOC_REV_A)
77#define NR_SIRC_IRQS 28
78#define SIRC_MASK 0x0FFFFFFF
79#else
80#define NR_SIRC_IRQS 23
81#define SIRC_MASK 0x007FFFFF
82#endif
83
Gregory Beanec4d7922010-04-30 21:59:38 -070084#define SPSS_SIRC_INT_SELECT (MSM_SIRC_BASE + 0x00)
85#define SPSS_SIRC_INT_ENABLE (MSM_SIRC_BASE + 0x04)
86#define SPSS_SIRC_INT_ENABLE_CLEAR (MSM_SIRC_BASE + 0x08)
87#define SPSS_SIRC_INT_ENABLE_SET (MSM_SIRC_BASE + 0x0C)
88#define SPSS_SIRC_INT_TYPE (MSM_SIRC_BASE + 0x10)
89#define SPSS_SIRC_INT_POLARITY (MSM_SIRC_BASE + 0x14)
90#define SPSS_SIRC_SECURITY (MSM_SIRC_BASE + 0x18)
91#define SPSS_SIRC_IRQ_STATUS (MSM_SIRC_BASE + 0x1C)
92#define SPSS_SIRC_IRQ1_STATUS (MSM_SIRC_BASE + 0x20)
93#define SPSS_SIRC_RAW_STATUS (MSM_SIRC_BASE + 0x24)
94#define SPSS_SIRC_INT_CLEAR (MSM_SIRC_BASE + 0x28)
95#define SPSS_SIRC_SOFT_INT (MSM_SIRC_BASE + 0x2C)
96
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070097#endif /* CONFIG_ARCH_FSM9XXX */
98
99#define LAST_SIRC_IRQ (FIRST_SIRC_IRQ + NR_SIRC_IRQS - 1)
100
101#endif /* CONFIG_ARCH_MSM_SCORPION */
Gregory Beanec4d7922010-04-30 21:59:38 -0700102
103#endif