]> rtime.felk.cvut.cz Git - l4.git/blob - kernel/fiasco/src/kern/arm/bsp/tegra/kernel_uart-arm-tegra.cpp
update
[l4.git] / kernel / fiasco / src / kern / arm / bsp / tegra / kernel_uart-arm-tegra.cpp
1 INTERFACE:
2
3 // On ARM the MMIO for the uart is accessible before the MMU is fully up
4 EXTENSION class Kernel_uart { enum { Bsp_init_mode = Init_before_mmu }; };
5
6 IMPLEMENTATION [arm && tegra2 && serial]:
7
8 #include "kmem.h"
9
10 IMPLEMENT
11 bool Kernel_uart::startup(unsigned, int)
12 {
13   return Uart::startup(Kmem::mmio_remap(Mem_layout::Uart_phys_base) + 0x300 /* UARTD */, 122);
14 }
15
16 IMPLEMENTATION [arm && tegra3 && serial]:
17
18 #include "kmem.h"
19
20 IMPLEMENT
21 bool Kernel_uart::startup(unsigned, int)
22 {
23   if (0)
24     return Uart::startup(Kmem::mmio_remap(Mem_layout::Uart_phys_base), 68); // uarta
25   return Uart::startup(Kmem::mmio_remap(Mem_layout::Uart_phys_base) + 0x200, 78); // uartc
26 }