kernel/arm: Work out more board_config's via fdt
This commit is contained in:
@@ -234,6 +234,7 @@ rule KernelArchitectureSetup architecture
|
|||||||
|
|
||||||
case arm :
|
case arm :
|
||||||
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
HAIKU_BOOT_PLATFORM ?= u-boot ;
|
||||||
|
HAIKU_BOARD_LOADER_BASE ?= 0x1000000 ;
|
||||||
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ;
|
||||||
# offset in floppy image (>= sizeof(haiku_loader))
|
# offset in floppy image (>= sizeof(haiku_loader))
|
||||||
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet
|
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet
|
||||||
@@ -325,15 +326,11 @@ rule KernelArchitectureSetup architecture
|
|||||||
HAIKU_KERNEL_PIC_LINKFLAGS = ;
|
HAIKU_KERNEL_PIC_LINKFLAGS = ;
|
||||||
HAIKU_KERNEL_ADDON_LINKFLAGS = ;
|
HAIKU_KERNEL_ADDON_LINKFLAGS = ;
|
||||||
|
|
||||||
# Include embedded board-specific file.
|
# Any special kernel base addresses
|
||||||
if $(HAIKU_BOOT_BOARD) {
|
|
||||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) board $(HAIKU_BOOT_BOARD)
|
|
||||||
BoardSetup ] ;
|
|
||||||
if $(HAIKU_BOARD_LOADER_BASE) {
|
if $(HAIKU_BOARD_LOADER_BASE) {
|
||||||
HAIKU_BOOT_LDFLAGS +=
|
HAIKU_BOOT_LDFLAGS +=
|
||||||
--defsym BOARD_LOADER_BASE=$(HAIKU_BOARD_LOADER_BASE) ;
|
--defsym BOARD_LOADER_BASE=$(HAIKU_BOARD_LOADER_BASE) ;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
switch $(cpu) {
|
switch $(cpu) {
|
||||||
case arm :
|
case arm :
|
||||||
|
|||||||
@@ -12,17 +12,16 @@
|
|||||||
|
|
||||||
//#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/generic/debug_uart.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 <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "board_config.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: Declare this in some header
|
||||||
DebugUART *gArchDebugUART;
|
DebugUART *gArchDebugUART;
|
||||||
|
extern DebugUART *debug_uart_from_fdt(const void *fdt);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -95,12 +94,13 @@ arch_debug_serial_early_boot_message(const char *string)
|
|||||||
status_t
|
status_t
|
||||||
arch_debug_console_init(kernel_args *args)
|
arch_debug_console_init(kernel_args *args)
|
||||||
{
|
{
|
||||||
#if defined(BOARD_UART_PL011)
|
// first try with hints from the FDT
|
||||||
gArchDebugUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
gArchDebugUART = debug_uart_from_fdt(args->platform_args.fdt);
|
||||||
#else
|
|
||||||
// More Generic 8250
|
// Do we can some kind of direct fallback here
|
||||||
gArchDebugUART = arch_get_uart_8250(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
// (aka, guess arch_get_uart_pl011 or arch_get_uart_8250?)
|
||||||
#endif
|
if (gArchDebugUART == NULL)
|
||||||
|
return B_ERROR;
|
||||||
|
|
||||||
gArchDebugUART->InitEarly();
|
gArchDebugUART->InitEarly();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user