1
2
3
4
5
6
7
8
9
10
11
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/irq.h>
16#include <linux/io.h>
17#include <asm/proc-fns.h>
18#include <asm/system_misc.h>
19#include <asm/mach/arch.h>
20#include <mach/at91x40.h>
21#include <mach/at91_st.h>
22#include <mach/timex.h>
23
24#include "at91_aic.h"
25#include "generic.h"
26
27
28
29
30
31int clk_enable(struct clk *clk)
32{
33 return 0;
34}
35
36void clk_disable(struct clk *clk)
37{
38}
39
40unsigned long clk_get_rate(struct clk *clk)
41{
42 return AT91X40_MASTER_CLOCK;
43}
44
45static void at91x40_idle(void)
46{
47
48
49
50
51 __raw_writel(AT91_PS_CR_CPU, AT91_IO_P2V(AT91_PS_CR));
52 cpu_do_idle();
53}
54
55void __init at91x40_initialize(unsigned long main_clock)
56{
57 arm_pm_idle = at91x40_idle;
58 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
59 | (1 << AT91X40_ID_IRQ2);
60}
61
62
63
64
65static unsigned int at91x40_default_irq_priority[NR_AIC_IRQS] __initdata = {
66 7,
67 0,
68 0,
69 0,
70 2,
71 2,
72 2,
73 0,
74 0,
75 0,
76 0,
77 0,
78 0,
79 0,
80 0,
81 0,
82 0,
83 0,
84 0,
85};
86
87void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS])
88{
89 if (!priority)
90 priority = at91x40_default_irq_priority;
91
92 at91_aic_init(priority, at91_extern_irq);
93}
94
95