]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/arm/bsp/omap/pic-arm-gic-omap4.cpp
Update
[l4.git] / kernel / fiasco / src / kern / arm / bsp / omap / pic-arm-gic-omap4.cpp
1 INTERFACE [arm && pic_gic && (omap4 || omap5)]:
2
3 #include "initcalls.h"
4 #include "gic.h"
5
6 // ------------------------------------------------------------------------
7 IMPLEMENTATION [arm && pic_gic && (omap4 || omap5)]:
8
9 #include "irq_mgr_multi_chip.h"
10 #include "kmem.h"
11
12 PUBLIC static FIASCO_INIT
13 void
14 Pic::init()
15 {
16   typedef Irq_mgr_multi_chip<8> M;
17
18   M *m = new Boot_object<M>(1);
19
20   gic.construct(Kmem::mmio_remap(Mem_layout::Gic_cpu_phys_base),
21                 Kmem::mmio_remap(Mem_layout::Gic_dist_phys_base));
22   m->add_chip(0, gic, gic->nr_irqs());
23
24   Irq_mgr::mgr = m;
25 }
26
27 // ------------------------------------------------------------------------
28 IMPLEMENTATION [arm && mp && pic_gic && (omap4 || omap5)]:
29
30 PUBLIC static
31 void Pic::init_ap(Cpu_number, bool resume)
32 {
33   gic->init_ap(resume);
34 }