altera_max10: enable and use 16550 UART

The 16550 will now be the default console device.

Change-Id: I92a6b49984b055e7d5f5c97e5192150be0d5c5c7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-07-14 13:41:34 -07:00 committed by Inaky Perez-Gonzalez
parent 75617a6380
commit afaba4a98b
5 changed files with 57 additions and 5 deletions

View file

@ -8,4 +8,27 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
int
default 50000000
endif
if UART_NS16550
config UART_NS16550_PCI
def_bool n
config UART_NS16550_PORT_0
def_bool y
if UART_NS16550_PORT_0
config UART_NS16550_PORT_0_NAME
default "UART_0"
config UART_NS16550_PORT_0_IRQ_PRI
default 3
config UART_NS16550_PORT_0_BAUD_RATE
default 115200
config UART_NS16550_PORT_0_OPTIONS
default 0
endif # UART_NS16550_PORT_0
endif # UART_NS16550
endif # SOC_NIOS2F_ZEPHYR

View file

@ -0,0 +1,27 @@
/*
* Copyright (c) 2016 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __SOC_H_
#define __SOC_H_
#include <system.h>
#define UART_NS16550_PORT_0_BASE_ADDR A_16550_UART_0_BASE
#define UART_NS16550_PORT_0_IRQ A_16550_UART_0_IRQ
#define UART_NS16550_PORT_0_CLK_FREQ A_16550_UART_0_FREQ
#endif

View file

@ -4,9 +4,8 @@ CONFIG_BOARD_ALTERA_MAX10=y
CONFIG_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_SERIAL=y
CONFIG_UART_ALTERA_JTAG=y
CONFIG_UART_NS16550=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_CONSOLE_ON_DEV_NAME="jtag_uart0"
# FIXME ZEP-273
CONFIG_XIP=n

View file

@ -17,4 +17,6 @@
#ifndef __INC_BOARD_H
#define __INC_BOARD_H
#include <soc.h>
#endif /* __INC_BOARD_H */

View file

@ -148,8 +148,9 @@ tags = bluetooth
build_only = true
kernel = micro
extra_args = CONF_FILE=prj_17.conf
# exclude STM32F103RB SoC, not enough RAM to run this test
filter = not CONFIG_SOC_STM32F103RB and not CONFIG_UART_ALTERA_JTAG
# exclude STM32F103RB SoC and the Nios IIf, not enough RAM to run this test
filter : not CONFIG_SOC_STM32F103RB and not CONFIG_UART_ALTERA_JTAG and
not CONFIG_SOC_NIOS2F_ZEPHYR
[test_18]
tags = bluetooth