blob: d5470169b553e8f0599f526767694af0edb9d5c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*
* Copyright (C) 2010 Google, Inc.
*
* Author:
* Brian Swetland <swetland@google.com>
* Iliyan Malchev <malchev@google.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <asm/hardware/gic.h>
#include <mach/iomap.h>
#include <mach/fiq.h>
#include <mach/legacy_irq.h>
#include "board.h"
void tegra_fiq_enable(int irq)
{
void __iomem *base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x100);
/* enable FIQ */
u32 val = readl(base + GIC_CPU_CTRL);
val &= ~8; /* pass FIQs through */
val |= 2; /* enableNS */
writel(val, base + GIC_CPU_CTRL);
tegra_legacy_select_fiq(irq, true);
tegra_legacy_unmask_irq(irq);
}
void tegra_fiq_disable(int irq)
{
tegra_legacy_mask_irq(irq);
tegra_legacy_select_fiq(irq, false);
}
|