aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/irq.c15
-rw-r--r--arch/arm/mach-tegra/irq.h22
2 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c
index b7886f183511..c9976e337bb9 100644
--- a/arch/arm/mach-tegra/irq.c
+++ b/arch/arm/mach-tegra/irq.c
@@ -45,6 +45,8 @@
45 45
46#define FIRST_LEGACY_IRQ 32 46#define FIRST_LEGACY_IRQ 32
47 47
48#define SGI_MASK 0xFFFF
49
48static int num_ictlrs; 50static int num_ictlrs;
49 51
50static void __iomem *ictlr_reg_base[] = { 52static void __iomem *ictlr_reg_base[] = {
@@ -55,6 +57,19 @@ static void __iomem *ictlr_reg_base[] = {
55 IO_ADDRESS(TEGRA_QUINARY_ICTLR_BASE), 57 IO_ADDRESS(TEGRA_QUINARY_ICTLR_BASE),
56}; 58};
57 59
60bool tegra_pending_sgi(void)
61{
62 u32 pending_set;
63 void __iomem *distbase = IO_ADDRESS(TEGRA_ARM_INT_DIST_BASE);
64
65 pending_set = readl_relaxed(distbase + GIC_DIST_PENDING_SET);
66
67 if (pending_set & SGI_MASK)
68 return true;
69
70 return false;
71}
72
58static inline void tegra_irq_write_mask(unsigned int irq, unsigned long reg) 73static inline void tegra_irq_write_mask(unsigned int irq, unsigned long reg)
59{ 74{
60 void __iomem *base; 75 void __iomem *base;
diff --git a/arch/arm/mach-tegra/irq.h b/arch/arm/mach-tegra/irq.h
new file mode 100644
index 000000000000..5142649bba05
--- /dev/null
+++ b/arch/arm/mach-tegra/irq.h
@@ -0,0 +1,22 @@
1/*
2 * Copyright (c) 2012, NVIDIA Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __TEGRA_IRQ_H
18#define __TEGRA_IRQ_H
19
20bool tegra_pending_sgi(void);
21
22#endif