xref: /reactos/boot/armllb/hw/omap3-zoom2/hwuart.c (revision 98e8827a)
1 /*
2  * PROJECT:         ReactOS Boot Loader
3  * LICENSE:         BSD - See COPYING.ARM in the top level directory
4  * FILE:            boot/armllb/hw/omap3-zoom2/hwuart.c
5  * PURPOSE:         LLB UART Initialization Routines for OMAP3 ZOOM2
6  * PROGRAMMERS:     ReactOS Portable Systems Group
7  */
8 
9 #include "precomp.h"
10 #define SERIAL_REGISTER_STRIDE 2
11 #include "lib/cportlib/cport.c"
12 
13 /* GLOBALS ********************************************************************/
14 
15 #define SERIAL_TL16CP754C_QUAD0_BASE (PVOID)0x10000000
16 
17 CPPORT LlbHwOmap3UartPorts[4] =
18 {
19     {NULL, 0, 0},
20     {NULL, 0, 0},
21     {NULL, 0, 0},
22     {NULL, 0, 0}
23 };
24 
25 /* FUNCTIONS ******************************************************************/
26 
27 VOID
28 NTAPI
29 LlbHwOmap3UartInitialize(VOID)
30 {
31     CpInitialize(&LlbHwOmap3UartPorts[0], SERIAL_TL16CP754C_QUAD0_BASE, 115200);
32 }
33 
34 VOID
35 NTAPI
36 LlbHwUartSendChar(IN CHAR Char)
37 {
38     /* Send the character */
39     CpPutByte(&LlbHwOmap3UartPorts[0], Char);
40 }
41 
42 BOOLEAN
43 NTAPI
44 LlbHwUartTxReady(VOID)
45 {
46     /* TX output buffer is ready? */
47     return TRUE;
48 }
49 
50 ULONG
51 NTAPI
52 LlbHwGetUartBase(IN ULONG Port)
53 {
54     if (Port == 0)
55     {
56         return 0x10000000;
57     }
58 
59     return 0;
60 }
61 
62 /* EOF */
63