rpi1/rpi2: Use PL011 UART fallback in loader.
* Adjust UART base locations to reflect ARM pref base. * We have a working haiku_loader_u-boot on Raspberry Pi 2!:q
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include <arch/arm/bcm283X.h>
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_AMBA_PL011 1
|
||||
#define BOARD_UART_PL011 1
|
||||
|
||||
#define BOARD_UART1_BASE UART0_BASE
|
||||
// PL011 UART
|
||||
@@ -26,7 +26,7 @@
|
||||
#define BOARD_UART3_BASE 0
|
||||
// N/A
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART1_BASE
|
||||
#define BOARD_UART_DEBUG DEVICE_BASE + BOARD_UART1_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 3000000
|
||||
/* 3Mhz */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <arch/arm/bcm283X.h>
|
||||
|
||||
// UART Settings
|
||||
#define BOARD_UART_AMBA_PL011 1
|
||||
#define BOARD_UART_PL011 1
|
||||
|
||||
#define BOARD_UART1_BASE UART0_BASE
|
||||
// PL011 UART
|
||||
@@ -26,7 +26,7 @@
|
||||
#define BOARD_UART3_BASE 0
|
||||
// N/A
|
||||
|
||||
#define BOARD_UART_DEBUG BOARD_UART1_BASE
|
||||
#define BOARD_UART_DEBUG DEVICE_BASE + BOARD_UART1_BASE
|
||||
|
||||
#define BOARD_UART_CLOCK 3000000
|
||||
/* 3Mhz */
|
||||
|
||||
@@ -88,8 +88,7 @@ serial_cleanup(void)
|
||||
extern "C" void
|
||||
serial_init(void)
|
||||
{
|
||||
gUART = arch_get_uart_pl011(gPeripheralBase + BOARD_UART_DEBUG,
|
||||
BOARD_UART_CLOCK);
|
||||
gUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
gUART->InitEarly();
|
||||
gUART->InitPort(9600);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "serial.h"
|
||||
|
||||
#include <debug_uart_8250.h>
|
||||
#include <arch_uart_pl011.h>
|
||||
#include <board_config.h>
|
||||
#include <boot/platform.h>
|
||||
#include <arch/cpu.h>
|
||||
@@ -83,10 +84,8 @@ extern "C" void
|
||||
serial_enable(void)
|
||||
{
|
||||
/* should already be initialized by U-Boot */
|
||||
/*
|
||||
gUART->InitEarly();
|
||||
gUART->InitPort(9600);
|
||||
*/
|
||||
gUART->InitPort(115200);
|
||||
sSerialEnabled++;
|
||||
}
|
||||
|
||||
@@ -113,8 +112,13 @@ serial_init(const void *fdt)
|
||||
|
||||
#ifdef BOARD_UART_DEBUG
|
||||
// fallback to hardcoded board UART
|
||||
if (gUART == NULL)
|
||||
if (gUART == NULL) {
|
||||
#if defined(BOARD_UART_PL011)
|
||||
gUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
#else
|
||||
gUART = arch_get_uart_8250(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gUART == NULL)
|
||||
|
||||
@@ -95,7 +95,7 @@ arch_debug_serial_early_boot_message(const char *string)
|
||||
status_t
|
||||
arch_debug_console_init(kernel_args *args)
|
||||
{
|
||||
#if defined(BOARD_UART_AMBA_PL011)
|
||||
#if defined(BOARD_UART_PL011)
|
||||
gArchDebugUART = arch_get_uart_pl011(BOARD_UART_DEBUG, BOARD_UART_CLOCK);
|
||||
#else
|
||||
// More Generic 8250
|
||||
|
||||
Reference in New Issue
Block a user