diff mbox series

[U-Boot,1/2] ARM: omap3: ti_omap3_common: Fix CONFIG_SYS_NS16550_REG_SIZE compiler warning

Message ID 20180205010450.20665-2-woods.technical@gmail.com
State Accepted
Commit 313ed5d5050bc5603c9d78742363d077d3c53e0d
Delegated to: Tom Rini
Headers show
Series ARM: omap3: evm: Fix serial driver compiler warnings | expand

Commit Message

Derald D. Woods Feb. 5, 2018, 1:04 a.m. UTC
This commit fixes the following compiler warnings when DM_SERIAL is
enabled.

---8<-------------------------------------------------------------------
...

  CC      spl/board/ti/evm/evm.o
In file included from /solution/scm/u-boot-master/board/ti/evm/evm.c:16:0:
/solution/scm/u-boot-master/include/ns16550.h:31:0: warning: "CONFIG_SYS_NS16550_REG_SIZE" redefined
 #define CONFIG_SYS_NS16550_REG_SIZE (-1)

In file included from /solution/scm/u-boot-master/include/configs/omap3_evm.h:22:0,
                 from include/config.h:5,
                 from /solution/scm/u-boot-master/include/common.h:21,
                 from /solution/scm/u-boot-master/board/ti/evm/evm.c:14:
/solution/scm/u-boot-master/include/configs/ti_omap3_common.h:33:0: note: this is the location of the previous definition
 # define CONFIG_SYS_NS16550_REG_SIZE (-4)

  LD      spl/board/ti/evm/built-in.o

...

  CC      spl/drivers/serial/ns16550.o
In file included from /solution/scm/u-boot-master/drivers/serial/ns16550.c:11:0:
/solution/scm/u-boot-master/include/ns16550.h:31:0: warning: "CONFIG_SYS_NS16550_REG_SIZE" redefined
 #define CONFIG_SYS_NS16550_REG_SIZE (-1)

In file included from /solution/scm/u-boot-master/include/configs/omap3_evm.h:22:0,
                 from include/config.h:5,
                 from /solution/scm/u-boot-master/include/common.h:21,
                 from /solution/scm/u-boot-master/drivers/serial/ns16550.c:7:
/solution/scm/u-boot-master/include/configs/ti_omap3_common.h:33:0: note: this is the location of the previous definition
 # define CONFIG_SYS_NS16550_REG_SIZE (-4)

  LD      spl/drivers/serial/built-in.o

...
---8<-------------------------------------------------------------------

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
---
 include/configs/ti_omap3_common.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Tom Rini Feb. 5, 2018, 3:50 p.m. UTC | #1
On Sun, Feb 04, 2018 at 07:04:49PM -0600, Derald D. Woods wrote:

> This commit fixes the following compiler warnings when DM_SERIAL is
> enabled.
> 

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini Feb. 8, 2018, 12:27 p.m. UTC | #2
On Sun, Feb 04, 2018 at 07:04:49PM -0600, Derald D. Woods wrote:

> This commit fixes the following compiler warnings when DM_SERIAL is
> enabled.
> 

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 72c4b184d9..cd6a9c2197 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -28,10 +28,12 @@ 
 /* NS16550 Configuration */
 #define V_NS16550_CLK			48000000	/* 48MHz (APLL96/2) */
 #define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
-#ifdef CONFIG_SPL_BUILD
-# define CONFIG_SYS_NS16550_SERIAL
-# define CONFIG_SYS_NS16550_REG_SIZE	(-4)
-#endif
+#if defined(CONFIG_SPL_BUILD)
+#define CONFIG_SYS_NS16550_SERIAL
+#if !defined(CONFIG_DM_SERIAL)
+#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
+#endif /* !CONFIG_DM_SERIAL */
+#endif /* CONFIG_SPL_BUILD */
 #define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, \
 					115200}