summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2015-10-23 12:35:42 +0200
committerStefano Babic <sbabic@denx.de>2015-10-23 12:35:42 +0200
commita69fdc7787bfa2f27eed74c2ee58c28ce932d502 (patch)
tree4731dbe1c7371c0c797641d9e755a93e614ec930 /drivers/serial
parent42e550d44bc2335a18065b155cc408f30f0502ef (diff)
parent9f13b6d147dc74f2400ce18d9d4005ba53f21fd3 (diff)
downloadu-boot-imx-a69fdc7787bfa2f27eed74c2ee58c28ce932d502.zip
u-boot-imx-a69fdc7787bfa2f27eed74c2ee58c28ce932d502.tar.gz
u-boot-imx-a69fdc7787bfa2f27eed74c2ee58c28ce932d502.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/Kconfig21
-rw-r--r--drivers/serial/ns16550.c2
-rw-r--r--drivers/serial/serial_efi.c2
-rw-r--r--drivers/serial/serial_omap.c8
-rw-r--r--drivers/serial/serial_s5p.c2
5 files changed, 31 insertions, 4 deletions
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index ddb725d..ac5920a 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -109,6 +109,27 @@ config DEBUG_UART_SHIFT
value. Use this value to specify the shift to use, where 0=byte
registers, 2=32-bit word registers, etc.
+config DEBUG_UART_BOARD_INIT
+ bool "Enable board-specific debug UART init"
+ depends on DEBUG_UART
+ help
+ Some boards need to set things up before the debug UART can be used.
+ On these boards a call to debug_uart_init() is insufficient. When
+ this option is enabled, the function board_debug_uart_init() will
+ be called when debug_uart_init() is called. You can put any code
+ here that is needed to set up the UART ready for use, such as set
+ pin multiplexing or enable clocks.
+
+config DEBUG_UART_ANNOUNCE
+ bool "Show a message when the debug UART starts up"
+ depends on DEBUG_UART
+ help
+ Enable this option to show a message when the debug UART is ready
+ for use. You will see a message like "<debug_uart> " as soon as
+ U-Boot has the UART ready for use (i.e. your code calls
+ debug_uart_init()). This can be useful just as a check that
+ everything is working.
+
config ROCKCHIP_SERIAL
bool "Rockchip on-chip UART support"
depends on ARCH_ROCKCHIP && DM_SERIAL
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 6275a11..6433844 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -257,7 +257,7 @@ int NS16550_tstc(NS16550_t com_port)
(1 << CONFIG_DEBUG_UART_SHIFT), \
CONFIG_DEBUG_UART_SHIFT)
-void debug_uart_init(void)
+static inline void _debug_uart_init(void)
{
struct NS16550 *com_port = (struct NS16550 *)CONFIG_DEBUG_UART_BASE;
int baud_divisor;
diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c
index cf57d89..ea25c25 100644
--- a/drivers/serial/serial_efi.c
+++ b/drivers/serial/serial_efi.c
@@ -107,7 +107,7 @@ static int serial_efi_pending(struct udevice *dev, bool input)
* There is nothing to init here since the EFI console is already running by
* the time we enter U-Boot.
*/
-void debug_uart_init(void)
+static inline void _debug_uart_init(void)
{
}
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index e8d544f..891cd7b 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -12,10 +12,16 @@
DECLARE_GLOBAL_DATA_PTR;
+#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz */
+
#if CONFIG_IS_ENABLED(OF_CONTROL)
static const struct udevice_id omap_serial_ids[] = {
+ { .compatible = "ti,omap2-uart" },
{ .compatible = "ti,omap3-uart" },
{ .compatible = "ti,omap4-uart" },
+ { .compatible = "ti,am3352-uart" },
+ { .compatible = "ti,am4372-uart" },
+ { .compatible = "ti,dra742-uart" },
{ }
};
@@ -28,7 +34,7 @@ static int omap_serial_ofdata_to_platdata(struct udevice *dev)
if (ret)
return ret;
plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
- "clock-frequency", -1);
+ "clock-frequency", DEFAULT_CLK_SPEED);
plat->reg_shift = 2;
return 0;
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 3f0b588..feba467 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -207,7 +207,7 @@ U_BOOT_DRIVER(serial_s5p) = {
#include <debug_uart.h>
-void debug_uart_init(void)
+static inline void _debug_uart_init(void)
{
struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;