drivers: uart_altera_jtag_hal: use DEVICE_DT_INST_DEFINE()
The conversion to devicetree seems to be half lost for this driver. There are already bindings and nodes for compatible "altr,jtag-uart", update driver to use it. Remove last mention of CONFIG_UART_CONSOLE_ON_DEV_NAME. Resolves #37207 Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
c179d83e72
commit
92a00ee39b
|
@ -122,13 +122,15 @@ minicom with flow control disabled, 115200-8N1 settings.
|
|||
JTAG UART
|
||||
---------
|
||||
|
||||
You can also have it send its console output to the JTAG UART. Set these in your
|
||||
project configuration:
|
||||
You can also have it send its console output to the JTAG UART.
|
||||
Enable ``jtag_uart`` node in :file:`altera_max10.dts` or overlay file:
|
||||
|
||||
.. code-block:: console
|
||||
.. code-block:: devicetree
|
||||
|
||||
CONFIG_UART_ALTERA_JTAG=y
|
||||
CONFIG_UART_CONSOLE_ON_DEV_NAME="jtag_uart0"
|
||||
&jtag_uart {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
To view these messages on your local workstation, run the terminal application
|
||||
in the SDK:
|
||||
|
|
|
@ -6,7 +6,6 @@ CONFIG_HAS_ALTERA_HAL=y
|
|||
CONFIG_CONSOLE=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_ALTERA_JTAG=y
|
||||
CONFIG_UART_NS16550=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_INCLUDE_RESET_VECTOR=n
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
DT_COMPAT_ALTR_JTAG_UART := altr,jtag-uart
|
||||
|
||||
config UART_ALTERA_JTAG
|
||||
bool "Nios II JTAG UART driver"
|
||||
default $(dt_compat_enabled,$(DT_COMPAT_ALTR_JTAG_UART))
|
||||
select SERIAL_HAS_DRIVER
|
||||
help
|
||||
Enable the Altera JTAG UART driver, built in to many Nios II CPU
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include "altera_avalon_jtag_uart.h"
|
||||
#include "altera_avalon_jtag_uart_regs.h"
|
||||
|
||||
#define DT_DRV_COMPAT altr_jtag_uart
|
||||
|
||||
#define UART_ALTERA_JTAG_DATA_REG 0
|
||||
#define UART_ALTERA_JTAG_CONTROL_REG 1
|
||||
|
||||
|
@ -57,8 +59,7 @@ static const struct uart_device_config uart_altera_jtag_dev_cfg_0 = {
|
|||
.sys_clk_freq = 0, /* Unused */
|
||||
};
|
||||
|
||||
DEVICE_DEFINE(uart_altera_jtag_0, "jtag_uart0",
|
||||
uart_altera_jtag_init, NULL, NULL,
|
||||
&uart_altera_jtag_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
&uart_altera_jtag_driver_api);
|
||||
DEVICE_DT_INST_DEFINE(0, uart_altera_jtag_init, NULL,
|
||||
NULL, &uart_altera_jtag_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
&uart_altera_jtag_driver_api);
|
||||
|
|
Loading…
Reference in a new issue