aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/serial_pl01x.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-04 10:14:13 -0500
committerTom Rini <trini@konsulko.com>2022-12-23 10:15:13 -0500
commit0478dac62a9add8c73981a900ceaa6da732ae2bb (patch)
tree9fac1da2ae69ad7aad9a1c9c649076bf78112c4b /drivers/serial/serial_pl01x.c
parente95bcfb56c6599ba6d00a54fc2f857b6680481c4 (diff)
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>
Diffstat (limited to 'drivers/serial/serial_pl01x.c')
-rw-r--r--drivers/serial/serial_pl01x.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 7449e9b904..f5468353e1 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);