aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-01-30 15:45:16 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-03-04 15:34:27 +0100
commitbea6bf07dfd9b97ad81fb7433464a9f61ff02105 (patch)
tree10b6a471dcf8e63e313f3a0763316417b43649c5
parent2b95da01e6bbdd8b001fa1ff2830dbaa70f14c3e (diff)
uart8250: Move under drivers/uart
Change-Id: Ic65ffaaa092330ed68d891e4a09a8b86cdc04a3a Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5236 Tested-by: build bot (Jenkins)
-rw-r--r--src/arch/x86/lib/romcc_console.c2
-rw-r--r--src/cpu/allwinner/a10/uart.c2
-rw-r--r--src/drivers/uart/Makefile.inc12
-rw-r--r--src/drivers/uart/uart8250io.c (renamed from src/lib/uart8250.c)2
-rw-r--r--src/drivers/uart/uart8250mem.c (renamed from src/lib/uart8250mem.c)2
-rw-r--r--src/drivers/uart/uart8250reg.h (renamed from src/include/uart8250.h)6
-rw-r--r--src/lib/Makefile.inc6
7 files changed, 19 insertions, 13 deletions
diff --git a/src/arch/x86/lib/romcc_console.c b/src/arch/x86/lib/romcc_console.c
index 1ed498a083..66c81db36f 100644
--- a/src/arch/x86/lib/romcc_console.c
+++ b/src/arch/x86/lib/romcc_console.c
@@ -32,7 +32,7 @@
#if CONFIG_CONSOLE_SERIAL8250
#include "drivers/uart/util.c"
-#include "lib/uart8250.c"
+#include "drivers/uart/uart8250io.c"
#endif
#if CONFIG_CONSOLE_NE2K
#include "drivers/net/ne2k.c"
diff --git a/src/cpu/allwinner/a10/uart.c b/src/cpu/allwinner/a10/uart.c
index 10ea09af32..1885ace453 100644
--- a/src/cpu/allwinner/a10/uart.c
+++ b/src/cpu/allwinner/a10/uart.c
@@ -8,7 +8,7 @@
#include "uart.h"
#include <arch/io.h>
#include <console/uart.h>
-#include <uart8250.h>
+#include <drivers/uart/uart8250reg.h>
/**
* \brief Configure line control settings for UART
diff --git a/src/drivers/uart/Makefile.inc b/src/drivers/uart/Makefile.inc
index 52a7024318..3a9ca3d592 100644
--- a/src/drivers/uart/Makefile.inc
+++ b/src/drivers/uart/Makefile.inc
@@ -5,6 +5,18 @@ bootblock-y += util.c
smm-y += util.c
endif
+ifeq ($(CONFIG_CONSOLE_SERIAL8250),y)
+romstage-y += uart8250io.c
+ramstage-y += uart8250io.c
+smm-y += uart8250io.c
+endif
+
+ifeq ($(CONFIG_CONSOLE_SERIAL8250MEM),y)
+romstage-y += uart8250mem.c
+ramstage-y += uart8250mem.c
+smm-y += uart8250mem.c
+endif
+
ifeq ($(CONFIG_CONSOLE_SERIAL_UART),y)
ifeq ($(CONFIG_DRIVERS_UART_PL011),y)
diff --git a/src/lib/uart8250.c b/src/drivers/uart/uart8250io.c
index 8e1714d190..e4e8b6cfd7 100644
--- a/src/lib/uart8250.c
+++ b/src/drivers/uart/uart8250io.c
@@ -20,8 +20,8 @@
#include <arch/io.h>
#include <console/uart.h>
-#include <uart8250.h>
#include <trace.h>
+#include "uart8250reg.h"
/* Should support 8250, 16450, 16550, 16550A type UARTs */
diff --git a/src/lib/uart8250mem.c b/src/drivers/uart/uart8250mem.c
index ce45de9c10..74929f5923 100644
--- a/src/lib/uart8250mem.c
+++ b/src/drivers/uart/uart8250mem.c
@@ -20,9 +20,9 @@
#include <arch/io.h>
#include <console/uart.h>
-#include <uart8250.h>
#include <device/device.h>
#include <delay.h>
+#include "uart8250reg.h"
/* Should support 8250, 16450, 16550, 16550A type UARTs */
diff --git a/src/include/uart8250.h b/src/drivers/uart/uart8250reg.h
index c63153c632..cdfbb1bc20 100644
--- a/src/include/uart8250.h
+++ b/src/drivers/uart/uart8250reg.h
@@ -17,8 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef UART8250_H
-#define UART8250_H
+#ifndef UART8250REG_H
+#define UART8250REG_H
/* Data */
#define UART_RBR 0x00
@@ -105,4 +105,4 @@
#define UART_SCR 0x07
#define UART_SPR 0x07
-#endif /* UART8250_H */
+#endif /* UART8250REG_H */
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index cb75dbf747..f2b0fe3297 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -46,8 +46,6 @@ romstage-y += cbfs.c
romstage-$(CONFIG_COMPRESS_RAMSTAGE) += lzma.c
#romstage-y += lzmadecode.c
romstage-$(CONFIG_CACHE_AS_RAM) += ramtest.c
-romstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
-romstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
ifeq ($(CONFIG_EARLY_CBMEM_INIT),y)
romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
@@ -88,8 +86,6 @@ ramstage-y += stack.c
ramstage-$(CONFIG_ARCH_X86) += gcc.c
ramstage-y += clog2.c
romstage-y += clog2.c
-ramstage-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
-ramstage-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c
ramstage-$(CONFIG_TRACE) += trace.c
@@ -126,8 +122,6 @@ ifneq ($(CONFIG_HAVE_ARCH_MEMMOVE),y)
smm-y += memmove.c
endif
smm-y += cbfs.c memcmp.c
-smm-$(CONFIG_CONSOLE_SERIAL8250) += uart8250.c
-smm-$(CONFIG_CONSOLE_SERIAL8250MEM) += uart8250mem.c
smm-y += gcc.c
$(obj)/lib/version.ramstage.o : $(obj)/build.h