1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#include <linux/kernel.h>
16#include <linux/interrupt.h>
17#include <linux/serial_core.h>
18#include <linux/irq.h>
19#include <linux/io.h>
20
21#include <asm/hardware/vic.h>
22
23#include <mach/map.h>
24#include <plat/irq-vic-timer.h>
25#include <plat/irq-uart.h>
26#include <plat/cpu.h>
27
28static struct s3c_uart_irq uart_irqs[] = {
29 [0] = {
30 .regs = S3C_VA_UART0,
31 .base_irq = IRQ_S3CUART_BASE0,
32 .parent_irq = IRQ_UART0,
33 },
34 [1] = {
35 .regs = S3C_VA_UART1,
36 .base_irq = IRQ_S3CUART_BASE1,
37 .parent_irq = IRQ_UART1,
38 },
39 [2] = {
40 .regs = S3C_VA_UART2,
41 .base_irq = IRQ_S3CUART_BASE2,
42 .parent_irq = IRQ_UART2,
43 },
44 [3] = {
45 .regs = S3C_VA_UART3,
46 .base_irq = IRQ_S3CUART_BASE3,
47 .parent_irq = IRQ_UART3,
48 },
49};
50
51
52void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
53{
54 printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
55
56
57 vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, 0);
58 vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, 0);
59
60
61 s3c_init_vic_timer_irq(5, IRQ_TIMER0);
62
63 s3c_init_uart_irqs(uart_irqs, ARRAY_SIZE(uart_irqs));
64}
65