From aa3c437ea13848e91f07680960ce2c653e36d689 Mon Sep 17 00:00:00 2001 From: Sir Richard Date: Wed, 24 Nov 2010 14:07:56 +0000 Subject: [PATCH 1/1] [ARMLLB]: Delete deprecated folder [ARMLLB]: Add missing UART functionality for ZOOM2. Leverages existing CPORT library. svn path=/trunk/; revision=49768 --- reactos/boot/armllb/hw/omap3-zoom2/hwuart.c | 62 ++++++++++++++++ reactos/boot/armllb/hw/omap3/hwinfo.c | 78 --------------------- reactos/boot/armllb/hw/omap3/hwinit.c | 18 ----- 3 files changed, 62 insertions(+), 96 deletions(-) create mode 100755 reactos/boot/armllb/hw/omap3-zoom2/hwuart.c delete mode 100755 reactos/boot/armllb/hw/omap3/hwinfo.c delete mode 100755 reactos/boot/armllb/hw/omap3/hwinit.c diff --git a/reactos/boot/armllb/hw/omap3-zoom2/hwuart.c b/reactos/boot/armllb/hw/omap3-zoom2/hwuart.c new file mode 100755 index 00000000000..52143dd1f4e --- /dev/null +++ b/reactos/boot/armllb/hw/omap3-zoom2/hwuart.c @@ -0,0 +1,62 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: boot/armllb/hw/omap3-zoom2/hwuart.c + * PURPOSE: LLB UART Initialization Routines for OMAP3 ZOOM2 + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +#include "precomp.h" +#define SERIAL_REGISTER_STRIDE 2 +#include "lib/cportlib/cport.c" + +/* GLOBALS ********************************************************************/ + +#define SERIAL_TL16CP754C_QUAD0_BASE (PVOID)0x10000000 + +CPPORT LlbHwOmap3UartPorts[4] = +{ + {NULL, 0, 0}, + {NULL, 0, 0}, + {NULL, 0, 0}, + {NULL, 0, 0} +}; + +/* FUNCTIONS ******************************************************************/ + +VOID +NTAPI +LlbHwOmap3UartInitialize(VOID) +{ + CpInitialize(&LlbHwOmap3UartPorts[0], SERIAL_TL16CP754C_QUAD0_BASE, 115200); +} + +VOID +NTAPI +LlbHwUartSendChar(IN CHAR Char) +{ + /* Send the character */ + CpPutByte(&LlbHwOmap3UartPorts[0], Char); +} + +BOOLEAN +NTAPI +LlbHwUartTxReady(VOID) +{ + /* TX output buffer is ready? */ + return TRUE; +} + +ULONG +NTAPI +LlbHwGetUartBase(IN ULONG Port) +{ + if (Port == 0) + { + return 0x10000000; + } + + return 0; +} + +/* EOF */ diff --git a/reactos/boot/armllb/hw/omap3/hwinfo.c b/reactos/boot/armllb/hw/omap3/hwinfo.c deleted file mode 100755 index a1bd1cdbbae..00000000000 --- a/reactos/boot/armllb/hw/omap3/hwinfo.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * PROJECT: ReactOS Boot Loader - * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: boot/armllb/hw/omap3/hwinfo.c - * PURPOSE: LLB Hardware Info Routines for OMAP3 - * PROGRAMMERS: ReactOS Portable Systems Group - */ - -#include "precomp.h" - -ULONG -NTAPI -LlbHwGetScreenWidth(VOID) -{ - return 1280; -} - -ULONG -NTAPI -LlbHwGetScreenHeight(VOID) -{ - return 720; -} - -PVOID -NTAPI -LlbHwGetFrameBuffer(VOID) -{ - return (PVOID)0x80500000; -} - -ULONG -NTAPI -LlbHwGetBoardType(VOID) -{ - return MACH_TYPE_OMAP3_BEAGLE; -} - -ULONG -NTAPI -LlbHwGetPClk(VOID) -{ - return 48000000; -} - -ULONG -NTAPI -LlbHwGetTmr0Base(VOID) -{ - return 0x48318000; -} - -ULONG -NTAPI -LlbHwGetUartBase(IN ULONG Port) -{ - if (Port == 1) - { - return 0x4806A000; - } - else if (Port == 2) - { - return 0x4806C000; - } - else if (Port == 3) - { - return 0x49020000; - } -} - -ULONG -NTAPI -LlbHwGetSerialUart(VOID) -{ - return 3; -} - -/* EOF */ diff --git a/reactos/boot/armllb/hw/omap3/hwinit.c b/reactos/boot/armllb/hw/omap3/hwinit.c deleted file mode 100755 index 85ee0556096..00000000000 --- a/reactos/boot/armllb/hw/omap3/hwinit.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * PROJECT: ReactOS Boot Loader - * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: boot/armllb/hw/omap3/hwinit.c - * PURPOSE: LLB Hardware Initialization Routines for OMAP3 - * PROGRAMMERS: ReactOS Portable Systems Group - */ - -#include "precomp.h" - -VOID -NTAPI -LlbHwInitialize(VOID) -{ - -} - -/* EOF */ -- 2.17.1