|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
-#if defined(CONFIG_DM_SERIAL) && !defined(CONFIG_SYS_NS16550_REG_SIZE)
|
|
|
+#if CONFIG_IS_ENABLED(DM_SERIAL) && !defined(CONFIG_SYS_NS16550_REG_SIZE)
|
|
|
/*
|
|
|
* For driver model we always use one byte per register, and sort out the
|
|
|
* differences in the driver
|
|
@@ -37,10 +37,10 @@
|
|
|
#ifdef CONFIG_NS16550_DYNAMIC
|
|
|
#define UART_REG(x) unsigned char x
|
|
|
#else
|
|
|
-#if !defined(CONFIG_SYS_NS16550_REG_SIZE) || (CONFIG_SYS_NS16550_REG_SIZE == 0)
|
|
|
-#error "Please define NS16550 registers size."
|
|
|
-#elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_DM_SERIAL)
|
|
|
+#if defined(CONFIG_SYS_NS16550_MEM32) && !CONFIG_IS_ENABLED(DM_SERIAL)
|
|
|
#define UART_REG(x) u32 x
|
|
|
+#elif !defined(CONFIG_SYS_NS16550_REG_SIZE) || (CONFIG_SYS_NS16550_REG_SIZE == 0)
|
|
|
+#error "Please define NS16550 registers size."
|
|
|
#elif (CONFIG_SYS_NS16550_REG_SIZE > 0)
|
|
|
#define UART_REG(x) \
|
|
|
unsigned char prepad_##x[CONFIG_SYS_NS16550_REG_SIZE - 1]; \
|
|
@@ -113,7 +113,7 @@ struct ns16550 {
|
|
|
UART_REG(scr); /* 10*/
|
|
|
UART_REG(ssr); /* 11*/
|
|
|
#endif
|
|
|
-#ifdef CONFIG_DM_SERIAL
|
|
|
+#if CONFIG_IS_ENABLED(DM_SERIAL)
|
|
|
struct ns16550_plat *plat;
|
|
|
#endif
|
|
|
};
|