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:
@@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2011-2012 Haiku, Inc. All rights reserved.
|
|
||||||
* Distributed under the terms of the MIT License.
|
|
||||||
*
|
|
||||||
* Authors:
|
|
||||||
* Alexander von Gluck, [email protected]
|
|
||||||
*/
|
|
||||||
#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
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
DebugUART8250* gUART;
|
DebugUART* gUART;
|
||||||
|
|
||||||
static int32 sSerialEnabled = 0;
|
static int32 sSerialEnabled = 0;
|
||||||
static char sBuffer[16384];
|
static char sBuffer[16384];
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ UsePrivateHeaders [ FDirName kernel arch $(TARGET_ARCH) board $(TARGET_BOOT_BOAR
|
|||||||
|
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging ] ;
|
||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 32bit ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) paging 32bit ] ;
|
||||||
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||||
|
|
||||||
KernelMergeObject kernel_arch_arm.o :
|
KernelMergeObject kernel_arch_arm.o :
|
||||||
# arch_atomic.c
|
# arch_atomic.c
|
||||||
@@ -28,9 +29,9 @@ KernelMergeObject kernel_arch_arm.o :
|
|||||||
arch_vm.cpp
|
arch_vm.cpp
|
||||||
arch_vm_translation_map.cpp
|
arch_vm_translation_map.cpp
|
||||||
arch_asm.S
|
arch_asm.S
|
||||||
uart.cpp
|
debug_uart_8250.cpp
|
||||||
uart_8250.cpp
|
arch_uart_8250.cpp
|
||||||
uart_pl011.cpp
|
arch_uart_pl011.cpp
|
||||||
|
|
||||||
# paging
|
# paging
|
||||||
arm_physical_page_mapper.cpp
|
arm_physical_page_mapper.cpp
|
||||||
|
|||||||
@@ -12,18 +12,17 @@
|
|||||||
|
|
||||||
//#include <arch_platform.h>
|
//#include <arch_platform.h>
|
||||||
#include <arch/debug_console.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 <boot/kernel_args.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <vm/vm.h>
|
#include <vm/vm.h>
|
||||||
#include <arch/arm/uart.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "board_config.h"
|
||||||
|
|
||||||
#if defined(BOARD_UART_AMBA_PL011)
|
|
||||||
UartPL011* gArchDebugUART;
|
DebugUART *gArchDebugUART;
|
||||||
#else
|
|
||||||
Uart8250* gArchDebugUART;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -97,9 +96,10 @@ status_t
|
|||||||
arch_debug_console_init(kernel_args *args)
|
arch_debug_console_init(kernel_args *args)
|
||||||
{
|
{
|
||||||
#if defined(BOARD_UART_AMBA_PL011)
|
#if defined(BOARD_UART_AMBA_PL011)
|
||||||
gArchDebugUART = new UartPL011(uart_base_debug());
|
gArchDebugUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||||
#else
|
#else
|
||||||
gArchDebugUART = new Uart8250(uart_base_debug());
|
// More Generic 8250
|
||||||
|
gArchDebugUART = arch_get_uart_8250(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gArchDebugUART->InitEarly();
|
gArchDebugUART->InitEarly();
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2011-2012 Haiku, Inc. All rights reserved.
|
|
||||||
* Distributed under the terms of the MIT License.
|
|
||||||
*
|
|
||||||
* Authors:
|
|
||||||
* Alexander von Gluck, [email protected]
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#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();
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user