OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [src/] [platform/] [pba9/] [irq.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Platform generic irq handling
3
 *
4
 * Copyright (C) 2007 Bahadir Balban
5
 */
6
#include <l4/generic/platform.h>
7
#include <l4/generic/irq.h>
8
#include <l4/generic/time.h>
9
#include INC_PLAT(irq.h)
10
#include INC_PLAT(platform.h)
11
#include INC_ARCH(exception.h)
12
#include <l4/lib/bit.h>
13
#include <l4/drivers/irq/gic/gic.h>
14
#include <l4/platform/realview/irq.h>
15
 
16
extern struct gic_data gic_data[IRQ_CHIPS_MAX];
17
 
18
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
19
        [0] = {
20
                .name = "VX-A9 GIC",
21
                .level = 0,
22
                .cascade = IRQ_NIL,
23
                .start = 0,
24
                .end = IRQ_OFFSET + IRQS_MAX,
25
                .data = &gic_data[0],
26
                .ops = {
27
                        .init = gic_dummy_init,
28
                        .read_irq = gic_read_irq,
29
                        .ack_and_mask = gic_ack_and_mask,
30
                        .unmask = gic_unmask_irq,
31
                        .set_cpu = gic_set_target,
32
                },
33
        },
34
};
35
 
36
/*
37
 * Built-in irq handlers initialised at compile time.
38
 * Else register with register_irq()
39
 */
40
struct irq_desc irq_desc_array[IRQS_MAX] = {
41
        [IRQ_TIMER0] = {
42
                .name = "Timer0",
43
                .chip = &irq_chip_array[0],
44
                .handler = platform_timer_handler,
45
        },
46
        [IRQ_TIMER1] = {
47
                .name = "Timer1",
48
                .chip = &irq_chip_array[0],
49
                .handler = platform_timer_user_handler,
50
        },
51
        [IRQ_KEYBOARD0] = {
52
                .name = "Keyboard",
53
                .chip = &irq_chip_array[0],
54
                .handler = platform_keyboard_user_handler,
55
        },
56
        [IRQ_MOUSE0] = {
57
                .name = "Mouse",
58
                .chip = &irq_chip_array[0],
59
                .handler = platform_mouse_user_handler,
60
        },
61
};
62
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.