Skip to contentSkip to conversation

imx: serial_mxc: use CONFIG_IS_ENABLED instead of ifdef

PATCH New Adam Ford 2 participants 2 messages Feb 20, 2019 – Feb 21, 2019

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 imx: serial_mxc: use CONFIG_IS_ENABLED instead of ifdef

Kconfig allows boards to configured with DM_SERIAL and still have SPL_DM_SERIAL disabled. This patch changes the ifdef's to CONFIG_IS_ENABLED to allow the modes to differ between SPL and U-Boot.

drivers/serial/serial_mxc.c +2 -2
index df35ac9114..476df25805 100644
@@ -178,7 +178,7 @@ static void _mxc_serial_setbrg(struct mxc_uart *base, unsigned long clk,
 	writel(UCR1_UARTEN, &base->cr1);
 }
 
-#ifndef CONFIG_DM_SERIAL
+#if !CONFIG_IS_ENABLED(DM_SERIAL)
 
 #ifndef CONFIG_MXC_UART_BASE
 #error "define CONFIG_MXC_UART_BASE to use the MXC UART driver"
@@ -260,7 +260,7 @@ __weak struct serial_device *default_serial_console(void)
 }
 #endif
 
-#ifdef CONFIG_DM_SERIAL
+#if CONFIG_IS_ENABLED(DM_SERIAL)
 
 int mxc_serial_setbrg(struct udevice *dev, int baudrate)
 {
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 imx: serial_mxc: use CONFIG_IS_ENABLED instead of ifdef

Quoted 7 lines · Adam Ford

Kconfig allows boards to configured with DM_SERIAL and still have SPL_DM_SERIAL disabled. This patch changes the ifdef's to CONFIG_IS_ENABLED to allow the modes to differ between SPL and U-Boot.