aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/freescale/common/i2c_common.c2
-rw-r--r--board/freescale/common/i2c_common.h2
-rw-r--r--drivers/misc/gsc.c2
-rw-r--r--drivers/serial/Makefile17
-rw-r--r--drivers/serial/atmel_usart.c8
-rw-r--r--drivers/serial/serial-uclass.c6
-rw-r--r--drivers/serial/serial_mtk.c3
-rw-r--r--drivers/serial/serial_pl01x.c11
-rw-r--r--drivers/serial/serial_pl01x_internal.h2
-rw-r--r--include/config_uncmd_spl.h21
-rw-r--r--include/configs/kmcent2.h2
-rw-r--r--include/configs/mv-common.h2
-rw-r--r--include/configs/sunxi-common.h2
-rw-r--r--include/configs/ti_omap4_common.h2
-rw-r--r--include/configs/x530.h2
-rw-r--r--include/ns16550.h10
-rw-r--r--scripts/Makefile.autoconf1
-rw-r--r--scripts/Makefile.build1
-rw-r--r--scripts/Makefile.uncmd_spl14
19 files changed, 25 insertions, 85 deletions
diff --git a/board/freescale/common/i2c_common.c b/board/freescale/common/i2c_common.c
index 0f09ed7..119ed3c 100644
--- a/board/freescale/common/i2c_common.c
+++ b/board/freescale/common/i2c_common.c
@@ -9,7 +9,7 @@
#include <i2c.h>
#include "i2c_common.h"
-#ifdef CONFIG_DM_I2C
+#if CONFIG_IS_ENABLED(DM_I2C)
/* If DM is in use, retrieve the chip for the specified bus number */
int fsl_i2c_get_device(int address, int bus, DEVICE_HANDLE_T *dev)
diff --git a/board/freescale/common/i2c_common.h b/board/freescale/common/i2c_common.h
index 840ad66..77a7b6a 100644
--- a/board/freescale/common/i2c_common.h
+++ b/board/freescale/common/i2c_common.h
@@ -9,7 +9,7 @@
#define __NXP_I2C_COMMON_H__
/* Common functionality shared by the I2C drivers for VID and the mux. */
-#ifdef CONFIG_DM_I2C
+#if CONFIG_IS_ENABLED(DM_I2C)
#define DEVICE_HANDLE_T struct udevice *
#define I2C_READ(dev, register, data, length) \
diff --git a/drivers/misc/gsc.c b/drivers/misc/gsc.c
index ec24ca8..65c9c2c 100644
--- a/drivers/misc/gsc.c
+++ b/drivers/misc/gsc.c
@@ -77,7 +77,7 @@ enum {
GSC_SC_RST_CAUSE_MAX = 10,
};
-#if (IS_ENABLED(CONFIG_DM_I2C))
+#if CONFIG_IS_ENABLED(DM_I2C)
struct gsc_priv {
int gscver;
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 33fa568..37d3f82 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -3,30 +3,15 @@
# (C) Copyright 2006-2009
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-ifdef CONFIG_SPL_BUILD
-
-ifeq ($(CONFIG_$(SPL_TPL_)BUILD)$(CONFIG_$(SPL_TPL_)DM_SERIAL),yy)
-obj-y += serial-uclass.o
-else
-obj-y += serial.o
-endif
-
-else
-
-ifdef CONFIG_DM_SERIAL
+ifeq ($(CONFIG_$(SPL_TPL_)DM_SERIAL),y)
obj-y += serial-uclass.o
else
obj-y += serial.o
endif
-endif
-
-ifdef CONFIG_DM_SERIAL
obj-$(CONFIG_PL01X_SERIAL) += serial_pl01x.o
-else
obj-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
obj-$(CONFIG_$(SPL_)SYS_NS16550_SERIAL) += serial_ns16550.o
-endif
obj-$(CONFIG_ALTERA_UART) += altera_uart.o
obj-$(CONFIG_ALTERA_JTAG_UART) += altera_jtag_uart.o
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 9d97bc8..9853f49 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -18,7 +18,7 @@
#include <linux/delay.h>
#include <asm/io.h>
-#ifdef CONFIG_DM_SERIAL
+#if CONFIG_IS_ENABLED(DM_SERIAL)
#include <asm/arch/atmel_serial.h>
#endif
#include <asm/arch/clk.h>
@@ -28,7 +28,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#ifndef CONFIG_DM_SERIAL
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
static void atmel_serial_setbrg_internal(atmel_usart3_t *usart, int id,
int baudrate)
{
@@ -133,9 +133,7 @@ __weak struct serial_device *default_serial_console(void)
{
return &atmel_serial_drv;
}
-#endif
-
-#ifdef CONFIG_DM_SERIAL
+#else
enum serial_clk_type {
CLK_TYPE_NORMAL = 0,
CLK_TYPE_DBGU,
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index c021067..7240d76 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -407,7 +407,7 @@ void serial_stdio_init(void)
{
}
-#if defined(CONFIG_DM_STDIO)
+#if CONFIG_IS_ENABLED(DM_STDIO)
#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
@@ -505,7 +505,7 @@ U_BOOT_ENV_CALLBACK(baudrate, on_baudrate);
static int serial_post_probe(struct udevice *dev)
{
struct dm_serial_ops *ops = serial_get_ops(dev);
-#ifdef CONFIG_DM_STDIO
+#if CONFIG_IS_ENABLED(DM_STDIO)
struct serial_dev_priv *upriv = dev_get_uclass_priv(dev);
struct stdio_dev sdev;
#endif
@@ -540,7 +540,7 @@ static int serial_post_probe(struct udevice *dev)
return ret;
}
-#ifdef CONFIG_DM_STDIO
+#if CONFIG_IS_ENABLED(DM_STDIO)
if (!(gd->flags & GD_FLG_RELOC))
return 0;
memset(&sdev, '\0', sizeof(sdev));
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index 6fb4cb6..ded7346 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -173,8 +173,7 @@ static int _mtk_serial_pending(struct mtk_serial_priv *priv, bool input)
return (readl(&priv->regs->lsr) & UART_LSR_THRE) ? 0 : 1;
}
-#if defined(CONFIG_DM_SERIAL) && \
- (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_DM))
+#if CONFIG_IS_ENABLED(DM_SERIAL)
static int mtk_serial_setbrg(struct udevice *dev, int baudrate)
{
struct mtk_serial_priv *priv = dev_get_priv(dev);
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 7449e9b..f546835 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -27,8 +27,7 @@
DECLARE_GLOBAL_DATA_PTR;
-#ifndef CONFIG_DM_SERIAL
-
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
static volatile unsigned char *const port[] = CFG_PL01x_PORTS;
static enum pl01x_type pl01x_type __section(".data");
static struct pl01x_regs *base_regs __section(".data");
@@ -186,7 +185,7 @@ static int pl01x_generic_setbrg(struct pl01x_regs *regs, enum pl01x_type type,
return 0;
}
-#ifndef CONFIG_DM_SERIAL
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
static void pl01x_serial_init_baud(int baudrate)
{
int clock = 0;
@@ -273,11 +272,7 @@ __weak struct serial_device *default_serial_console(void)
{
return &pl01x_serial_drv;
}
-
-#endif /* nCONFIG_DM_SERIAL */
-
-#ifdef CONFIG_DM_SERIAL
-
+#else
int pl01x_serial_setbrg(struct udevice *dev, int baudrate)
{
struct pl01x_serial_plat *plat = dev_get_plat(dev);
diff --git a/drivers/serial/serial_pl01x_internal.h b/drivers/serial/serial_pl01x_internal.h
index dfd95a0..71c52bb 100644
--- a/drivers/serial/serial_pl01x_internal.h
+++ b/drivers/serial/serial_pl01x_internal.h
@@ -38,7 +38,7 @@ struct pl01x_regs {
u32 pl011_cr; /* 0x30 Control register */
};
-#ifdef CONFIG_DM_SERIAL
+#if CONFIG_IS_ENABLED(DM_SERIAL)
int pl01x_serial_of_to_plat(struct udevice *dev);
int pl01x_serial_probe(struct udevice *dev);
diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h
deleted file mode 100644
index a59b9bb..0000000
--- a/include/config_uncmd_spl.h
+++ /dev/null
@@ -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__ */
diff --git a/include/configs/kmcent2.h b/include/configs/kmcent2.h
index 60fea59..e7ae18e 100644
--- a/include/configs/kmcent2.h
+++ b/include/configs/kmcent2.h
@@ -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
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index fa275d6..3dfcb13 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -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
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index eae107f..8032abe 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -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
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index 49f4263..9e312ac 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -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
diff --git a/include/configs/x530.h b/include/configs/x530.h
index fddf00d..e1678e7 100644
--- a/include/configs/x530.h
+++ b/include/configs/x530.h
@@ -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
diff --git a/include/ns16550.h b/include/ns16550.h
index 0ee5c4d..f45fc8c 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -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
};
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index f5f5e4a..0ade916 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -113,7 +113,6 @@ vpl/include/autoconf.mk: vpl/u-boot.cfg
define filechk_config_h
(echo "/* Automatically generated - do not edit */"; \
echo \#define CFG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\
- echo \#include \<config_uncmd_spl.h\>; \
echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \
echo \#include \<asm/config.h\>; \
echo \#include \<linux/kconfig.h\>; \
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 3b8c9d8..97dd4a6 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -48,7 +48,6 @@ subdir-ccflags-y :=
# Modified for U-Boot
-include include/config/auto.conf
-include $(prefix)/include/autoconf.mk
-include scripts/Makefile.uncmd_spl
include scripts/Kbuild.include
diff --git a/scripts/Makefile.uncmd_spl b/scripts/Makefile.uncmd_spl
deleted file mode 100644
index 6ea097d..0000000
--- a/scripts/Makefile.uncmd_spl
+++ /dev/null
@@ -1,14 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-# Makefile version of include/config_uncmd_spl.h
-# TODO: Invent a better way
-
-ifdef CONFIG_SPL_BUILD
-
-ifndef CONFIG_SPL_DM
-CONFIG_DM_SERIAL=
-CONFIG_DM_I2C=
-CONFIG_DM_SPI=
-CONFIG_DM_SPI_FLASH=
-endif
-
-endif