]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/bootstrap/server/src/platform/imx.cc
9da67d7d25fb436cabc0cfc1f4625249c05ba086
[l4.git] / l4 / pkg / bootstrap / server / src / platform / imx.cc
1 /*!
2  * \file   support_imx.cc
3  * \brief  Support for the i.MX platform
4  *
5  * \date   2008-02-04
6  * \author Adam Lackorznynski <adam@os.inf.tu-dresden.de>
7  *
8  */
9 /*
10  * (c) 2008-2009 Author(s)
11  *     economic rights: Technische Universität Dresden (Germany)
12  *
13  * This file is part of TUD:OS and distributed under the terms of the
14  * GNU General Public License 2.
15  * Please see the COPYING-GPL-2 file for details.
16  */
17
18 #include "support.h"
19 #include <l4/drivers/uart_imx.h>
20
21 namespace {
22 class Platform_arm_imx : public Platform_single_region_ram
23 {
24   bool probe() { return true; }
25
26   void init()
27   {
28 #ifdef PLATFORM_TYPE_imx21
29     static L4::Io_register_block_mmio r(0x1000A000);
30     static L4::Uart_imx21 _uart;
31 #elif defined(PLATFORM_TYPE_imx35)
32     static L4::Uart_imx35 _uart;
33     static L4::Io_register_block_mmio r(0x43f90000); // UART-1
34     //static L4::Io_register_block_mmio r(0x43f94000); // UART-2
35     //static L4::Io_register_block_mmio r(0x5000c000); // UART-3
36 #elif defined(PLATFORM_TYPE_imx51)
37     static L4::Io_register_block_mmio r(0x73fbc000);
38     static L4::Uart_imx51 _uart;
39 #elif defined(PLATFORM_TYPE_imx6)
40     //static L4::Io_register_block_mmio r(0x02020000); // UART1
41     static L4::Io_register_block_mmio r(0x021e8000); // UART2
42     static L4::Uart_imx6 _uart;
43 #else
44 #error Which platform type?
45 #endif
46     _uart.startup(&r);
47     set_stdio_uart(&_uart);
48   }
49 };
50 }
51
52 REGISTER_PLATFORM(Platform_arm_imx);