serial: Update NS16550_t and struct NS16550
Typedefs should not be used in U-Boot and structs should be lower case.
Update the code to use struct ns16550 consistently.
Put a header guard on the file while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
diff --git a/arch/arm/mach-davinci/da850_lowlevel.c b/arch/arm/mach-davinci/da850_lowlevel.c
index 07bf19b..6994ded 100644
--- a/arch/arm/mach-davinci/da850_lowlevel.c
+++ b/arch/arm/mach-davinci/da850_lowlevel.c
@@ -290,8 +290,8 @@
board_gpio_init();
#if !CONFIG_IS_ENABLED(DM_SERIAL)
- NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM1),
- CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
+ NS16550_init((struct ns16550 *)(CONFIG_SYS_NS16550_COM1),
+ CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
#endif
/*
* Fix Power and Emulation Management Register
diff --git a/arch/arm/mach-davinci/spl.c b/arch/arm/mach-davinci/spl.c
index 5fea935..3c8330b 100644
--- a/arch/arm/mach-davinci/spl.c
+++ b/arch/arm/mach-davinci/spl.c
@@ -27,9 +27,9 @@
void putc(char c)
{
if (c == '\n')
- NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), '\r');
+ NS16550_putc((struct ns16550 *)(CONFIG_SYS_NS16550_COM1), '\r');
- NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), c);
+ NS16550_putc((struct ns16550 *)(CONFIG_SYS_NS16550_COM1), c);
}
#endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */
diff --git a/arch/arm/mach-keystone/init.c b/arch/arm/mach-keystone/init.c
index 88e8912..f4edaaa 100644
--- a/arch/arm/mach-keystone/init.c
+++ b/arch/arm/mach-keystone/init.c
@@ -185,7 +185,7 @@
* driver doesn't handle this.
*/
#ifndef CONFIG_DM_SERIAL
- NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM2),
+ NS16550_init((struct ns16550 *)(CONFIG_SYS_NS16550_COM2),
CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE);
#endif
diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c
index 26aef65..8e6dfdb 100644
--- a/arch/x86/cpu/apollolake/uart.c
+++ b/arch/x86/cpu/apollolake/uart.c
@@ -127,7 +127,7 @@
.id = UCLASS_SERIAL,
.of_match = apl_ns16550_serial_ids,
.plat_auto = sizeof(struct ns16550_plat),
- .priv_auto = sizeof(struct NS16550),
+ .priv_auto = sizeof(struct ns16550),
.ops = &ns16550_serial_ops,
.of_to_plat = apl_ns16550_of_to_plat,
.probe = apl_ns16550_probe,
diff --git a/arch/x86/cpu/slimbootloader/serial.c b/arch/x86/cpu/slimbootloader/serial.c
index 5d89632..ebbd2c5 100644
--- a/arch/x86/cpu/slimbootloader/serial.c
+++ b/arch/x86/cpu/slimbootloader/serial.c
@@ -59,7 +59,7 @@
.of_match = slimbootloader_serial_ids,
.of_to_plat = slimbootloader_serial_of_to_plat,
.plat_auto = sizeof(struct ns16550_plat),
- .priv_auto = sizeof(struct NS16550),
+ .priv_auto = sizeof(struct ns16550),
.probe = ns16550_serial_probe,
.ops = &ns16550_serial_ops,
};