kbuild: Remove uncmd_spl logic

At this point in the conversion there should be no need to have logic to
disable some symbol during the SPL build as all symbols should have an
SPL counterpart.

The main real changes done here are that we now must make proper use of
CONFIG_IS_ENABLED(DM_SERIAL) rather than many of the odd tricks we
developed prior to CONFIG_IS_ENABLED() being available.

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2022-12-04 10:14:13 -05:00
parent e95bcfb56c
commit 0478dac62a
19 changed files with 25 additions and 85 deletions

View File

@@ -1,21 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2012
* Ilya Yanok, ilya.yanok@gmail.com
*/
#ifndef __CONFIG_UNCMD_SPL_H__
#define __CONFIG_UNCMD_SPL_H__
#ifdef CONFIG_SPL_BUILD
/* SPL needs only BOOTP + TFTP so undefine other stuff to save space */
#ifndef CONFIG_SPL_DM
#undef CONFIG_DM_SERIAL
#undef CONFIG_DM_I2C
#endif
#undef CONFIG_DM_STDIO
#endif /* CONFIG_SPL_BUILD */
#endif /* __CONFIG_UNCMD_SPL_H__ */

View File

@@ -314,7 +314,7 @@
* shorted - index 1
* Retain non-DM serial port for debug purposes.
*/
#if !defined(CONFIG_DM_SERIAL)
#if !CONFIG_IS_ENABLED(DM_SERIAL)
#define CFG_SYS_NS16550_CLK (get_bus_freq(0) / 2)
#define CFG_SYS_NS16550_COM1 (CFG_SYS_CCSRBAR + 0x11C500)
#endif

View File

@@ -33,7 +33,7 @@
* NS16550 Configuration
*/
#define CFG_SYS_NS16550_CLK CFG_SYS_TCLK
#if !defined(CONFIG_DM_SERIAL)
#if !CONFIG_IS_ENABLED(DM_SERIAL)
#define CFG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE
#endif

View File

@@ -23,7 +23,7 @@
#else
#define CFG_SYS_NS16550_CLK 24000000
#endif
#ifndef CONFIG_DM_SERIAL
#if !CONFIG_IS_ENABLED(DM_SERIAL)
# define CFG_SYS_NS16550_COM1 SUNXI_UART0_BASE
# define CFG_SYS_NS16550_COM2 SUNXI_UART1_BASE
# define CFG_SYS_NS16550_COM3 SUNXI_UART2_BASE

View File

@@ -28,7 +28,7 @@
* Hardware drivers
*/
#define CFG_SYS_NS16550_CLK 48000000
#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
#if !CONFIG_IS_ENABLED(DM_SERIAL)
#define CFG_SYS_NS16550_COM3 UART3_BASE
#endif

View File

@@ -14,7 +14,7 @@
* NS16550 Configuration
*/
#define CFG_SYS_NS16550_CLK CFG_SYS_TCLK
#if !defined(CONFIG_DM_SERIAL)
#if !CONFIG_IS_ENABLED(DM_SERIAL)
#define CFG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE
#endif

View File

@@ -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
};