hrev44171 adds 1 changeset to branch 'master' old head: 693b3532c760383c08d5dd95fdae3b2e3c84dca3 new head: 1f675a7fcbc9a2a6177d22c279e6c923d763a6ee ---------------------------------------------------------------------------- 1f675a7: uart: Fix arm kernel build * Make kernel use mmu_man's new UART code * Remove no longer used uart.cpp / uart.h [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev44171 Commit: 1f675a7fcbc9a2a6177d22c279e6c923d763a6ee URL: http://cgit.haiku-os.org/haiku/commit/?id=1f675a7 Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> Date: Thu May 17 10:31:29 2012 UTC ---------------------------------------------------------------------------- 5 files changed, 13 insertions(+), 75 deletions(-) headers/private/kernel/arch/arm/uart.h | 22 --------- src/system/boot/platform/u-boot/serial.cpp | 2 +- src/system/kernel/arch/arm/Jamfile | 7 +-- src/system/kernel/arch/arm/arch_debug_console.cpp | 16 +++---- src/system/kernel/arch/arm/uart.cpp | 41 ----------------- ---------------------------------------------------------------------------- diff --git a/headers/private/kernel/arch/arm/uart.h b/headers/private/kernel/arch/arm/uart.h deleted file mode 100644 index 7d34067..0000000 --- a/headers/private/kernel/arch/arm/uart.h +++ /dev/null @@ -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@xxxxxxxxxxx - */ -#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 diff --git a/src/system/boot/platform/u-boot/serial.cpp b/src/system/boot/platform/u-boot/serial.cpp index 2a8f8f9..12c6357 100644 --- a/src/system/boot/platform/u-boot/serial.cpp +++ b/src/system/boot/platform/u-boot/serial.cpp @@ -18,7 +18,7 @@ #include <string.h> -DebugUART8250* gUART; +DebugUART* gUART; static int32 sSerialEnabled = 0; static char sBuffer[16384]; diff --git a/src/system/kernel/arch/arm/Jamfile b/src/system/kernel/arch/arm/Jamfile index 2a10ddd..13a56e4 100644 --- a/src/system/kernel/arch/arm/Jamfile +++ b/src/system/kernel/arch/arm/Jamfile @@ -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 diff --git a/src/system/kernel/arch/arm/arch_debug_console.cpp b/src/system/kernel/arch/arm/arch_debug_console.cpp index 5e6d421..bce88e1 100644 --- a/src/system/kernel/arch/arm/arch_debug_console.cpp +++ b/src/system/kernel/arch/arm/arch_debug_console.cpp @@ -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(); diff --git a/src/system/kernel/arch/arm/uart.cpp b/src/system/kernel/arch/arm/uart.cpp deleted file mode 100644 index bba93b8..0000000 --- a/src/system/kernel/arch/arm/uart.cpp +++ /dev/null @@ -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@xxxxxxxxxxx - */ - - -#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(); -}