uart: Fix arm kernel build

* Make kernel use mmu_man's new UART code
* Remove no longer used uart.cpp / uart.h
This commit is contained in:
Alexander von Gluck IV 2012-05-17 05:31:29 -05:00
parent 693b3532c7
commit 1f675a7fcb
5 changed files with 13 additions and 75 deletions

View File

@ -1,22 +0,0 @@
/*
* Copyright 2011-2012 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Alexander von Gluck, kallisti5@unixzen.com
*/
#ifndef __DEV_UART_H
#define __DEV_UART_H
#include <sys/types.h>
#include "uart_8250.h"
#include "uart_pl011.h"
addr_t uart_base_port(int port);
addr_t uart_base_debug();
#endif

View File

@ -18,7 +18,7 @@
#include <string.h>
DebugUART8250* gUART;
DebugUART* gUART;
static int32 sSerialEnabled = 0;
static char sBuffer[16384];

View File

@ -7,6 +7,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 32bit ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
KernelMergeObject kernel_arch_arm.o :
# arch_atomic.c
@ -28,9 +29,9 @@ KernelMergeObject kernel_arch_arm.o :
arch_vm.cpp
arch_vm_translation_map.cpp
arch_asm.S
uart.cpp
uart_8250.cpp
uart_pl011.cpp
debug_uart_8250.cpp
arch_uart_8250.cpp
arch_uart_pl011.cpp
# paging
arm_physical_page_mapper.cpp

View File

@ -12,18 +12,17 @@
//#include <arch_platform.h>
#include <arch/debug_console.h>
#include <arch/generic/debug_uart_8250.h>
#include <arch/arm/arch_uart_pl011.h>
#include <boot/kernel_args.h>
#include <kernel.h>
#include <vm/vm.h>
#include <arch/arm/uart.h>
#include <string.h>
#include "board_config.h"
#if defined(BOARD_UART_AMBA_PL011)
UartPL011* gArchDebugUART;
#else
Uart8250* gArchDebugUART;
#endif
DebugUART *gArchDebugUART;
void
@ -97,9 +96,10 @@ status_t
arch_debug_console_init(kernel_args *args)
{
#if defined(BOARD_UART_AMBA_PL011)
gArchDebugUART = new UartPL011(uart_base_debug());
gArchDebugUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
#else
gArchDebugUART = new Uart8250(uart_base_debug());
// More Generic 8250
gArchDebugUART = arch_get_uart_8250(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
#endif
gArchDebugUART->InitEarly();

View File

@ -1,41 +0,0 @@
/*
* Copyright 2011-2012 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Alexander von Gluck, kallisti5@unixzen.com
*/
#include <arch/arm/reg.h>
#include <arch/arm/uart.h>
#include <board_config.h>
#include <debug.h>
#include <stdlib.h>
//#include <target/debugconfig.h>
#define DEBUG_UART BOARD_UART_DEBUG
addr_t
uart_base_debug()
{
return DEBUG_UART;
}
addr_t
uart_base_port(int port)
{
switch (port) {
case 1:
return BOARD_UART1_BASE;
case 2:
return BOARD_UART2_BASE;
case 3:
return BOARD_UART3_BASE;
}
return uart_base_debug();
}