diff mbox series

[5/5] serial: Rework CONFIG_SYS_BAUDRATE_TABLE

Message ID 20210913212455.29165-5-trini@konsulko.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series [1/5] kgdb: Remove unused serial related options | expand

Commit Message

Tom Rini Sept. 13, 2021, 9:24 p.m. UTC
In order to move CONFIG_SYS_BAUDRATE_TABLE to Kconfig, we need to rework
the logic a bit.  Rename the users of CONFIG_SYS_BAUDRATE_TABLE to
SYS_BAUDRATE_TABLE.  Introduce a series of CONFIG_BAUDRATE_TABLE_...
that include some number of baud rates.  These match all existing users.
The help for each entry specifies what the exact table is, for a given
option.  Define what SYS_BAUDRATE_TABLE will be in include/serial.h now.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 README                                        |  3 -
 arch/arm/include/asm/arch-lpc32xx/config.h    |  3 -
 configs/MPC8349EMDS_PCI64_defconfig           |  1 +
 configs/MPC8349EMDS_SDRAM_defconfig           |  1 +
 configs/MPC8349EMDS_SLAVE_defconfig           |  1 +
 configs/MPC8349EMDS_defconfig                 |  1 +
 configs/MPC837XERDB_defconfig                 |  1 +
 configs/MPC8548CDS_36BIT_defconfig            |  1 +
 configs/MPC8548CDS_defconfig                  |  1 +
 configs/MPC8548CDS_legacy_defconfig           |  1 +
 configs/P1010RDB-PA_36BIT_NAND_defconfig      |  1 +
 configs/P1010RDB-PA_36BIT_NOR_defconfig       |  1 +
 configs/P1010RDB-PA_36BIT_SDCARD_defconfig    |  1 +
 configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1010RDB-PA_NAND_defconfig            |  1 +
 configs/P1010RDB-PA_NOR_defconfig             |  1 +
 configs/P1010RDB-PA_SDCARD_defconfig          |  1 +
 configs/P1010RDB-PA_SPIFLASH_defconfig        |  1 +
 configs/P1010RDB-PB_36BIT_NAND_defconfig      |  1 +
 configs/P1010RDB-PB_36BIT_NOR_defconfig       |  1 +
 configs/P1010RDB-PB_36BIT_SDCARD_defconfig    |  1 +
 configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1010RDB-PB_NAND_defconfig            |  1 +
 configs/P1010RDB-PB_NOR_defconfig             |  1 +
 configs/P1010RDB-PB_SDCARD_defconfig          |  1 +
 configs/P1010RDB-PB_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PC_36BIT_NAND_defconfig      |  1 +
 configs/P1020RDB-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1020RDB-PC_36BIT_defconfig           |  1 +
 configs/P1020RDB-PC_NAND_defconfig            |  1 +
 configs/P1020RDB-PC_SDCARD_defconfig          |  1 +
 configs/P1020RDB-PC_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PC_defconfig                 |  1 +
 configs/P1020RDB-PD_NAND_defconfig            |  1 +
 configs/P1020RDB-PD_SDCARD_defconfig          |  1 +
 configs/P1020RDB-PD_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PD_defconfig                 |  1 +
 configs/P2020RDB-PC_36BIT_NAND_defconfig      |  1 +
 configs/P2020RDB-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P2020RDB-PC_36BIT_defconfig           |  1 +
 configs/P2020RDB-PC_NAND_defconfig            |  1 +
 configs/P2020RDB-PC_SDCARD_defconfig          |  1 +
 configs/P2020RDB-PC_SPIFLASH_defconfig        |  1 +
 configs/P2020RDB-PC_defconfig                 |  1 +
 configs/P2041RDB_NAND_defconfig               |  1 +
 configs/P2041RDB_SDCARD_defconfig             |  1 +
 configs/P2041RDB_SPIFLASH_defconfig           |  1 +
 configs/P2041RDB_defconfig                    |  1 +
 configs/P3041DS_NAND_defconfig                |  1 +
 configs/P3041DS_SDCARD_defconfig              |  1 +
 configs/P3041DS_SPIFLASH_defconfig            |  1 +
 configs/P3041DS_defconfig                     |  1 +
 configs/P4080DS_SDCARD_defconfig              |  1 +
 configs/P4080DS_SPIFLASH_defconfig            |  1 +
 configs/P4080DS_defconfig                     |  1 +
 configs/P5040DS_NAND_defconfig                |  1 +
 configs/P5040DS_SDCARD_defconfig              |  1 +
 configs/P5040DS_SPIFLASH_defconfig            |  1 +
 configs/P5040DS_defconfig                     |  1 +
 configs/T1024RDB_NAND_defconfig               |  1 +
 configs/T1024RDB_SDCARD_defconfig             |  1 +
 configs/T1024RDB_SPIFLASH_defconfig           |  1 +
 configs/T1024RDB_defconfig                    |  1 +
 configs/T1042D4RDB_NAND_defconfig             |  1 +
 configs/T1042D4RDB_SDCARD_defconfig           |  1 +
 configs/T1042D4RDB_SPIFLASH_defconfig         |  1 +
 configs/T1042D4RDB_defconfig                  |  1 +
 configs/T2080QDS_NAND_defconfig               |  1 +
 configs/T2080QDS_SDCARD_defconfig             |  1 +
 configs/T2080QDS_SECURE_BOOT_defconfig        |  1 +
 configs/T2080QDS_SPIFLASH_defconfig           |  1 +
 configs/T2080QDS_SRIO_PCIE_BOOT_defconfig     |  1 +
 configs/T2080QDS_defconfig                    |  1 +
 configs/T2080RDB_NAND_defconfig               |  1 +
 configs/T2080RDB_SDCARD_defconfig             |  1 +
 configs/T2080RDB_SPIFLASH_defconfig           |  1 +
 configs/T2080RDB_defconfig                    |  1 +
 configs/T2080RDB_revD_NAND_defconfig          |  1 +
 configs/T2080RDB_revD_SDCARD_defconfig        |  1 +
 configs/T2080RDB_revD_SPIFLASH_defconfig      |  1 +
 configs/T2080RDB_revD_defconfig               |  1 +
 configs/T4240RDB_SDCARD_defconfig             |  1 +
 configs/T4240RDB_defconfig                    |  1 +
 configs/UCP1020_defconfig                     |  1 +
 configs/alt_defconfig                         |  1 +
 configs/am3517_evm_defconfig                  |  1 +
 configs/armadillo-800eva_defconfig            |  1 +
 ...edev_cc_v1_0_ultrazedev_som_v1_0_defconfig |  1 +
 configs/bcm7260_defconfig                     |  1 +
 configs/bcm7445_defconfig                     |  1 +
 configs/bcm963158_ram_defconfig               |  1 +
 configs/bcm968360bg_ram_defconfig             |  1 +
 configs/bcm968380gerg_ram_defconfig           |  1 +
 configs/bcm968580xref_ram_defconfig           |  1 +
 configs/bitmain_antminer_s9_defconfig         |  1 +
 configs/blanche_defconfig                     |  1 +
 configs/clearfog_gt_8k_defconfig              |  1 +
 configs/comtrend_ar5315u_ram_defconfig        |  1 +
 configs/comtrend_ar5387un_ram_defconfig       |  1 +
 configs/comtrend_ct5361_ram_defconfig         |  1 +
 configs/comtrend_vr3032u_ram_defconfig        |  1 +
 configs/comtrend_wap5813n_ram_defconfig       |  1 +
 configs/devkit3250_defconfig                  |  1 +
 configs/devkit8000_defconfig                  |  1 +
 configs/ea-lpc3250devkitv2_defconfig          |  1 +
 configs/edminiv2_defconfig                    |  1 +
 .../gardena-smart-gateway-mt7688_defconfig    |  1 +
 configs/gazerbeam_defconfig                   |  1 +
 configs/gose_defconfig                        |  1 +
 configs/hihope_rzg2_defconfig                 |  1 +
 configs/huawei_hg556a_ram_defconfig           |  1 +
 configs/ids8313_defconfig                     |  1 +
 configs/igep00x0_defconfig                    |  1 +
 configs/km_kirkwood_128m16_defconfig          |  1 +
 configs/km_kirkwood_defconfig                 |  1 +
 configs/km_kirkwood_pci_defconfig             |  1 +
 configs/kmcent2_defconfig                     |  1 +
 configs/kmcoge5ne_defconfig                   |  1 +
 configs/kmcoge5un_defconfig                   |  1 +
 configs/kmeter1_defconfig                     |  1 +
 configs/kmnusa_defconfig                      |  1 +
 configs/kmopti2_defconfig                     |  1 +
 configs/kmsupx5_defconfig                     |  1 +
 configs/kmsuse2_defconfig                     |  1 +
 configs/kmtegr1_defconfig                     |  1 +
 configs/kmtepr2_defconfig                     |  1 +
 configs/koelsch_defconfig                     |  1 +
 configs/kzm9g_defconfig                       |  1 +
 configs/lager_defconfig                       |  1 +
 configs/linkit-smart-7688_defconfig           |  1 +
 configs/microblaze-generic_defconfig          |  1 +
 configs/mt7628_rfb_defconfig                  |  1 +
 configs/mvebu_crb_cn9130_defconfig            |  1 +
 configs/mvebu_db-88f3720_defconfig            |  1 +
 configs/mvebu_db_armada8k_defconfig           |  1 +
 configs/mvebu_db_cn9130_defconfig             |  1 +
 configs/mvebu_espressobin-88f3720_defconfig   |  1 +
 configs/mvebu_mcbin-88f8040_defconfig         |  1 +
 configs/mvebu_puzzle-m801-88f8040_defconfig   |  1 +
 configs/netgear_cg3100d_ram_defconfig         |  1 +
 configs/netgear_dgnd3700v2_ram_defconfig      |  1 +
 configs/nokia_rx51_defconfig                  |  1 +
 configs/omap35_logic_defconfig                |  1 +
 configs/omap35_logic_somlv_defconfig          |  1 +
 configs/omap3_beagle_defconfig                |  1 +
 configs/omap3_evm_defconfig                   |  1 +
 configs/omap3_logic_defconfig                 |  1 +
 configs/omap3_logic_somlv_defconfig           |  1 +
 configs/pg_wcom_expu1_defconfig               |  1 +
 configs/pg_wcom_seli8_defconfig               |  1 +
 configs/porter_defconfig                      |  1 +
 configs/r8a774a1_beacon_defconfig             |  1 +
 configs/r8a774b1_beacon_defconfig             |  1 +
 configs/r8a774e1_beacon_defconfig             |  1 +
 configs/r8a77970_eagle_defconfig              |  1 +
 configs/r8a77980_condor_defconfig             |  1 +
 configs/r8a77990_ebisu_defconfig              |  1 +
 configs/r8a77995_draak_defconfig              |  1 +
 configs/r8a779a0_falcon_defconfig             |  1 +
 configs/rcar3_salvator-x_defconfig            |  1 +
 configs/rcar3_ulcb_defconfig                  |  1 +
 configs/sagem_f@st1704_ram_defconfig          |  1 +
 configs/sandbox64_defconfig                   |  1 +
 configs/sandbox_defconfig                     |  1 +
 configs/sandbox_flattree_defconfig            |  1 +
 configs/sandbox_noinst_defconfig              |  1 +
 configs/sandbox_spl_defconfig                 |  1 +
 configs/sfr_nb4-ser_ram_defconfig             |  1 +
 configs/silinux_ek874_defconfig               |  1 +
 configs/silk_defconfig                        |  1 +
 configs/sniper_defconfig                      |  1 +
 configs/socfpga_arria10_defconfig             |  1 +
 configs/stout_defconfig                       |  1 +
 configs/syzygy_hub_defconfig                  |  1 +
 configs/tools-only_defconfig                  |  1 +
 configs/topic_miami_defconfig                 |  1 +
 configs/topic_miamilite_defconfig             |  1 +
 configs/topic_miamiplus_defconfig             |  1 +
 configs/tuge1_defconfig                       |  1 +
 configs/turris_mox_defconfig                  |  1 +
 configs/tuxx1_defconfig                       |  1 +
 configs/uDPU_defconfig                        |  1 +
 configs/work_92105_defconfig                  |  1 +
 configs/xilinx_versal_mini_defconfig          |  1 +
 configs/xilinx_versal_mini_emmc0_defconfig    |  1 +
 configs/xilinx_versal_mini_emmc1_defconfig    |  1 +
 configs/xilinx_versal_virt_defconfig          |  1 +
 configs/xilinx_zynq_virt_defconfig            |  1 +
 configs/xilinx_zynqmp_mini_defconfig          |  1 +
 configs/xilinx_zynqmp_mini_emmc0_defconfig    |  1 +
 configs/xilinx_zynqmp_mini_emmc1_defconfig    |  1 +
 configs/xilinx_zynqmp_mini_nand_defconfig     |  1 +
 .../xilinx_zynqmp_mini_nand_single_defconfig  |  1 +
 configs/xilinx_zynqmp_mini_qspi_defconfig     |  1 +
 configs/xilinx_zynqmp_r5_defconfig            |  1 +
 configs/xilinx_zynqmp_virt_defconfig          |  1 +
 configs/zynq_cse_nand_defconfig               |  1 +
 configs/zynq_cse_nor_defconfig                |  1 +
 configs/zynq_cse_qspi_defconfig               |  1 +
 doc/README.serial_multi                       |  4 +-
 drivers/serial/Kconfig                        | 75 +++++++++++++++++++
 drivers/serial/serial-uclass.c                |  2 +-
 drivers/serial/serial.c                       |  4 +-
 include/config_fallbacks.h                    |  4 -
 include/configs/MPC8349EMDS.h                 |  3 -
 include/configs/MPC8349EMDS_SDRAM.h           |  3 -
 include/configs/MPC837XERDB.h                 |  3 -
 include/configs/MPC8540ADS.h                  |  3 -
 include/configs/MPC8548CDS.h                  |  3 -
 include/configs/MPC8560ADS.h                  |  3 -
 include/configs/P1010RDB.h                    |  3 -
 include/configs/P2041RDB.h                    |  3 -
 include/configs/T102xRDB.h                    |  3 -
 include/configs/T104xRDB.h                    |  3 -
 include/configs/T208xQDS.h                    |  2 -
 include/configs/T208xRDB.h                    |  2 -
 include/configs/T4240RDB.h                    |  3 -
 include/configs/UCP1020.h                     |  3 -
 include/configs/armadillo-800eva.h            |  1 -
 include/configs/astro_mcf5373l.h              |  7 --
 include/configs/bcmstb.h                      |  6 --
 include/configs/bmips_common.h                |  4 -
 include/configs/broadcom_bcm963158.h          |  3 -
 include/configs/broadcom_bcm968360bg.h        |  3 -
 include/configs/broadcom_bcm968580xref.h      |  3 -
 include/configs/cobra5272.h                   |  8 --
 include/configs/corenet_ds.h                  |  3 -
 include/configs/edminiv2.h                    |  9 ---
 .../configs/gardena-smart-gateway-mt7688.h    |  4 -
 include/configs/gazerbeam.h                   |  3 -
 include/configs/ids8313.h                     |  2 -
 include/configs/km/keymile-common.h           |  2 -
 include/configs/kzm9g.h                       |  1 -
 include/configs/linkit-smart-7688.h           |  4 -
 include/configs/microblaze-generic.h          |  5 --
 include/configs/mt7628.h                      |  4 -
 include/configs/mvebu_armada-37xx.h           |  8 --
 include/configs/mvebu_armada-8k.h             |  3 -
 include/configs/nokia_rx51.h                  |  2 -
 include/configs/p1_p2_rdb_pc.h                |  3 -
 include/configs/rcar-gen2-common.h            |  1 -
 include/configs/rcar-gen3-common.h            |  1 -
 include/configs/sandbox.h                     |  3 -
 include/configs/sniper.h                      |  3 -
 include/configs/socfpga_arria10_socdk.h       |  1 -
 include/configs/tam3517-common.h              |  2 -
 include/configs/ti_omap3_common.h             |  2 -
 include/configs/turris_mox.h                  |  8 --
 include/configs/xilinx_versal.h               |  3 -
 include/configs/xilinx_zynqmp.h               |  3 -
 include/configs/xilinx_zynqmp_r5.h            |  5 --
 include/configs/zynq-common.h                 |  5 --
 include/serial.h                              | 36 +++++++++
 255 files changed, 314 insertions(+), 181 deletions(-)

Comments

Alex G. Sept. 13, 2021, 10:03 p.m. UTC | #1
On 9/13/21 4:24 PM, Tom Rini wrote:
> In order to move CONFIG_SYS_BAUDRATE_TABLE to Kconfig, we need to rework
> the logic a bit.  Rename the users of CONFIG_SYS_BAUDRATE_TABLE to
> SYS_BAUDRATE_TABLE.  Introduce a series of CONFIG_BAUDRATE_TABLE_...
> that include some number of baud rates.  These match all existing users.
> The help for each entry specifies what the exact table is, for a given
> option.  Define what SYS_BAUDRATE_TABLE will be in include/serial.h now.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---

> diff --git a/include/serial.h b/include/serial.h
> index 6d1e62c6770c..150644c4c3d4 100644
> --- a/include/serial.h
> +++ b/include/serial.h
> @@ -3,6 +3,42 @@
>   
>   #include <post.h>
>   
> +#if defined(CONFIG_BAUDRATE_TABLE_300_TO_38400_115200)
> +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> +				  38400, 115200 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_115200)
> +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> +				  38400, 57600, 115200 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_230400)
> +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> +				  38400, 57600, 115200, 230400 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_6000000)
> +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, 9600, \
> +				  19200, 38400, 57600, 115200, 230400, \
> +				  460800, 500000, 576000, 921600, 1000000, \
> +				  1152000, 1500000, 2000000, 2500000, \
> +				  3000000, 3500000, 4000000, 4500000, \
> +				  5000000, 5500000, 6000000 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_4800_TO_115200)
> +#define SYS_BAUDRATE_TABLE	{ 4800, 9600, 19200, 38400, 57600, 115200 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_115200)
> +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400)
> +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_460800)
> +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_921600)
> +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> +				  460800, 921600 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000)
> +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> +				  500000, 1500000 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_38400_115200_ONLY)
> +#define SYS_BAUDRATE_TABLE	{ 38400, 115200 }
> +#elif defined(CONFIG_BAUDRATE_TABLE_115200_ONLY)
> +#define SYS_BAUDRATE_TABLE	{ 115200 }
> +#endif
> +
>   struct serial_device {
>   	/* enough bytes to match alignment of following func pointer */
>   	char	name[16];
> 


This opens the gates to #ifdefing the heck out of serial.h. What happens 
to my board that goes from 300 to 2000000?
  * We need a new Kconfig and new ifdef
What happens to my other board that goes from 300 to 2500000?
  * We need a new Kconfig and new ifdef
The pattern doesn't look promising.

I actually think this change can make the situation worse. We trade 
having an antiquated and inconvenient SYS_BAUDRATE_TABLE for one Kconfig 
per each possible baudrate combination. How does this make sense?

I've seen situations were SPL boots with 2Mbaud and executes 
succesfully, u-boot starts up with 2Mbaud just fine. few lines later, 
u-boot, downswitches to 115200 because CONFIG_SYS_BAUDRATE_TABLE says so.

Suggestion I: Can we have a MIN/MAX value for baudrates, and have the 
code work from there ?

Suggestion II: Define the Kconfig SYS_BAUDRATE_TABLE table to a C array, 
like 'default "{ 300, 420, 690}" ' and forego the #ifdefs in serial.h

Suggestion III: Get rid of the logic that says "baudrate must be one of 
these predefined values" and let the serial driver return -ENOBUENO or 
-EINVAL if the hardware really can't do that baudrate. Most UARTs 
nowadays can do a wide range of values, and the baudrate table doesn't 
model that very well. Combine this with a CONFIG_MAX_BAUDRATE so that 
boards with shitty RS232 converters can set a safe upper limit -- and 
make sure CONFIG_BAUDRATE also enforces this.

There's a lot of unrealized potential here.

Alex
Tom Rini Sept. 13, 2021, 10:11 p.m. UTC | #2
On Mon, Sep 13, 2021 at 05:03:13PM -0500, Alex G. wrote:
> 
> 
> On 9/13/21 4:24 PM, Tom Rini wrote:
> > In order to move CONFIG_SYS_BAUDRATE_TABLE to Kconfig, we need to rework
> > the logic a bit.  Rename the users of CONFIG_SYS_BAUDRATE_TABLE to
> > SYS_BAUDRATE_TABLE.  Introduce a series of CONFIG_BAUDRATE_TABLE_...
> > that include some number of baud rates.  These match all existing users.
> > The help for each entry specifies what the exact table is, for a given
> > option.  Define what SYS_BAUDRATE_TABLE will be in include/serial.h now.
> > 
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> 
> > diff --git a/include/serial.h b/include/serial.h
> > index 6d1e62c6770c..150644c4c3d4 100644
> > --- a/include/serial.h
> > +++ b/include/serial.h
> > @@ -3,6 +3,42 @@
> >   #include <post.h>
> > +#if defined(CONFIG_BAUDRATE_TABLE_300_TO_38400_115200)
> > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > +				  38400, 115200 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_115200)
> > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > +				  38400, 57600, 115200 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_230400)
> > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > +				  38400, 57600, 115200, 230400 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_6000000)
> > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, 9600, \
> > +				  19200, 38400, 57600, 115200, 230400, \
> > +				  460800, 500000, 576000, 921600, 1000000, \
> > +				  1152000, 1500000, 2000000, 2500000, \
> > +				  3000000, 3500000, 4000000, 4500000, \
> > +				  5000000, 5500000, 6000000 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_4800_TO_115200)
> > +#define SYS_BAUDRATE_TABLE	{ 4800, 9600, 19200, 38400, 57600, 115200 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_115200)
> > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400)
> > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_460800)
> > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_921600)
> > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > +				  460800, 921600 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000)
> > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > +				  500000, 1500000 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_38400_115200_ONLY)
> > +#define SYS_BAUDRATE_TABLE	{ 38400, 115200 }
> > +#elif defined(CONFIG_BAUDRATE_TABLE_115200_ONLY)
> > +#define SYS_BAUDRATE_TABLE	{ 115200 }
> > +#endif
> > +
> >   struct serial_device {
> >   	/* enough bytes to match alignment of following func pointer */
> >   	char	name[16];
> 
> 
> This opens the gates to #ifdefing the heck out of serial.h. What happens to
> my board that goes from 300 to 2000000?
>  * We need a new Kconfig and new ifdef
> What happens to my other board that goes from 300 to 2500000?
>  * We need a new Kconfig and new ifdef
> The pattern doesn't look promising.

This reminds me I was tempted to do a cover letter, but didn't.  What
happens is I tell you no.  Most boards are using the standard table of
common rates from 9600 to 115200.  A nice follow-up would be to change
every board with a special case that's not above 115200 to just use the
normal table.  Everyone else?  There's the maximal table.  That's it.
That's even come in fairly recently, for mvebu platforms.

> I actually think this change can make the situation worse. We trade having
> an antiquated and inconvenient SYS_BAUDRATE_TABLE for one Kconfig per each
> possible baudrate combination. How does this make sense?

I'm going, as much as possible, for migrating the current situation.
There's many places things could be cleaner, but "we'll clean this up
and then migrate ..." is why we're so very very far behind where I hoped
to be.

> I've seen situations were SPL boots with 2Mbaud and executes succesfully,
> u-boot starts up with 2Mbaud just fine. few lines later, u-boot,
> downswitches to 115200 because CONFIG_SYS_BAUDRATE_TABLE says so.

Well, the table and CONFIG_BAUDRATE.

> Suggestion I: Can we have a MIN/MAX value for baudrates, and have the code
> work from there ?
> 
> Suggestion II: Define the Kconfig SYS_BAUDRATE_TABLE table to a C array,
> like 'default "{ 300, 420, 690}" ' and forego the #ifdefs in serial.h
> 
> Suggestion III: Get rid of the logic that says "baudrate must be one of
> these predefined values" and let the serial driver return -ENOBUENO or
> -EINVAL if the hardware really can't do that baudrate. Most UARTs nowadays
> can do a wide range of values, and the baudrate table doesn't model that
> very well. Combine this with a CONFIG_MAX_BAUDRATE so that boards with
> shitty RS232 converters can set a safe upper limit -- and make sure
> CONFIG_BAUDRATE also enforces this.
> 
> There's a lot of unrealized potential here.

I'd certainly like to see something done as a follow-up that makes it
easier to support platforms that can do something faster.
Tom Rini Sept. 13, 2021, 10:14 p.m. UTC | #3
On Mon, Sep 13, 2021 at 05:03:13PM -0500, Alex G. wrote:

[snip]
> Suggestion II: Define the Kconfig SYS_BAUDRATE_TABLE table to a C array,
> like 'default "{ 300, 420, 690}" ' and forego the #ifdefs in serial.h

Oh!  And FWIW, I don't _think_ this works.  I'd be quite happy to be
proven wrong, but there's not a useful Kconfig type here.  If we use
"string" and put in "{ 115200 }", we end up with:
static const unsigned long baudrate_table[] = "{ 115200 }";
which isn't what we want.  We'd need something clever next to turn a
string in to something we can use.
Pali Rohár Sept. 24, 2021, 7:08 p.m. UTC | #4
Hello!

On Monday 13 September 2021 18:11:38 Tom Rini wrote:
> On Mon, Sep 13, 2021 at 05:03:13PM -0500, Alex G. wrote:
> > 
> > 
> > On 9/13/21 4:24 PM, Tom Rini wrote:
> > > In order to move CONFIG_SYS_BAUDRATE_TABLE to Kconfig, we need to rework
> > > the logic a bit.  Rename the users of CONFIG_SYS_BAUDRATE_TABLE to
> > > SYS_BAUDRATE_TABLE.  Introduce a series of CONFIG_BAUDRATE_TABLE_...
> > > that include some number of baud rates.  These match all existing users.
> > > The help for each entry specifies what the exact table is, for a given
> > > option.  Define what SYS_BAUDRATE_TABLE will be in include/serial.h now.
> > > 
> > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > > ---
> > 
> > > diff --git a/include/serial.h b/include/serial.h
> > > index 6d1e62c6770c..150644c4c3d4 100644
> > > --- a/include/serial.h
> > > +++ b/include/serial.h
> > > @@ -3,6 +3,42 @@
> > >   #include <post.h>
> > > +#if defined(CONFIG_BAUDRATE_TABLE_300_TO_38400_115200)
> > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > +				  38400, 115200 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_115200)
> > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > +				  38400, 57600, 115200 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_230400)
> > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > +				  38400, 57600, 115200, 230400 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_6000000)
> > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, 9600, \
> > > +				  19200, 38400, 57600, 115200, 230400, \
> > > +				  460800, 500000, 576000, 921600, 1000000, \
> > > +				  1152000, 1500000, 2000000, 2500000, \
> > > +				  3000000, 3500000, 4000000, 4500000, \
> > > +				  5000000, 5500000, 6000000 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_4800_TO_115200)
> > > +#define SYS_BAUDRATE_TABLE	{ 4800, 9600, 19200, 38400, 57600, 115200 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_115200)
> > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400)
> > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_460800)
> > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_921600)
> > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > > +				  460800, 921600 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000)
> > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > > +				  500000, 1500000 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_38400_115200_ONLY)
> > > +#define SYS_BAUDRATE_TABLE	{ 38400, 115200 }
> > > +#elif defined(CONFIG_BAUDRATE_TABLE_115200_ONLY)
> > > +#define SYS_BAUDRATE_TABLE	{ 115200 }
> > > +#endif
> > > +
> > >   struct serial_device {
> > >   	/* enough bytes to match alignment of following func pointer */
> > >   	char	name[16];
> > 
> > 
> > This opens the gates to #ifdefing the heck out of serial.h. What happens to
> > my board that goes from 300 to 2000000?
> >  * We need a new Kconfig and new ifdef
> > What happens to my other board that goes from 300 to 2500000?
> >  * We need a new Kconfig and new ifdef
> > The pattern doesn't look promising.
> 
> This reminds me I was tempted to do a cover letter, but didn't.  What
> happens is I tell you no.  Most boards are using the standard table of
> common rates from 9600 to 115200.  A nice follow-up would be to change
> every board with a special case that's not above 115200 to just use the
> normal table.  Everyone else?  There's the maximal table.  That's it.
> That's even come in fairly recently, for mvebu platforms.

I think that above #ifdef hell is the worst what could be done. It does
not solve existing problems and just introduce new way which opens doors
for problems for new boards...

What should be done is to completely kill this CONFIG_SYS_BAUDRATE_TABLE
option and not to convert it to another set of options.

Why to kill it?

1) Probably none of CONFIG_SYS_BAUDRATE_TABLE in include board files is
   correctly defined. Some of them contains only just few baudrates
   copied from other header files without checking that it is correct
   or contains some "radom" definition where is also 9600 and 115200 (as
   probably only these values are tested).

2) Available baudrate values are not specific to board, but rather to
   UART chip used on the board. So only UART driver knowns what are
   supported values.

3) Some boards may have integrated USB<-->UART chip which is "glued"
   directly to the board UART chip. So baudrates possible to set is
   limited to what together USB<-->UART chip and SoC UART supports.


I think the proper way is to do:

1) Extend serial UART DM API with a callback which takes baudrate
   argument and returns the nearest baudrate value which hardware can
   set. Then serial UART drivers should implement it. This
   implementation is simple, because most UART drivers already do it.
   They take baudrate and calculates the best UART clock divisor and set
   it. And from this calculated divisor can be reconstructed the real
   baudrate value.

2) Introduce some board specific function which can limit / filter
   particular baudrate (used in scenario when board has directly USB
   port with integrated USB<-->UART).

2) Currently CONFIG_SYS_BAUDRATE_TABLE is used for checking if baudrate
   value is supported prior setting it. So replace this table by a new
   callback from step 1) and 2) and allow baudrate if is e.g. in 2-3%
   tolerance.

3) Add some platform / SoC option to allow specifying upper or lower
   limit for baudrate. Not as Kconfig option, this is mean as platform
   limitation exposed by e.g. used clock source. Some platforms have
   limitation that for specific clock must have some minimal clock UART
   divisor.

4) Add some optional Kconfig option to limit upper and lower UART
   baudrate.

> > I actually think this change can make the situation worse. We trade having
> > an antiquated and inconvenient SYS_BAUDRATE_TABLE for one Kconfig per each
> > possible baudrate combination. How does this make sense?
> 
> I'm going, as much as possible, for migrating the current situation.
> There's many places things could be cleaner, but "we'll clean this up
> and then migrate ..." is why we're so very very far behind where I hoped
> to be.
> 
> > I've seen situations were SPL boots with 2Mbaud and executes succesfully,
> > u-boot starts up with 2Mbaud just fine. few lines later, u-boot,
> > downswitches to 115200 because CONFIG_SYS_BAUDRATE_TABLE says so.
> 
> Well, the table and CONFIG_BAUDRATE.
> 
> > Suggestion I: Can we have a MIN/MAX value for baudrates, and have the code
> > work from there ?
> > 
> > Suggestion II: Define the Kconfig SYS_BAUDRATE_TABLE table to a C array,
> > like 'default "{ 300, 420, 690}" ' and forego the #ifdefs in serial.h
> > 
> > Suggestion III: Get rid of the logic that says "baudrate must be one of
> > these predefined values" and let the serial driver return -ENOBUENO or
> > -EINVAL if the hardware really can't do that baudrate. Most UARTs nowadays
> > can do a wide range of values, and the baudrate table doesn't model that
> > very well. Combine this with a CONFIG_MAX_BAUDRATE so that boards with
> > shitty RS232 converters can set a safe upper limit -- and make sure
> > CONFIG_BAUDRATE also enforces this.
> > 
> > There's a lot of unrealized potential here.
> 
> I'd certainly like to see something done as a follow-up that makes it
> easier to support platforms that can do something faster.
> 
> -- 
> Tom
Tom Rini Sept. 24, 2021, 10:07 p.m. UTC | #5
On Fri, Sep 24, 2021 at 09:08:15PM +0200, Pali Rohár wrote:
> Hello!
> 
> On Monday 13 September 2021 18:11:38 Tom Rini wrote:
> > On Mon, Sep 13, 2021 at 05:03:13PM -0500, Alex G. wrote:
> > > 
> > > 
> > > On 9/13/21 4:24 PM, Tom Rini wrote:
> > > > In order to move CONFIG_SYS_BAUDRATE_TABLE to Kconfig, we need to rework
> > > > the logic a bit.  Rename the users of CONFIG_SYS_BAUDRATE_TABLE to
> > > > SYS_BAUDRATE_TABLE.  Introduce a series of CONFIG_BAUDRATE_TABLE_...
> > > > that include some number of baud rates.  These match all existing users.
> > > > The help for each entry specifies what the exact table is, for a given
> > > > option.  Define what SYS_BAUDRATE_TABLE will be in include/serial.h now.
> > > > 
> > > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > > > ---
> > > 
> > > > diff --git a/include/serial.h b/include/serial.h
> > > > index 6d1e62c6770c..150644c4c3d4 100644
> > > > --- a/include/serial.h
> > > > +++ b/include/serial.h
> > > > @@ -3,6 +3,42 @@
> > > >   #include <post.h>
> > > > +#if defined(CONFIG_BAUDRATE_TABLE_300_TO_38400_115200)
> > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > > +				  38400, 115200 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_115200)
> > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > > +				  38400, 57600, 115200 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_230400)
> > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > > +				  38400, 57600, 115200, 230400 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_6000000)
> > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, 9600, \
> > > > +				  19200, 38400, 57600, 115200, 230400, \
> > > > +				  460800, 500000, 576000, 921600, 1000000, \
> > > > +				  1152000, 1500000, 2000000, 2500000, \
> > > > +				  3000000, 3500000, 4000000, 4500000, \
> > > > +				  5000000, 5500000, 6000000 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_4800_TO_115200)
> > > > +#define SYS_BAUDRATE_TABLE	{ 4800, 9600, 19200, 38400, 57600, 115200 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_115200)
> > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400)
> > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_460800)
> > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_921600)
> > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > > > +				  460800, 921600 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000)
> > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > > > +				  500000, 1500000 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_38400_115200_ONLY)
> > > > +#define SYS_BAUDRATE_TABLE	{ 38400, 115200 }
> > > > +#elif defined(CONFIG_BAUDRATE_TABLE_115200_ONLY)
> > > > +#define SYS_BAUDRATE_TABLE	{ 115200 }
> > > > +#endif
> > > > +
> > > >   struct serial_device {
> > > >   	/* enough bytes to match alignment of following func pointer */
> > > >   	char	name[16];
> > > 
> > > 
> > > This opens the gates to #ifdefing the heck out of serial.h. What happens to
> > > my board that goes from 300 to 2000000?
> > >  * We need a new Kconfig and new ifdef
> > > What happens to my other board that goes from 300 to 2500000?
> > >  * We need a new Kconfig and new ifdef
> > > The pattern doesn't look promising.
> > 
> > This reminds me I was tempted to do a cover letter, but didn't.  What
> > happens is I tell you no.  Most boards are using the standard table of
> > common rates from 9600 to 115200.  A nice follow-up would be to change
> > every board with a special case that's not above 115200 to just use the
> > normal table.  Everyone else?  There's the maximal table.  That's it.
> > That's even come in fairly recently, for mvebu platforms.
> 
> I think that above #ifdef hell is the worst what could be done. It does
> not solve existing problems and just introduce new way which opens doors
> for problems for new boards...

I don't think this will open new problems, since I do intend to fire off
the "easy" reduction option of switching to either standard (current
default) or maximal tables, rather than N tables.

> What should be done is to completely kill this CONFIG_SYS_BAUDRATE_TABLE
> option and not to convert it to another set of options.
> 
> Why to kill it?
> 
> 1) Probably none of CONFIG_SYS_BAUDRATE_TABLE in include board files is
>    correctly defined. Some of them contains only just few baudrates
>    copied from other header files without checking that it is correct
>    or contains some "radom" definition where is also 9600 and 115200 (as
>    probably only these values are tested).
> 
> 2) Available baudrate values are not specific to board, but rather to
>    UART chip used on the board. So only UART driver knowns what are
>    supported values.
> 
> 3) Some boards may have integrated USB<-->UART chip which is "glued"
>    directly to the board UART chip. So baudrates possible to set is
>    limited to what together USB<-->UART chip and SoC UART supports.
> 
> 
> I think the proper way is to do:
> 
> 1) Extend serial UART DM API with a callback which takes baudrate
>    argument and returns the nearest baudrate value which hardware can
>    set. Then serial UART drivers should implement it. This
>    implementation is simple, because most UART drivers already do it.
>    They take baudrate and calculates the best UART clock divisor and set
>    it. And from this calculated divisor can be reconstructed the real
>    baudrate value.
> 
> 2) Introduce some board specific function which can limit / filter
>    particular baudrate (used in scenario when board has directly USB
>    port with integrated USB<-->UART).
> 
> 2) Currently CONFIG_SYS_BAUDRATE_TABLE is used for checking if baudrate
>    value is supported prior setting it. So replace this table by a new
>    callback from step 1) and 2) and allow baudrate if is e.g. in 2-3%
>    tolerance.
> 
> 3) Add some platform / SoC option to allow specifying upper or lower
>    limit for baudrate. Not as Kconfig option, this is mean as platform
>    limitation exposed by e.g. used clock source. Some platforms have
>    limitation that for specific clock must have some minimal clock UART
>    divisor.
> 
> 4) Add some optional Kconfig option to limit upper and lower UART
>    baudrate.

The problem I have is none of this is new, and predates Kconfig being
introduced.  Now, if you're saying you'll fire off a patch series to do
the above, in the next few months even, OK, yes, I can set aside this
particular series for now.  But setting aside some of the ugly defines
until we can convert them to something cleaner is why we're at this
stagnant point in the conversion.
Pali Rohár Sept. 25, 2021, 12:22 p.m. UTC | #6
On Friday 24 September 2021 18:07:36 Tom Rini wrote:
> On Fri, Sep 24, 2021 at 09:08:15PM +0200, Pali Rohár wrote:
> > Hello!
> > 
> > On Monday 13 September 2021 18:11:38 Tom Rini wrote:
> > > On Mon, Sep 13, 2021 at 05:03:13PM -0500, Alex G. wrote:
> > > > 
> > > > 
> > > > On 9/13/21 4:24 PM, Tom Rini wrote:
> > > > > In order to move CONFIG_SYS_BAUDRATE_TABLE to Kconfig, we need to rework
> > > > > the logic a bit.  Rename the users of CONFIG_SYS_BAUDRATE_TABLE to
> > > > > SYS_BAUDRATE_TABLE.  Introduce a series of CONFIG_BAUDRATE_TABLE_...
> > > > > that include some number of baud rates.  These match all existing users.
> > > > > The help for each entry specifies what the exact table is, for a given
> > > > > option.  Define what SYS_BAUDRATE_TABLE will be in include/serial.h now.
> > > > > 
> > > > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > > > > ---
> > > > 
> > > > > diff --git a/include/serial.h b/include/serial.h
> > > > > index 6d1e62c6770c..150644c4c3d4 100644
> > > > > --- a/include/serial.h
> > > > > +++ b/include/serial.h
> > > > > @@ -3,6 +3,42 @@
> > > > >   #include <post.h>
> > > > > +#if defined(CONFIG_BAUDRATE_TABLE_300_TO_38400_115200)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > > > +				  38400, 115200 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_115200)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > > > +				  38400, 57600, 115200 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_230400)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
> > > > > +				  38400, 57600, 115200, 230400 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_6000000)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, 9600, \
> > > > > +				  19200, 38400, 57600, 115200, 230400, \
> > > > > +				  460800, 500000, 576000, 921600, 1000000, \
> > > > > +				  1152000, 1500000, 2000000, 2500000, \
> > > > > +				  3000000, 3500000, 4000000, 4500000, \
> > > > > +				  5000000, 5500000, 6000000 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_4800_TO_115200)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 4800, 9600, 19200, 38400, 57600, 115200 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_115200)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_460800)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_921600)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > > > > +				  460800, 921600 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
> > > > > +				  500000, 1500000 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_38400_115200_ONLY)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 38400, 115200 }
> > > > > +#elif defined(CONFIG_BAUDRATE_TABLE_115200_ONLY)
> > > > > +#define SYS_BAUDRATE_TABLE	{ 115200 }
> > > > > +#endif
> > > > > +
> > > > >   struct serial_device {
> > > > >   	/* enough bytes to match alignment of following func pointer */
> > > > >   	char	name[16];
> > > > 
> > > > 
> > > > This opens the gates to #ifdefing the heck out of serial.h. What happens to
> > > > my board that goes from 300 to 2000000?
> > > >  * We need a new Kconfig and new ifdef
> > > > What happens to my other board that goes from 300 to 2500000?
> > > >  * We need a new Kconfig and new ifdef
> > > > The pattern doesn't look promising.
> > > 
> > > This reminds me I was tempted to do a cover letter, but didn't.  What
> > > happens is I tell you no.  Most boards are using the standard table of
> > > common rates from 9600 to 115200.  A nice follow-up would be to change
> > > every board with a special case that's not above 115200 to just use the
> > > normal table.  Everyone else?  There's the maximal table.  That's it.
> > > That's even come in fairly recently, for mvebu platforms.
> > 
> > I think that above #ifdef hell is the worst what could be done. It does
> > not solve existing problems and just introduce new way which opens doors
> > for problems for new boards...
> 
> I don't think this will open new problems, since I do intend to fire off
> the "easy" reduction option of switching to either standard (current
> default) or maximal tables, rather than N tables.
> 
> > What should be done is to completely kill this CONFIG_SYS_BAUDRATE_TABLE
> > option and not to convert it to another set of options.
> > 
> > Why to kill it?
> > 
> > 1) Probably none of CONFIG_SYS_BAUDRATE_TABLE in include board files is
> >    correctly defined. Some of them contains only just few baudrates
> >    copied from other header files without checking that it is correct
> >    or contains some "radom" definition where is also 9600 and 115200 (as
> >    probably only these values are tested).
> > 
> > 2) Available baudrate values are not specific to board, but rather to
> >    UART chip used on the board. So only UART driver knowns what are
> >    supported values.
> > 
> > 3) Some boards may have integrated USB<-->UART chip which is "glued"
> >    directly to the board UART chip. So baudrates possible to set is
> >    limited to what together USB<-->UART chip and SoC UART supports.
> > 
> > 
> > I think the proper way is to do:
> > 
> > 1) Extend serial UART DM API with a callback which takes baudrate
> >    argument and returns the nearest baudrate value which hardware can
> >    set. Then serial UART drivers should implement it. This
> >    implementation is simple, because most UART drivers already do it.
> >    They take baudrate and calculates the best UART clock divisor and set
> >    it. And from this calculated divisor can be reconstructed the real
> >    baudrate value.
> > 
> > 2) Introduce some board specific function which can limit / filter
> >    particular baudrate (used in scenario when board has directly USB
> >    port with integrated USB<-->UART).
> > 
> > 2) Currently CONFIG_SYS_BAUDRATE_TABLE is used for checking if baudrate
> >    value is supported prior setting it. So replace this table by a new
> >    callback from step 1) and 2) and allow baudrate if is e.g. in 2-3%
> >    tolerance.
> > 
> > 3) Add some platform / SoC option to allow specifying upper or lower
> >    limit for baudrate. Not as Kconfig option, this is mean as platform
> >    limitation exposed by e.g. used clock source. Some platforms have
> >    limitation that for specific clock must have some minimal clock UART
> >    divisor.
> > 
> > 4) Add some optional Kconfig option to limit upper and lower UART
> >    baudrate.
> 
> The problem I have is none of this is new, and predates Kconfig being
> introduced.  Now, if you're saying you'll fire off a patch series to do
> the above, in the next few months even, OK, yes, I can set aside this
> particular series for now.

Done: http://patchwork.ozlabs.org/project/uboot/patch/20210925121958.26001-1-pali@kernel.org/

Just as RFC and example how it could look like. If you like it we can
continue discussion in thread for above patch.

> But setting aside some of the ugly defines
> until we can convert them to something cleaner is why we're at this
> stagnant point in the conversion.
> 
> -- 
> Tom
diff mbox series

Patch

diff --git a/README b/README
index e9a6df4cd1de..e50ce370b302 100644
--- a/README
+++ b/README
@@ -2188,9 +2188,6 @@  Configuration Settings:
 		the application (usually a Linux kernel) when it is
 		booted
 
-- CONFIG_SYS_BAUDRATE_TABLE:
-		List of legal baudrate settings for this board.
-
 - CONFIG_SYS_MEM_RESERVE_SECURE
 		Only implemented for ARMv8 for now.
 		If defined, the size of CONFIG_SYS_MEM_RESERVE_SECURE memory
diff --git a/arch/arm/include/asm/arch-lpc32xx/config.h b/arch/arm/include/asm/arch-lpc32xx/config.h
index 45e46f99463e..b700a83e4c3f 100644
--- a/arch/arm/include/asm/arch-lpc32xx/config.h
+++ b/arch/arm/include/asm/arch-lpc32xx/config.h
@@ -23,9 +23,6 @@ 
 #define CONFIG_SYS_NS16550_CLK		13000000
 #endif
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-		{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
-
 /* Ethernet */
 #define LPC32XX_ETH_BASE ETHERNET_BASE
 
diff --git a/configs/MPC8349EMDS_PCI64_defconfig b/configs/MPC8349EMDS_PCI64_defconfig
index 457a1eef031a..782cae1ab00a 100644
--- a/configs/MPC8349EMDS_PCI64_defconfig
+++ b/configs/MPC8349EMDS_PCI64_defconfig
@@ -123,5 +123,6 @@  CONFIG_PHY_REALTEK=y
 CONFIG_PHY_SMSC=y
 CONFIG_PHY_VITESSE=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/MPC8349EMDS_SDRAM_defconfig b/configs/MPC8349EMDS_SDRAM_defconfig
index 5f568977cb28..13783fd3bcd8 100644
--- a/configs/MPC8349EMDS_SDRAM_defconfig
+++ b/configs/MPC8349EMDS_SDRAM_defconfig
@@ -133,6 +133,7 @@  CONFIG_PHY_REALTEK=y
 CONFIG_PHY_SMSC=y
 CONFIG_PHY_VITESSE=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/MPC8349EMDS_SLAVE_defconfig b/configs/MPC8349EMDS_SLAVE_defconfig
index 763d6fa398c2..268dede7194b 100644
--- a/configs/MPC8349EMDS_SLAVE_defconfig
+++ b/configs/MPC8349EMDS_SLAVE_defconfig
@@ -123,5 +123,6 @@  CONFIG_PHY_REALTEK=y
 CONFIG_PHY_SMSC=y
 CONFIG_PHY_VITESSE=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/MPC8349EMDS_defconfig b/configs/MPC8349EMDS_defconfig
index df9c9d3a4010..5930de426eb8 100644
--- a/configs/MPC8349EMDS_defconfig
+++ b/configs/MPC8349EMDS_defconfig
@@ -125,6 +125,7 @@  CONFIG_PHY_REALTEK=y
 CONFIG_PHY_SMSC=y
 CONFIG_PHY_VITESSE=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/MPC837XERDB_defconfig b/configs/MPC837XERDB_defconfig
index 4945207ef499..239414f7b43d 100644
--- a/configs/MPC837XERDB_defconfig
+++ b/configs/MPC837XERDB_defconfig
@@ -186,6 +186,7 @@  CONFIG_DM_ETH_PHY=y
 CONFIG_RGMII=y
 CONFIG_MII=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
diff --git a/configs/MPC8548CDS_36BIT_defconfig b/configs/MPC8548CDS_36BIT_defconfig
index a0e40921d941..f21485db7f96 100644
--- a/configs/MPC8548CDS_36BIT_defconfig
+++ b/configs/MPC8548CDS_36BIT_defconfig
@@ -52,6 +52,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_CONS_INDEX=2
 CONFIG_SYS_NS16550=y
 CONFIG_ADDR_MAP=y
diff --git a/configs/MPC8548CDS_defconfig b/configs/MPC8548CDS_defconfig
index e2b2131f5ee1..8ee6fdf0fdaa 100644
--- a/configs/MPC8548CDS_defconfig
+++ b/configs/MPC8548CDS_defconfig
@@ -51,5 +51,6 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_CONS_INDEX=2
 CONFIG_SYS_NS16550=y
diff --git a/configs/MPC8548CDS_legacy_defconfig b/configs/MPC8548CDS_legacy_defconfig
index 2923ba34ddcd..deb8e8d152f3 100644
--- a/configs/MPC8548CDS_legacy_defconfig
+++ b/configs/MPC8548CDS_legacy_defconfig
@@ -51,5 +51,6 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_CONS_INDEX=2
 CONFIG_SYS_NS16550=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig
index 9c09a9e61b54..d13a0a2356fc 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig
@@ -89,6 +89,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index 59c75692728d..363092aa5c07 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -70,6 +70,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index e8df2c3df531..600be10aa427 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -82,6 +82,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
index 7d2ccc7a22e4..e30780ba2af1 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -84,6 +84,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PA_NAND_defconfig b/configs/P1010RDB-PA_NAND_defconfig
index 9bd62ce6228d..3a3cd8962038 100644
--- a/configs/P1010RDB-PA_NAND_defconfig
+++ b/configs/P1010RDB-PA_NAND_defconfig
@@ -88,6 +88,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index abeb43342700..e8836eb58dca 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -69,6 +69,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
index a29ff2725e92..f998a53e34ba 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -81,6 +81,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_defconfig b/configs/P1010RDB-PA_SPIFLASH_defconfig
index 51923777c8b7..a9e4f48f445e 100644
--- a/configs/P1010RDB-PA_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_defconfig
@@ -83,6 +83,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_defconfig b/configs/P1010RDB-PB_36BIT_NAND_defconfig
index 5ba090bdaf16..5116d382b8e1 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig
@@ -91,6 +91,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index 44ba09cb3189..79b2d3dcaa09 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -72,6 +72,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index a895c61c7c6d..adade840841d 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -84,6 +84,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
index ce175e8e2482..fd901e3fea3b 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -86,6 +86,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_NAND_defconfig b/configs/P1010RDB-PB_NAND_defconfig
index e47a277b82ae..c29c6fc31d7c 100644
--- a/configs/P1010RDB-PB_NAND_defconfig
+++ b/configs/P1010RDB-PB_NAND_defconfig
@@ -90,6 +90,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index 46fbed2e3428..67361d6713b2 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -71,6 +71,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
index db47f4f8cd00..522c9b699cac 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -83,6 +83,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_defconfig b/configs/P1010RDB-PB_SPIFLASH_defconfig
index 5c549cc9921d..238209b85077 100644
--- a/configs/P1010RDB-PB_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_defconfig
@@ -85,6 +85,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_36BIT_NAND_defconfig b/configs/P1020RDB-PC_36BIT_NAND_defconfig
index 0ff1f41b842b..b4036e9a9553 100644
--- a/configs/P1020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig
@@ -90,6 +90,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index 9941c14aa351..1f1852513904 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -84,6 +84,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
index 6152ef9f3ef1..e46cdce875bb 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -86,6 +86,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index d7cc4dbc7df5..8e65175f6e93 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -73,6 +73,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_NAND_defconfig b/configs/P1020RDB-PC_NAND_defconfig
index 95d97ed735ef..031931019a8e 100644
--- a/configs/P1020RDB-PC_NAND_defconfig
+++ b/configs/P1020RDB-PC_NAND_defconfig
@@ -89,6 +89,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index 5d668ca660d9..93ed3adf3236 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -83,6 +83,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_SPIFLASH_defconfig b/configs/P1020RDB-PC_SPIFLASH_defconfig
index bc5f577468a1..88f5f9fefae6 100644
--- a/configs/P1020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_SPIFLASH_defconfig
@@ -85,6 +85,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
index 0778dc696331..2a3341a47b40 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -72,6 +72,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PD_NAND_defconfig b/configs/P1020RDB-PD_NAND_defconfig
index 17a1ab962a90..2d77f57dda7b 100644
--- a/configs/P1020RDB-PD_NAND_defconfig
+++ b/configs/P1020RDB-PD_NAND_defconfig
@@ -93,6 +93,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index 4f4e5f52686e..80b674bbc35d 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -87,6 +87,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PD_SPIFLASH_defconfig b/configs/P1020RDB-PD_SPIFLASH_defconfig
index 205ca03b493b..fe9725c05de8 100644
--- a/configs/P1020RDB-PD_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PD_SPIFLASH_defconfig
@@ -89,6 +89,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
index c7ba60ce321f..1cdf80008256 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -76,6 +76,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_36BIT_NAND_defconfig b/configs/P2020RDB-PC_36BIT_NAND_defconfig
index d34a129b52c6..353fb60fd3ca 100644
--- a/configs/P2020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig
@@ -95,6 +95,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index 282ed313f80c..239a1007c86b 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -89,6 +89,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
index fe2bf1af570a..ae52c0f509e8 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -91,6 +91,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index 92521518ea27..2f1c9ce25730 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -78,6 +78,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_NAND_defconfig b/configs/P2020RDB-PC_NAND_defconfig
index 3b57b0c1a640..7d73cd2698bd 100644
--- a/configs/P2020RDB-PC_NAND_defconfig
+++ b/configs/P2020RDB-PC_NAND_defconfig
@@ -94,6 +94,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index 32e509d78be3..7abdda04e943 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -88,6 +88,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_SPIFLASH_defconfig b/configs/P2020RDB-PC_SPIFLASH_defconfig
index bfee816e3a16..72420d7b8104 100644
--- a/configs/P2020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_SPIFLASH_defconfig
@@ -90,6 +90,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
index dbd2d8735820..cb7a4d97a22b 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -77,6 +77,7 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 CONFIG_PCIE_FSL=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2041RDB_NAND_defconfig b/configs/P2041RDB_NAND_defconfig
index d979b14c9c18..cd6a111b5d6c 100644
--- a/configs/P2041RDB_NAND_defconfig
+++ b/configs/P2041RDB_NAND_defconfig
@@ -65,6 +65,7 @@  CONFIG_FMAN_ENET=y
 CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2041RDB_SDCARD_defconfig b/configs/P2041RDB_SDCARD_defconfig
index 67c4f40f2b80..cce8fd5a145c 100644
--- a/configs/P2041RDB_SDCARD_defconfig
+++ b/configs/P2041RDB_SDCARD_defconfig
@@ -65,6 +65,7 @@  CONFIG_FMAN_ENET=y
 CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2041RDB_SPIFLASH_defconfig b/configs/P2041RDB_SPIFLASH_defconfig
index 6e0b99adadff..f5bb4099bea5 100644
--- a/configs/P2041RDB_SPIFLASH_defconfig
+++ b/configs/P2041RDB_SPIFLASH_defconfig
@@ -66,6 +66,7 @@  CONFIG_FMAN_ENET=y
 CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P2041RDB_defconfig b/configs/P2041RDB_defconfig
index 49e485defd7a..6ac6452965ee 100644
--- a/configs/P2041RDB_defconfig
+++ b/configs/P2041RDB_defconfig
@@ -61,6 +61,7 @@  CONFIG_FMAN_ENET=y
 CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P3041DS_NAND_defconfig b/configs/P3041DS_NAND_defconfig
index 7d6164de33d3..cb8a4df96dcf 100644
--- a/configs/P3041DS_NAND_defconfig
+++ b/configs/P3041DS_NAND_defconfig
@@ -64,6 +64,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P3041DS_SDCARD_defconfig b/configs/P3041DS_SDCARD_defconfig
index 43d0d312595a..9fd27ebe6b23 100644
--- a/configs/P3041DS_SDCARD_defconfig
+++ b/configs/P3041DS_SDCARD_defconfig
@@ -64,6 +64,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P3041DS_SPIFLASH_defconfig b/configs/P3041DS_SPIFLASH_defconfig
index f905a5aa6c1e..40f813efcafa 100644
--- a/configs/P3041DS_SPIFLASH_defconfig
+++ b/configs/P3041DS_SPIFLASH_defconfig
@@ -65,6 +65,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P3041DS_defconfig b/configs/P3041DS_defconfig
index 7406b1e4ff2a..66fde290adcc 100644
--- a/configs/P3041DS_defconfig
+++ b/configs/P3041DS_defconfig
@@ -60,6 +60,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P4080DS_SDCARD_defconfig b/configs/P4080DS_SDCARD_defconfig
index ed46a1bcd55e..6498adf67961 100644
--- a/configs/P4080DS_SDCARD_defconfig
+++ b/configs/P4080DS_SDCARD_defconfig
@@ -63,6 +63,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P4080DS_SPIFLASH_defconfig b/configs/P4080DS_SPIFLASH_defconfig
index ae46fd418d59..52b502f58690 100644
--- a/configs/P4080DS_SPIFLASH_defconfig
+++ b/configs/P4080DS_SPIFLASH_defconfig
@@ -64,6 +64,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P4080DS_defconfig b/configs/P4080DS_defconfig
index d9094b975f38..147bbf2b23a4 100644
--- a/configs/P4080DS_defconfig
+++ b/configs/P4080DS_defconfig
@@ -59,6 +59,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P5040DS_NAND_defconfig b/configs/P5040DS_NAND_defconfig
index 9707f0c80be0..03cd596e899d 100644
--- a/configs/P5040DS_NAND_defconfig
+++ b/configs/P5040DS_NAND_defconfig
@@ -65,6 +65,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P5040DS_SDCARD_defconfig b/configs/P5040DS_SDCARD_defconfig
index a1b4cf3f7f4e..1b0cb66f2870 100644
--- a/configs/P5040DS_SDCARD_defconfig
+++ b/configs/P5040DS_SDCARD_defconfig
@@ -64,6 +64,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P5040DS_SPIFLASH_defconfig b/configs/P5040DS_SPIFLASH_defconfig
index 27b009cf404a..25e427edaac6 100644
--- a/configs/P5040DS_SPIFLASH_defconfig
+++ b/configs/P5040DS_SPIFLASH_defconfig
@@ -65,6 +65,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/P5040DS_defconfig b/configs/P5040DS_defconfig
index 89924b498307..c3f3498841c7 100644
--- a/configs/P5040DS_defconfig
+++ b/configs/P5040DS_defconfig
@@ -60,6 +60,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1024RDB_NAND_defconfig b/configs/T1024RDB_NAND_defconfig
index dd12941f837e..c0fbb2d5a582 100644
--- a/configs/T1024RDB_NAND_defconfig
+++ b/configs/T1024RDB_NAND_defconfig
@@ -95,6 +95,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1024RDB_SDCARD_defconfig b/configs/T1024RDB_SDCARD_defconfig
index 82848a7ebbb1..51e817364b3d 100644
--- a/configs/T1024RDB_SDCARD_defconfig
+++ b/configs/T1024RDB_SDCARD_defconfig
@@ -93,6 +93,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1024RDB_SPIFLASH_defconfig b/configs/T1024RDB_SPIFLASH_defconfig
index a9424fad1fd3..595c0946b0e6 100644
--- a/configs/T1024RDB_SPIFLASH_defconfig
+++ b/configs/T1024RDB_SPIFLASH_defconfig
@@ -95,6 +95,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1024RDB_defconfig b/configs/T1024RDB_defconfig
index 8b07e21fbc62..dfa827dce68e 100644
--- a/configs/T1024RDB_defconfig
+++ b/configs/T1024RDB_defconfig
@@ -78,6 +78,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1042D4RDB_NAND_defconfig b/configs/T1042D4RDB_NAND_defconfig
index e92c98c61f02..68769af93d29 100644
--- a/configs/T1042D4RDB_NAND_defconfig
+++ b/configs/T1042D4RDB_NAND_defconfig
@@ -90,6 +90,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1042D4RDB_SDCARD_defconfig b/configs/T1042D4RDB_SDCARD_defconfig
index 6d9f777658a4..6919382c24d8 100644
--- a/configs/T1042D4RDB_SDCARD_defconfig
+++ b/configs/T1042D4RDB_SDCARD_defconfig
@@ -88,6 +88,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig
index b818e6315746..5e12e76522d1 100644
--- a/configs/T1042D4RDB_SPIFLASH_defconfig
+++ b/configs/T1042D4RDB_SPIFLASH_defconfig
@@ -90,6 +90,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T1042D4RDB_defconfig b/configs/T1042D4RDB_defconfig
index 2fdf4703eb52..c6174df5991a 100644
--- a/configs/T1042D4RDB_defconfig
+++ b/configs/T1042D4RDB_defconfig
@@ -73,6 +73,7 @@  CONFIG_MII=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080QDS_NAND_defconfig b/configs/T2080QDS_NAND_defconfig
index 0e37eb748f89..d9664c679c19 100644
--- a/configs/T2080QDS_NAND_defconfig
+++ b/configs/T2080QDS_NAND_defconfig
@@ -89,6 +89,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig
index 0046c7120a89..32dba249f72e 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -87,6 +87,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080QDS_SECURE_BOOT_defconfig b/configs/T2080QDS_SECURE_BOOT_defconfig
index dc3e98544a98..03dcbfc85885 100644
--- a/configs/T2080QDS_SECURE_BOOT_defconfig
+++ b/configs/T2080QDS_SECURE_BOOT_defconfig
@@ -71,6 +71,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig
index 9c1912e0d9b6..83ac438a1737 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -89,6 +89,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
index 344e2cb240b5..ed6674e2434a 100644
--- a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
@@ -64,6 +64,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_REMOTE=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080QDS_defconfig b/configs/T2080QDS_defconfig
index 1679ef1481fa..aabc00206775 100644
--- a/configs/T2080QDS_defconfig
+++ b/configs/T2080QDS_defconfig
@@ -72,6 +72,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig
index 4b0b78a0f254..970261555f60 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -97,6 +97,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index 68989d722d4c..d387db5312f8 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -95,6 +95,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index 6a9752ab416f..7b5e18e9e82d 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -97,6 +97,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig
index db0c09b87683..60f207e0395a 100644
--- a/configs/T2080RDB_defconfig
+++ b/configs/T2080RDB_defconfig
@@ -79,6 +79,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_revD_NAND_defconfig b/configs/T2080RDB_revD_NAND_defconfig
index 7255b525a8c3..70e67de72191 100644
--- a/configs/T2080RDB_revD_NAND_defconfig
+++ b/configs/T2080RDB_revD_NAND_defconfig
@@ -99,6 +99,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NAND=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_revD_SDCARD_defconfig b/configs/T2080RDB_revD_SDCARD_defconfig
index f7f37e861ba0..f8e9bfe9dfec 100644
--- a/configs/T2080RDB_revD_SDCARD_defconfig
+++ b/configs/T2080RDB_revD_SDCARD_defconfig
@@ -97,6 +97,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_revD_SPIFLASH_defconfig b/configs/T2080RDB_revD_SPIFLASH_defconfig
index f91e7a8b4494..7dd6af63f60f 100644
--- a/configs/T2080RDB_revD_SPIFLASH_defconfig
+++ b/configs/T2080RDB_revD_SPIFLASH_defconfig
@@ -99,6 +99,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T2080RDB_revD_defconfig b/configs/T2080RDB_revD_defconfig
index d20b57673ece..9769457d0fbb 100644
--- a/configs/T2080RDB_revD_defconfig
+++ b/configs/T2080RDB_revD_defconfig
@@ -81,6 +81,7 @@  CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index 6d6673673fdc..9d0cf56069c2 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -81,6 +81,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_MMC=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig
index a3ae720f907e..bebc03712f62 100644
--- a/configs/T4240RDB_defconfig
+++ b/configs/T4240RDB_defconfig
@@ -66,6 +66,7 @@  CONFIG_MII=y
 CONFIG_DM_PCI_COMPAT=y
 CONFIG_PCIE_FSL=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/UCP1020_defconfig b/configs/UCP1020_defconfig
index 8ac73d7f06d0..4f7f10122be7 100644
--- a/configs/UCP1020_defconfig
+++ b/configs/UCP1020_defconfig
@@ -63,6 +63,7 @@  CONFIG_PHY_GIGE=y
 CONFIG_E1000=y
 CONFIG_MII=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/alt_defconfig b/configs/alt_defconfig
index 966e2a185fcb..f2514a046a1a 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -88,6 +88,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index 1234aa2251e4..5c3bfc9b810c 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -72,6 +72,7 @@  CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
 # CONFIG_TWL4030_POWER is not set
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_OMAP3_SPI=y
diff --git a/configs/armadillo-800eva_defconfig b/configs/armadillo-800eva_defconfig
index 39e408ef69df..e75ca52ea7e7 100644
--- a/configs/armadillo-800eva_defconfig
+++ b/configs/armadillo-800eva_defconfig
@@ -42,5 +42,6 @@  CONFIG_VERSION_VARIABLE=y
 CONFIG_BITBANGMII=y
 CONFIG_PHY_SMSC=y
 CONFIG_SH_ETHER=y
+CONFIG_BAUDRATE_TABLE_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0_defconfig b/configs/avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0_defconfig
index 6a492665ddfd..781771522cf4 100644
--- a/configs/avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0_defconfig
+++ b/configs/avnet_ultrazedev_cc_v1_0_ultrazedev_som_v1_0_defconfig
@@ -57,6 +57,7 @@  CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
 CONFIG_ZYNQ_GEM=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ARM_DCC=y
diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig
index ec58dd253693..e5226b2a6b65 100644
--- a/configs/bcm7260_defconfig
+++ b/configs/bcm7260_defconfig
@@ -34,4 +34,5 @@  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCMSTB=y
 CONFIG_MTD=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 # CONFIG_EFI_LOADER is not set
diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig
index d5dd4b70102e..a502a6aa9ed6 100644
--- a/configs/bcm7445_defconfig
+++ b/configs/bcm7445_defconfig
@@ -36,6 +36,7 @@  CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_BCMSTB=y
 CONFIG_MTD=y
 CONFIG_DM_SPI_FLASH=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_BCMSTB_SPI=y
diff --git a/configs/bcm963158_ram_defconfig b/configs/bcm963158_ram_defconfig
index 5b6af9e215af..15e5ea5b326a 100644
--- a/configs/bcm963158_ram_defconfig
+++ b/configs/bcm963158_ram_defconfig
@@ -46,6 +46,7 @@  CONFIG_NAND_BRCMNAND=y
 CONFIG_NAND_BRCMNAND_63158=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_CONS_INDEX=0
 CONFIG_DM_SERIAL=y
diff --git a/configs/bcm968360bg_ram_defconfig b/configs/bcm968360bg_ram_defconfig
index bdc2e1ead79e..fc7d66b5a1f0 100644
--- a/configs/bcm968360bg_ram_defconfig
+++ b/configs/bcm968360bg_ram_defconfig
@@ -43,6 +43,7 @@  CONFIG_NAND_BRCMNAND_68360=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_CONS_INDEX=0
 CONFIG_DM_SERIAL=y
diff --git a/configs/bcm968380gerg_ram_defconfig b/configs/bcm968380gerg_ram_defconfig
index 855f1c24366a..576d43228ff5 100644
--- a/configs/bcm968380gerg_ram_defconfig
+++ b/configs/bcm968380gerg_ram_defconfig
@@ -55,6 +55,7 @@  CONFIG_POWER_DOMAIN=y
 CONFIG_BCM6328_POWER_DOMAIN=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_SYSRESET_WATCHDOG=y
diff --git a/configs/bcm968580xref_ram_defconfig b/configs/bcm968580xref_ram_defconfig
index c5ab9761cef0..925257385944 100644
--- a/configs/bcm968580xref_ram_defconfig
+++ b/configs/bcm968580xref_ram_defconfig
@@ -43,6 +43,7 @@  CONFIG_NAND_BRCMNAND_6858=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
 CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_CONS_INDEX=0
 CONFIG_DM_SERIAL=y
diff --git a/configs/bitmain_antminer_s9_defconfig b/configs/bitmain_antminer_s9_defconfig
index 79cff7505f4d..efd6533e9782 100644
--- a/configs/bitmain_antminer_s9_defconfig
+++ b/configs/bitmain_antminer_s9_defconfig
@@ -68,6 +68,7 @@  CONFIG_NAND_ZYNQ=y
 CONFIG_NAND_ZYNQ_USE_BOOTLOADER1_TIMINGS=y
 CONFIG_MII=y
 CONFIG_ZYNQ_GEM=y
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ARM_DCC=y
diff --git a/configs/blanche_defconfig b/configs/blanche_defconfig
index e3770cc84558..e34d29ce2589 100644
--- a/configs/blanche_defconfig
+++ b/configs/blanche_defconfig
@@ -66,6 +66,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/clearfog_gt_8k_defconfig b/configs/clearfog_gt_8k_defconfig
index 89b978db6bc4..21a770529d8e 100644
--- a/configs/clearfog_gt_8k_defconfig
+++ b/configs/clearfog_gt_8k_defconfig
@@ -64,6 +64,7 @@  CONFIG_MVEBU_COMPHY_SUPPORT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_8K=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/comtrend_ar5315u_ram_defconfig b/configs/comtrend_ar5315u_ram_defconfig
index 2278763adaed..bc86be43a111 100644
--- a/configs/comtrend_ar5315u_ram_defconfig
+++ b/configs/comtrend_ar5315u_ram_defconfig
@@ -55,6 +55,7 @@  CONFIG_BCM6318_USBH_PHY=y
 CONFIG_BCM6328_POWER_DOMAIN=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_SPI=y
diff --git a/configs/comtrend_ar5387un_ram_defconfig b/configs/comtrend_ar5387un_ram_defconfig
index 7497ac2baee4..b295f7c73f84 100644
--- a/configs/comtrend_ar5387un_ram_defconfig
+++ b/configs/comtrend_ar5387un_ram_defconfig
@@ -56,6 +56,7 @@  CONFIG_POWER_DOMAIN=y
 CONFIG_BCM6328_POWER_DOMAIN=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_SPI=y
diff --git a/configs/comtrend_ct5361_ram_defconfig b/configs/comtrend_ct5361_ram_defconfig
index 647031014a2c..d4fcd1aa98e7 100644
--- a/configs/comtrend_ct5361_ram_defconfig
+++ b/configs/comtrend_ct5361_ram_defconfig
@@ -54,6 +54,7 @@  CONFIG_PHY=y
 CONFIG_BCM6348_USBH_PHY=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_USB=y
diff --git a/configs/comtrend_vr3032u_ram_defconfig b/configs/comtrend_vr3032u_ram_defconfig
index 2cb0bac6c802..61a916ebeedd 100644
--- a/configs/comtrend_vr3032u_ram_defconfig
+++ b/configs/comtrend_vr3032u_ram_defconfig
@@ -57,6 +57,7 @@  CONFIG_POWER_DOMAIN=y
 CONFIG_BCM6328_POWER_DOMAIN=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_USB=y
diff --git a/configs/comtrend_wap5813n_ram_defconfig b/configs/comtrend_wap5813n_ram_defconfig
index 8864a1342411..8ba7bd0d9d32 100644
--- a/configs/comtrend_wap5813n_ram_defconfig
+++ b/configs/comtrend_wap5813n_ram_defconfig
@@ -54,6 +54,7 @@  CONFIG_PHY=y
 CONFIG_BCM6368_USBH_PHY=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_USB=y
diff --git a/configs/devkit3250_defconfig b/configs/devkit3250_defconfig
index a1d277914167..5066fd4dea07 100644
--- a/configs/devkit3250_defconfig
+++ b/configs/devkit3250_defconfig
@@ -57,6 +57,7 @@  CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_ADDR=31
 CONFIG_PHY_SMSC=y
+CONFIG_BAUDRATE_TABLE_9600_TO_460800=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_CONS_INDEX=5
 CONFIG_SYS_NS16550=y
diff --git a/configs/devkit8000_defconfig b/configs/devkit8000_defconfig
index 0ec943a4ae32..63c6146204d4 100644
--- a/configs/devkit8000_defconfig
+++ b/configs/devkit8000_defconfig
@@ -42,5 +42,6 @@  CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_CONS_INDEX=3
 CONFIG_OF_LIBFDT=y
diff --git a/configs/ea-lpc3250devkitv2_defconfig b/configs/ea-lpc3250devkitv2_defconfig
index 8d9a905c4271..0df62c0ab783 100644
--- a/configs/ea-lpc3250devkitv2_defconfig
+++ b/configs/ea-lpc3250devkitv2_defconfig
@@ -22,6 +22,7 @@  CONFIG_OF_CONTROL=y
 CONFIG_LPC32XX_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_LPC32XX=y
+CONFIG_BAUDRATE_TABLE_9600_TO_460800=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_CONS_INDEX=5
 CONFIG_SYS_NS16550=y
diff --git a/configs/edminiv2_defconfig b/configs/edminiv2_defconfig
index e74f4dbed95c..bfeb4edb21bb 100644
--- a/configs/edminiv2_defconfig
+++ b/configs/edminiv2_defconfig
@@ -43,5 +43,6 @@  CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
diff --git a/configs/gardena-smart-gateway-mt7688_defconfig b/configs/gardena-smart-gateway-mt7688_defconfig
index 6b1f9ac2d6b6..a2fe9aadc67a 100644
--- a/configs/gardena-smart-gateway-mt7688_defconfig
+++ b/configs/gardena-smart-gateway-mt7688_defconfig
@@ -89,6 +89,7 @@  CONFIG_MTD_UBI_BEB_LIMIT=22
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_MT7628_ETH=y
 CONFIG_PHY=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SPI=y
 CONFIG_MT7621_SPI=y
diff --git a/configs/gazerbeam_defconfig b/configs/gazerbeam_defconfig
index 91f913493d40..ff8133193101 100644
--- a/configs/gazerbeam_defconfig
+++ b/configs/gazerbeam_defconfig
@@ -192,6 +192,7 @@  CONFIG_TSEC_ENET=y
 CONFIG_RAM=y
 CONFIG_MPC83XX_SDRAM=y
 CONFIG_DM_RESET=y
+CONFIG_BAUDRATE_TABLE_300_TO_115200=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_SYSINFO=y
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index b51cb4add072..9b0dc84653fc 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -86,6 +86,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/hihope_rzg2_defconfig b/configs/hihope_rzg2_defconfig
index f0d07fcd185e..86e2d64f0175 100644
--- a/configs/hihope_rzg2_defconfig
+++ b/configs/hihope_rzg2_defconfig
@@ -65,6 +65,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/huawei_hg556a_ram_defconfig b/configs/huawei_hg556a_ram_defconfig
index 81a412bed796..0b0bf6d7d15e 100644
--- a/configs/huawei_hg556a_ram_defconfig
+++ b/configs/huawei_hg556a_ram_defconfig
@@ -54,6 +54,7 @@  CONFIG_PHY=y
 CONFIG_BCM6358_USBH_PHY=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_USB=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index 8435de16338d..499191b26752 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -183,5 +183,6 @@  CONFIG_MII=y
 CONFIG_TSEC_ENET=y
 # CONFIG_PCI is not set
 CONFIG_RTC_PCF8563=y
+CONFIG_BAUDRATE_TABLE_300_TO_38400_115200=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig
index da0d5982b9ab..6678734ac110 100644
--- a/configs/igep00x0_defconfig
+++ b/configs/igep00x0_defconfig
@@ -65,6 +65,7 @@  CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x2C000000
 CONFIG_SMC911X_32_BIT=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_CONS_INDEX=3
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index d6624dd9551d..90ff714fee11 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -62,6 +62,7 @@  CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_KIRKWOOD_SPI=y
diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig
index bf696cd2db28..e24c69b1f200 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -62,6 +62,7 @@  CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_KIRKWOOD_SPI=y
diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig
index 0731bb557293..cd31a5224b55 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -63,6 +63,7 @@  CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_KIRKWOOD_SPI=y
diff --git a/configs/kmcent2_defconfig b/configs/kmcent2_defconfig
index dafd5dacbcea..578987ca4939 100644
--- a/configs/kmcent2_defconfig
+++ b/configs/kmcent2_defconfig
@@ -73,6 +73,7 @@  CONFIG_PCI_REGION_MULTI_ENTRY=y
 CONFIG_PCIE_FSL=y
 CONFIG_U_QE=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index 9a56f44c7cc6..8cda8595cdfe 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -214,5 +214,6 @@  CONFIG_QE_UEC=y
 # CONFIG_PCI is not set
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_QE=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_BCH=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index 12aa23095cce..97c0700b485c 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -66,6 +66,7 @@  CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_KIRKWOOD_SPI=y
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index e1bce4a7d074..77d9d0b386fa 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -182,4 +182,5 @@  CONFIG_DM_ETH_PHY=y
 CONFIG_QE_UEC=y
 # CONFIG_PCI is not set
 CONFIG_QE=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index 06b2d1fb571d..ba5e0c94ee63 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -67,6 +67,7 @@  CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MV88E6352_SWITCH=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_KIRKWOOD_SPI=y
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index 75ab1ae1a787..1a403e2cc745 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -194,4 +194,5 @@  CONFIG_QE_UEC=y
 # CONFIG_PCI is not set
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_QE=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index be5034f4d70f..e615cf2510c0 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -173,4 +173,5 @@  CONFIG_QE_UEC=y
 # CONFIG_PCI is not set
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_QE=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/kmsuse2_defconfig b/configs/kmsuse2_defconfig
index a528bf5cfe90..c0130eaf58ad 100644
--- a/configs/kmsuse2_defconfig
+++ b/configs/kmsuse2_defconfig
@@ -67,6 +67,7 @@  CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
 CONFIG_KIRKWOOD_SPI=y
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
index 315ba867b5f4..143ba9a9fcaa 100644
--- a/configs/kmtegr1_defconfig
+++ b/configs/kmtegr1_defconfig
@@ -179,5 +179,6 @@  CONFIG_QE_UEC=y
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_QE=y
 CONFIG_SYS_QE_FMAN_FW_IN_NOR=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_BCH=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index 4c5509bfc129..6b3aaba081e0 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -193,4 +193,5 @@  CONFIG_QE_UEC=y
 # CONFIG_PCI is not set
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_QE=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig
index b254879741b4..5c00b11161f2 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -86,6 +86,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/kzm9g_defconfig b/configs/kzm9g_defconfig
index af611dbe081c..4f8dc6546305 100644
--- a/configs/kzm9g_defconfig
+++ b/configs/kzm9g_defconfig
@@ -36,6 +36,7 @@  CONFIG_SYS_FLASH_CFI=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x10000000
 CONFIG_SMC911X_32_BIT=y
+CONFIG_BAUDRATE_TABLE_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 # CONFIG_FAT_WRITE is not set
 CONFIG_OF_LIBFDT=y
diff --git a/configs/lager_defconfig b/configs/lager_defconfig
index 2d323ed0f82b..a6a4427c30d3 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -88,6 +88,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/linkit-smart-7688_defconfig b/configs/linkit-smart-7688_defconfig
index b217f83c36ca..81055e72859d 100644
--- a/configs/linkit-smart-7688_defconfig
+++ b/configs/linkit-smart-7688_defconfig
@@ -65,6 +65,7 @@  CONFIG_SPI_FLASH_MTD=y
 CONFIG_MT7628_ETH=y
 CONFIG_PHY=y
 CONFIG_MT76X8_USB_PHY=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_CONS_INDEX=3
 CONFIG_SPI=y
diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 8db9bacd3b82..030cf32b73a2 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -77,6 +77,7 @@  CONFIG_PHY_VITESSE=y
 CONFIG_DM_ETH=y
 CONFIG_XILINX_AXIEMAC=y
 CONFIG_XILINX_EMACLITE=y
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_SYS_NS16550=y
 CONFIG_XILINX_UARTLITE=y
 CONFIG_XILINX_SPI=y
diff --git a/configs/mt7628_rfb_defconfig b/configs/mt7628_rfb_defconfig
index 1e051311a79e..6f1281e64ae8 100644
--- a/configs/mt7628_rfb_defconfig
+++ b/configs/mt7628_rfb_defconfig
@@ -46,6 +46,7 @@  CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_XMC=y
 CONFIG_MT7628_ETH=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_SPI=y
 CONFIG_MT7621_SPI=y
 CONFIG_LZMA=y
diff --git a/configs/mvebu_crb_cn9130_defconfig b/configs/mvebu_crb_cn9130_defconfig
index f0f50a96697e..7ea38ba5f8d6 100644
--- a/configs/mvebu_crb_cn9130_defconfig
+++ b/configs/mvebu_crb_cn9130_defconfig
@@ -69,6 +69,7 @@  CONFIG_PHY=y
 CONFIG_MVEBU_COMPHY_SUPPORT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_8K=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/mvebu_db-88f3720_defconfig b/configs/mvebu_db-88f3720_defconfig
index 50695ea21ba1..9f3a00bd5d4c 100644
--- a/configs/mvebu_db-88f3720_defconfig
+++ b/configs/mvebu_db-88f3720_defconfig
@@ -64,6 +64,7 @@  CONFIG_PHY=y
 CONFIG_MVEBU_COMPHY_SUPPORT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_37XX=y
+CONFIG_BAUDRATE_TABLE_300_TO_6000000=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_MVEBU_A3700_UART=y
diff --git a/configs/mvebu_db_armada8k_defconfig b/configs/mvebu_db_armada8k_defconfig
index 4ad6d4d7e25a..2dfe87fa04db 100644
--- a/configs/mvebu_db_armada8k_defconfig
+++ b/configs/mvebu_db_armada8k_defconfig
@@ -58,6 +58,7 @@  CONFIG_PHY=y
 CONFIG_MVEBU_COMPHY_SUPPORT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_8K=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/mvebu_db_cn9130_defconfig b/configs/mvebu_db_cn9130_defconfig
index ec020ab1dd5c..d3fc96aad98d 100644
--- a/configs/mvebu_db_cn9130_defconfig
+++ b/configs/mvebu_db_cn9130_defconfig
@@ -73,6 +73,7 @@  CONFIG_PHY=y
 CONFIG_MVEBU_COMPHY_SUPPORT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_8K=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
index a3fb223da7f9..d4f9f7a3bac8 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -78,6 +78,7 @@  CONFIG_MVEBU_COMPHY_SUPPORT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_37XX=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_300_TO_6000000=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_MVEBU_A3700_UART=y
diff --git a/configs/mvebu_mcbin-88f8040_defconfig b/configs/mvebu_mcbin-88f8040_defconfig
index 44f16b62cfb8..87e38472b171 100644
--- a/configs/mvebu_mcbin-88f8040_defconfig
+++ b/configs/mvebu_mcbin-88f8040_defconfig
@@ -64,6 +64,7 @@  CONFIG_MVEBU_COMPHY_SUPPORT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_8K=y
 CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/mvebu_puzzle-m801-88f8040_defconfig b/configs/mvebu_puzzle-m801-88f8040_defconfig
index c521f2c1015b..206b3620423c 100644
--- a/configs/mvebu_puzzle-m801-88f8040_defconfig
+++ b/configs/mvebu_puzzle-m801-88f8040_defconfig
@@ -70,6 +70,7 @@  CONFIG_PINCTRL_ARMADA_8K=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RX8010SJ=y
+CONFIG_BAUDRATE_TABLE_9600_TO_921600=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/netgear_cg3100d_ram_defconfig b/configs/netgear_cg3100d_ram_defconfig
index b961b58ac394..3659001d4724 100644
--- a/configs/netgear_cg3100d_ram_defconfig
+++ b/configs/netgear_cg3100d_ram_defconfig
@@ -47,6 +47,7 @@  CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_MTD=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_SPI=y
diff --git a/configs/netgear_dgnd3700v2_ram_defconfig b/configs/netgear_dgnd3700v2_ram_defconfig
index 89638d33de6e..d0683aa3c314 100644
--- a/configs/netgear_dgnd3700v2_ram_defconfig
+++ b/configs/netgear_dgnd3700v2_ram_defconfig
@@ -54,6 +54,7 @@  CONFIG_POWER_DOMAIN=y
 CONFIG_BCM6328_POWER_DOMAIN=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_USB=y
diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
index 69784d972ad5..ea8f838a8fe3 100644
--- a/configs/nokia_rx51_defconfig
+++ b/configs/nokia_rx51_defconfig
@@ -67,6 +67,7 @@  CONFIG_DM_I2C=y
 # CONFIG_MMC_VERBOSE is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_CONS_INDEX=3
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
diff --git a/configs/omap35_logic_defconfig b/configs/omap35_logic_defconfig
index d699efb2faca..17466b7826eb 100644
--- a/configs/omap35_logic_defconfig
+++ b/configs/omap35_logic_defconfig
@@ -70,6 +70,7 @@  CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/omap35_logic_somlv_defconfig b/configs/omap35_logic_somlv_defconfig
index 4e31f77049a3..8593d081de1e 100644
--- a/configs/omap35_logic_somlv_defconfig
+++ b/configs/omap35_logic_somlv_defconfig
@@ -75,6 +75,7 @@  CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index 89b2bff5925a..a5eaeb268792 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -78,6 +78,7 @@  CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
 CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
 CONFIG_DM_ETH=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_OMAP3_SPI=y
diff --git a/configs/omap3_evm_defconfig b/configs/omap3_evm_defconfig
index bebd1de7712b..703e8a5acfb6 100644
--- a/configs/omap3_evm_defconfig
+++ b/configs/omap3_evm_defconfig
@@ -67,6 +67,7 @@  CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
 CONFIG_DM_ETH=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_32_BIT=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_OMAP3_SPI=y
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index 9424755b31bc..ab75413973b3 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -70,6 +70,7 @@  CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/omap3_logic_somlv_defconfig b/configs/omap3_logic_somlv_defconfig
index 96f9c6bcaaaa..6d39d0362e43 100644
--- a/configs/omap3_logic_somlv_defconfig
+++ b/configs/omap3_logic_somlv_defconfig
@@ -76,6 +76,7 @@  CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/pg_wcom_expu1_defconfig b/configs/pg_wcom_expu1_defconfig
index 6426a332a0af..afe1de54ef4f 100644
--- a/configs/pg_wcom_expu1_defconfig
+++ b/configs/pg_wcom_expu1_defconfig
@@ -69,6 +69,7 @@  CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_MII=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/pg_wcom_seli8_defconfig b/configs/pg_wcom_seli8_defconfig
index 05ba20d52b95..e9c76fac556f 100644
--- a/configs/pg_wcom_seli8_defconfig
+++ b/configs/pg_wcom_seli8_defconfig
@@ -69,6 +69,7 @@  CONFIG_DM_MDIO=y
 CONFIG_PHY_GIGE=y
 CONFIG_MII=y
 CONFIG_TSEC_ENET=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index 4708c7442877..717bc45344cf 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -86,6 +86,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/r8a774a1_beacon_defconfig b/configs/r8a774a1_beacon_defconfig
index fb6a831a66fb..a0287b62e1bc 100644
--- a/configs/r8a774a1_beacon_defconfig
+++ b/configs/r8a774a1_beacon_defconfig
@@ -56,6 +56,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_USB=y
diff --git a/configs/r8a774b1_beacon_defconfig b/configs/r8a774b1_beacon_defconfig
index 96160567d968..2e4b9a9f0ed0 100644
--- a/configs/r8a774b1_beacon_defconfig
+++ b/configs/r8a774b1_beacon_defconfig
@@ -58,6 +58,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
diff --git a/configs/r8a774e1_beacon_defconfig b/configs/r8a774e1_beacon_defconfig
index 098e41fe9c4e..8c7b8404ea5d 100644
--- a/configs/r8a774e1_beacon_defconfig
+++ b/configs/r8a774e1_beacon_defconfig
@@ -56,6 +56,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_USB=y
diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig
index bf6cdd538e35..fa7cb51adf9d 100644
--- a/configs/r8a77970_eagle_defconfig
+++ b/configs/r8a77970_eagle_defconfig
@@ -62,6 +62,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/r8a77980_condor_defconfig b/configs/r8a77980_condor_defconfig
index 1c9abad4d68d..0d28aa8251f4 100644
--- a/configs/r8a77980_condor_defconfig
+++ b/configs/r8a77980_condor_defconfig
@@ -63,6 +63,7 @@  CONFIG_SH_ETHER=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/r8a77990_ebisu_defconfig b/configs/r8a77990_ebisu_defconfig
index 6ba8b3a502af..3a27668d7f07 100644
--- a/configs/r8a77990_ebisu_defconfig
+++ b/configs/r8a77990_ebisu_defconfig
@@ -78,6 +78,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index 23a4c87e73a4..60619d3c42f3 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -72,6 +72,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/r8a779a0_falcon_defconfig b/configs/r8a779a0_falcon_defconfig
index 0151ca5dfd6e..488272161bef 100644
--- a/configs/r8a779a0_falcon_defconfig
+++ b/configs/r8a779a0_falcon_defconfig
@@ -59,6 +59,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig
index 3b48ab2751b2..6d95761376c5 100644
--- a/configs/rcar3_salvator-x_defconfig
+++ b/configs/rcar3_salvator-x_defconfig
@@ -83,6 +83,7 @@  CONFIG_PCI_RCAR_GEN3=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/rcar3_ulcb_defconfig b/configs/rcar3_ulcb_defconfig
index 1213baa6146a..724f3252f80e 100644
--- a/configs/rcar3_ulcb_defconfig
+++ b/configs/rcar3_ulcb_defconfig
@@ -80,6 +80,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/sagem_f@st1704_ram_defconfig b/configs/sagem_f@st1704_ram_defconfig
index 35ce6ae8776d..44debab6acf7 100644
--- a/configs/sagem_f@st1704_ram_defconfig
+++ b/configs/sagem_f@st1704_ram_defconfig
@@ -52,6 +52,7 @@  CONFIG_DM_ETH=y
 CONFIG_BCM6348_ETH=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_SPI=y
diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig
index df9633d762a2..08d3c186b7c3 100644
--- a/configs/sandbox64_defconfig
+++ b/configs/sandbox64_defconfig
@@ -197,6 +197,7 @@  CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RNG=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_SMEM=y
 CONFIG_SANDBOX_SMEM=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index f1067b9adaaf..217f99dfc6f6 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -247,6 +247,7 @@  CONFIG_RESET_SCMI=y
 CONFIG_DM_RNG=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_RV8803=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_SMEM=y
 CONFIG_SANDBOX_SMEM=y
diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig
index 11015744e7a4..5701e83c2d7d 100644
--- a/configs/sandbox_flattree_defconfig
+++ b/configs/sandbox_flattree_defconfig
@@ -172,6 +172,7 @@  CONFIG_REMOTEPROC_SANDBOX=y
 CONFIG_DM_RESET=y
 CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_SOUND=y
 CONFIG_SOUND_SANDBOX=y
diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig
index 6469260b53bf..39c236813d72 100644
--- a/configs/sandbox_noinst_defconfig
+++ b/configs/sandbox_noinst_defconfig
@@ -189,6 +189,7 @@  CONFIG_DM_RESET=y
 CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RTC=y
 CONFIG_SPL_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_SOUND=y
 CONFIG_SOUND_SANDBOX=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 3e9877c3ecfa..91c094aa2415 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -191,6 +191,7 @@  CONFIG_DM_RESET=y
 CONFIG_SANDBOX_RESET=y
 CONFIG_DM_RTC=y
 CONFIG_SPL_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_SOUND=y
 CONFIG_SOUND_SANDBOX=y
diff --git a/configs/sfr_nb4-ser_ram_defconfig b/configs/sfr_nb4-ser_ram_defconfig
index bbcb944212be..11e964a989a1 100644
--- a/configs/sfr_nb4-ser_ram_defconfig
+++ b/configs/sfr_nb4-ser_ram_defconfig
@@ -56,6 +56,7 @@  CONFIG_PHY=y
 CONFIG_BCM6358_USBH_PHY=y
 CONFIG_DM_RESET=y
 CONFIG_RESET_BCM6345=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000=y
 CONFIG_DM_SERIAL=y
 CONFIG_BCM6345_SERIAL=y
 CONFIG_USB=y
diff --git a/configs/silinux_ek874_defconfig b/configs/silinux_ek874_defconfig
index 1c340ea45042..fdab393a4195 100644
--- a/configs/silinux_ek874_defconfig
+++ b/configs/silinux_ek874_defconfig
@@ -60,6 +60,7 @@  CONFIG_RENESAS_RAVB=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SOC_DEVICE=y
 CONFIG_SPI=y
diff --git a/configs/silk_defconfig b/configs/silk_defconfig
index 4a3b15ef957c..da12135eedac 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -88,6 +88,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/sniper_defconfig b/configs/sniper_defconfig
index 76e77e8ec486..c86bbaab47fa 100644
--- a/configs/sniper_defconfig
+++ b/configs/sniper_defconfig
@@ -28,5 +28,6 @@  CONFIG_SPL_SYS_I2C_LEGACY=y
 CONFIG_SYS_I2C_SPEED=400000
 CONFIG_TWL4030_INPUT=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_CONS_INDEX=3
 CONFIG_OF_LIBFDT=y
diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index bf793d967247..80f57754bf11 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -47,6 +47,7 @@  CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index b4a5290f22d9..07c7a9aaad8e 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -86,6 +86,7 @@  CONFIG_PINCTRL_PFC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_38400_115200_ONLY=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
diff --git a/configs/syzygy_hub_defconfig b/configs/syzygy_hub_defconfig
index 6e4e101a8813..2db3894663bb 100644
--- a/configs/syzygy_hub_defconfig
+++ b/configs/syzygy_hub_defconfig
@@ -50,6 +50,7 @@  CONFIG_PHY_REALTEK=y
 CONFIG_PHY_XILINX=y
 CONFIG_MII=y
 CONFIG_ZYNQ_GEM=y
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_ARM_DCC=y
 CONFIG_ZYNQ_SERIAL=y
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index 64a015b3557b..4b351e636f55 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -26,6 +26,7 @@  CONFIG_SANDBOX_GPIO=y
 CONFIG_PCI=y
 CONFIG_PCI_SANDBOX=y
 CONFIG_DM_RTC=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_SOUND=y
 CONFIG_SYSRESET=y
 # CONFIG_VIRTIO_MMIO is not set
diff --git a/configs/topic_miami_defconfig b/configs/topic_miami_defconfig
index b43e546ded80..0513b43a0faf 100644
--- a/configs/topic_miami_defconfig
+++ b/configs/topic_miami_defconfig
@@ -50,6 +50,7 @@  CONFIG_SF_DEFAULT_MODE=0
 CONFIG_SF_DEFAULT_SPEED=108000000
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_ARM_DCC=y
 CONFIG_ZYNQ_SERIAL=y
diff --git a/configs/topic_miamilite_defconfig b/configs/topic_miamilite_defconfig
index a8a0ff22473e..426744abb70f 100644
--- a/configs/topic_miamilite_defconfig
+++ b/configs/topic_miamilite_defconfig
@@ -50,6 +50,7 @@  CONFIG_SF_DEFAULT_MODE=0
 CONFIG_SF_DEFAULT_SPEED=108000000
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_ARM_DCC=y
 CONFIG_ZYNQ_SERIAL=y
diff --git a/configs/topic_miamiplus_defconfig b/configs/topic_miamiplus_defconfig
index 7f8cb4bbdba1..43b2138d39a4 100644
--- a/configs/topic_miamiplus_defconfig
+++ b/configs/topic_miamiplus_defconfig
@@ -50,6 +50,7 @@  CONFIG_SF_DEFAULT_SPEED=108000000
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
 # CONFIG_NETDEVICES is not set
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_ARM_DCC=y
 CONFIG_ZYNQ_SERIAL=y
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index a8fa07c4c072..759b148a0eb2 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -173,4 +173,5 @@  CONFIG_QE_UEC=y
 # CONFIG_PCI is not set
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_QE=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig
index 9188c1833cb9..74af81ce7b73 100644
--- a/configs/turris_mox_defconfig
+++ b/configs/turris_mox_defconfig
@@ -82,6 +82,7 @@  CONFIG_PINCTRL_ARMADA_37XX=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_RTC=y
 CONFIG_RTC_DS1307=y
+CONFIG_BAUDRATE_TABLE_300_TO_6000000=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_MVEBU_A3700_UART=y
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index fd94323384ef..8f977399f8f6 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -196,4 +196,5 @@  CONFIG_QE_UEC=y
 # CONFIG_PCI is not set
 # CONFIG_PINCTRL_FULL is not set
 CONFIG_QE=y
+CONFIG_BAUDRATE_TABLE_9600_TO_230400=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig
index 202c5639bb67..0f138f329ea9 100644
--- a/configs/uDPU_defconfig
+++ b/configs/uDPU_defconfig
@@ -80,6 +80,7 @@  CONFIG_PINCTRL=y
 CONFIG_PINCTRL_ARMADA_37XX=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_BAUDRATE_TABLE_300_TO_6000000=y
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_MVEBU_A3700_UART=y
diff --git a/configs/work_92105_defconfig b/configs/work_92105_defconfig
index b09c855ed4b9..9fd085c75c15 100644
--- a/configs/work_92105_defconfig
+++ b/configs/work_92105_defconfig
@@ -57,6 +57,7 @@  CONFIG_MTD_RAW_NAND=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_SMSC=y
+CONFIG_BAUDRATE_TABLE_9600_TO_460800=y
 CONFIG_SPECIFY_CONSOLE_INDEX=y
 CONFIG_CONS_INDEX=5
 CONFIG_SYS_NS16550=y
diff --git a/configs/xilinx_versal_mini_defconfig b/configs/xilinx_versal_mini_defconfig
index 1dbed048716f..465c66139f4d 100644
--- a/configs/xilinx_versal_mini_defconfig
+++ b/configs/xilinx_versal_mini_defconfig
@@ -55,6 +55,7 @@  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_DM_WARN is not set
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_MMC is not set
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 # CONFIG_GZIP is not set
 # CONFIG_EFI_LOADER is not set
diff --git a/configs/xilinx_versal_mini_emmc0_defconfig b/configs/xilinx_versal_mini_emmc0_defconfig
index ef5433cae871..d038c8c4241a 100644
--- a/configs/xilinx_versal_mini_emmc0_defconfig
+++ b/configs/xilinx_versal_mini_emmc0_defconfig
@@ -54,6 +54,7 @@  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ZYNQMP_FIRMWARE=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_FAT_WRITE=y
 # CONFIG_GZIP is not set
diff --git a/configs/xilinx_versal_mini_emmc1_defconfig b/configs/xilinx_versal_mini_emmc1_defconfig
index f642977d86eb..a9d65b161eda 100644
--- a/configs/xilinx_versal_mini_emmc1_defconfig
+++ b/configs/xilinx_versal_mini_emmc1_defconfig
@@ -54,6 +54,7 @@  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ZYNQMP_FIRMWARE=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_FAT_WRITE=y
 # CONFIG_GZIP is not set
diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
index 11598623954d..28a525dadc60 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ b/configs/xilinx_versal_virt_defconfig
@@ -92,6 +92,7 @@  CONFIG_PHY_GIGE=y
 CONFIG_XILINX_AXIEMAC=y
 CONFIG_XILINX_AXIMRMAC=y
 CONFIG_ZYNQ_GEM=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_PL01X_SERIAL=y
 CONFIG_XILINX_UARTLITE=y
diff --git a/configs/xilinx_zynq_virt_defconfig b/configs/xilinx_zynq_virt_defconfig
index 3730fcc2230e..1cb7dc508d09 100644
--- a/configs/xilinx_zynq_virt_defconfig
+++ b/configs/xilinx_zynq_virt_defconfig
@@ -105,6 +105,7 @@  CONFIG_PHY_REALTEK=y
 CONFIG_PHY_XILINX=y
 CONFIG_MII=y
 CONFIG_ZYNQ_GEM=y
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_ARM_DCC=y
 CONFIG_ZYNQ_SERIAL=y
 CONFIG_ZYNQ_SPI=y
diff --git a/configs/xilinx_zynqmp_mini_defconfig b/configs/xilinx_zynqmp_mini_defconfig
index 736586edbb04..fdd9c9f7324d 100644
--- a/configs/xilinx_zynqmp_mini_defconfig
+++ b/configs/xilinx_zynqmp_mini_defconfig
@@ -55,6 +55,7 @@  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 # CONFIG_DM_WARN is not set
 # CONFIG_DM_DEVICE_REMOVE is not set
 # CONFIG_MMC is not set
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
diff --git a/configs/xilinx_zynqmp_mini_emmc0_defconfig b/configs/xilinx_zynqmp_mini_emmc0_defconfig
index 4143597709b6..8497be3856fa 100644
--- a/configs/xilinx_zynqmp_mini_emmc0_defconfig
+++ b/configs/xilinx_zynqmp_mini_emmc0_defconfig
@@ -60,6 +60,7 @@  CONFIG_ZYNQMP_FIRMWARE=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
diff --git a/configs/xilinx_zynqmp_mini_emmc1_defconfig b/configs/xilinx_zynqmp_mini_emmc1_defconfig
index 3317eb5a6739..664328b13d0e 100644
--- a/configs/xilinx_zynqmp_mini_emmc1_defconfig
+++ b/configs/xilinx_zynqmp_mini_emmc1_defconfig
@@ -60,6 +60,7 @@  CONFIG_ZYNQMP_FIRMWARE=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
diff --git a/configs/xilinx_zynqmp_mini_nand_defconfig b/configs/xilinx_zynqmp_mini_nand_defconfig
index 533ba373305a..ed978f2d571b 100644
--- a/configs/xilinx_zynqmp_mini_nand_defconfig
+++ b/configs/xilinx_zynqmp_mini_nand_defconfig
@@ -55,6 +55,7 @@  CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ARASAN=y
 CONFIG_SYS_NAND_MAX_CHIPS=2
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
diff --git a/configs/xilinx_zynqmp_mini_nand_single_defconfig b/configs/xilinx_zynqmp_mini_nand_single_defconfig
index 34fd34723248..d2f6708d0b4a 100644
--- a/configs/xilinx_zynqmp_mini_nand_single_defconfig
+++ b/configs/xilinx_zynqmp_mini_nand_single_defconfig
@@ -54,6 +54,7 @@  CONFIG_MTD=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ARASAN=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_PANIC_HANG=y
 # CONFIG_GZIP is not set
diff --git a/configs/xilinx_zynqmp_mini_qspi_defconfig b/configs/xilinx_zynqmp_mini_qspi_defconfig
index ea379e240e1f..2aa91cbc5f96 100644
--- a/configs/xilinx_zynqmp_mini_qspi_defconfig
+++ b/configs/xilinx_zynqmp_mini_qspi_defconfig
@@ -62,6 +62,7 @@  CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_SPI=y
 CONFIG_ZYNQMP_GQSPI=y
diff --git a/configs/xilinx_zynqmp_r5_defconfig b/configs/xilinx_zynqmp_r5_defconfig
index 8f3585d8c26d..f4a88804d899 100644
--- a/configs/xilinx_zynqmp_r5_defconfig
+++ b/configs/xilinx_zynqmp_r5_defconfig
@@ -19,6 +19,7 @@  CONFIG_CMD_BOOTSTAGE=y
 CONFIG_OF_EMBED=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_ZYNQ_SERIAL=y
 CONFIG_TIMER=y
 CONFIG_CADENCE_TTC_TIMER=y
diff --git a/configs/xilinx_zynqmp_virt_defconfig b/configs/xilinx_zynqmp_virt_defconfig
index 278eaae8bffd..ec39594f8357 100644
--- a/configs/xilinx_zynqmp_virt_defconfig
+++ b/configs/xilinx_zynqmp_virt_defconfig
@@ -164,6 +164,7 @@  CONFIG_RTC_EMULATION=y
 CONFIG_RTC_ZYNQMP=y
 CONFIG_SCSI=y
 CONFIG_DM_SCSI=y
+CONFIG_BAUDRATE_TABLE_4800_TO_115200=y
 CONFIG_ARM_DCC=y
 CONFIG_XILINX_UARTLITE=y
 CONFIG_ZYNQ_SERIAL=y
diff --git a/configs/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig
index 01aad948ebdc..3be2cb7300bd 100644
--- a/configs/zynq_cse_nand_defconfig
+++ b/configs/zynq_cse_nand_defconfig
@@ -60,6 +60,7 @@  CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ZYNQ=y
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_ARM_DCC=y
 # CONFIG_GZIP is not set
 # CONFIG_EFI_LOADER is not set
diff --git a/configs/zynq_cse_nor_defconfig b/configs/zynq_cse_nor_defconfig
index 6311989ad936..024b45aabae6 100644
--- a/configs/zynq_cse_nor_defconfig
+++ b/configs/zynq_cse_nor_defconfig
@@ -62,6 +62,7 @@  CONFIG_MTD_NOR_FLASH=y
 CONFIG_CFI_FLASH=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_CFI=y
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_ARM_DCC=y
 # CONFIG_GZIP is not set
 # CONFIG_EFI_LOADER is not set
diff --git a/configs/zynq_cse_qspi_defconfig b/configs/zynq_cse_qspi_defconfig
index 81cf5c683b2e..b1cce14ec06d 100644
--- a/configs/zynq_cse_qspi_defconfig
+++ b/configs/zynq_cse_qspi_defconfig
@@ -72,6 +72,7 @@  CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_BAUDRATE_TABLE_300_TO_230400=y
 CONFIG_ARM_DCC=y
 CONFIG_ZYNQ_QSPI=y
 # CONFIG_GZIP is not set
diff --git a/doc/README.serial_multi b/doc/README.serial_multi
index c9049fd01d66..abc2e8c7d307 100644
--- a/doc/README.serial_multi
+++ b/doc/README.serial_multi
@@ -35,9 +35,7 @@  just after switching the console:
 	setenv sout serial_scc; setenv baudrate 38400
 
 After that press 'enter' at the SCC console. Note that baudrates <38400
-are not allowed on LWMON with watchdog enabled (see CONFIG_SYS_BAUDRATE_TABLE in
-include/configs/lwmon.h).
-
+are not allowed on LWMON with watchdog enabled.
 
 PPC4XX Specific
 ===============
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 36ee43210a9f..8041cc3546a8 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -24,6 +24,81 @@  config BAUDRATE
 	  in the SPL stage (most drivers) or for choosing a default baudrate
 	  in the absence of an environment setting (serial_mxc.c).
 
+choice
+	prompt "Supported baudrate table to use"
+	default BAUDRATE_TABLE_9600_TO_115200
+	help
+	  Typically U-Boot will support 9600, 19200, 38400, 57600, and 115200
+	  as valid baudrates for the serial ports.  This is the default option
+	  here.  A number of alternatives are used in some cases and the exact
+	  list of rates can be seen in the help for each item.
+
+config BAUDRATE_TABLE_300_TO_38400_115200
+	bool "Use a table of 300 to 38400 and then 115200"
+	help
+	  Use a table of: { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200 }
+
+config BAUDRATE_TABLE_300_TO_115200
+	bool "Use a table of 300 to 115200"
+	help
+	  Use a table of: { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200 }
+
+config BAUDRATE_TABLE_300_TO_230400
+	bool "Use a table of 300 to 230400"
+	help
+	  Use a table of: { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600,
+	  115200, 230400 }
+
+config BAUDRATE_TABLE_300_TO_6000000
+	bool "Use a table of 300 to 6000000"
+	help
+	  Use a table of: { 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400,
+	  57600, 115200, 230400, 460800, 500000, 576000, 921600, 1000000, 1152000,
+	  1500000, 2000000, 2500000, 3000000, 3500000, 4000000, 4500000, 5000000,
+	  5500000, 6000000 }
+
+config BAUDRATE_TABLE_4800_TO_115200
+	bool "Use a table of 4800 to 115200"
+	help
+	  Use a table of: { 4800, 9600, 19200, 38400, 57600, 115200 }
+
+config BAUDRATE_TABLE_9600_TO_115200
+	bool "Use a table of 9600 to 115200"
+	help
+	  Use a table of: { 9600, 19200, 38400, 57600, 115200 }
+
+config BAUDRATE_TABLE_9600_TO_230400
+	bool "Use a table of 9600 to 230400"
+	help
+	  Use a table of: { 9600, 19200, 38400, 57600, 115200, 230400 }
+
+config BAUDRATE_TABLE_9600_TO_460800
+	bool "Use a table of 9600 to 460800"
+	help
+	  Use a table of: { 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
+
+config BAUDRATE_TABLE_9600_TO_921600
+	bool "Use a table of 9600 to 921600"
+	help
+	  Use a table of: { 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 }
+
+config BAUDRATE_TABLE_9600_TO_230400_500000_1500000
+	bool "Use a table of 9600 to 230400 and then 500000 and 1500000"
+	help
+	  Use a table of: { 9600, 19200, 38400, 57600, 115200, 230400, 500000, 1500000 }
+
+config BAUDRATE_TABLE_38400_115200_ONLY
+	bool "Use a table of 38400 and 115200 only"
+	help
+	  Use a table of: { 38400, 115200 }
+
+config BAUDRATE_TABLE_115200_ONLY
+	bool "Use a table of only 115200"
+	help
+	  Use a table of: { 115200 }
+
+endchoice
+
 config REQUIRE_SERIAL_CONSOLE
 	bool "Require a serial port for console"
 	# Running without a serial console is not supported by the
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 57a784844150..fab23b8c1f7b 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -25,7 +25,7 @@  DECLARE_GLOBAL_DATA_PTR;
 /*
  * Table with supported baudrates (defined in config_xyz.h)
  */
-static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
+static const unsigned long baudrate_table[] = SYS_BAUDRATE_TABLE;
 
 #if CONFIG_IS_ENABLED(SERIAL_PRESENT)
 static int serial_check_stdout(const void *blob, struct udevice **devp)
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index ebbd21916d77..02f6e7720edb 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -22,7 +22,7 @@  static struct serial_device *serial_current;
 /*
  * Table with supported baudrates (defined in config_xyz.h)
  */
-static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
+static const unsigned long baudrate_table[] = SYS_BAUDRATE_TABLE;
 
 /**
  * serial_null() - Void registration routine of a serial driver
@@ -457,7 +457,7 @@  void default_serial_puts(const char *s)
 }
 
 #if CONFIG_POST & CONFIG_SYS_POST_UART
-static const int bauds[] = CONFIG_SYS_BAUDRATE_TABLE;
+static const int bauds[] = SYS_BAUDRATE_TABLE;
 
 /**
  * uart_post_test() - Test the currently selected serial port using POST
diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h
index 167d44e400f3..114b81850f8b 100644
--- a/include/config_fallbacks.h
+++ b/include/config_fallbacks.h
@@ -25,10 +25,6 @@ 
 #endif
 #endif
 
-#ifndef CONFIG_SYS_BAUDRATE_TABLE
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
-#endif
-
 /* Console I/O Buffer Size */
 #ifndef CONFIG_SYS_CBSIZE
 #if defined(CONFIG_CMD_KGDB)
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index d96d3ce6967b..205b25904d9e 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -118,9 +118,6 @@ 
 #define CONFIG_SYS_NS16550_REG_SIZE    1
 #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
 
-#define CONFIG_SYS_BAUDRATE_TABLE  \
-		{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
-
 #define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_IMMR+0x4500)
 #define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_IMMR+0x4600)
 
diff --git a/include/configs/MPC8349EMDS_SDRAM.h b/include/configs/MPC8349EMDS_SDRAM.h
index 0f8db35ae90e..cc8aa67b6b91 100644
--- a/include/configs/MPC8349EMDS_SDRAM.h
+++ b/include/configs/MPC8349EMDS_SDRAM.h
@@ -173,9 +173,6 @@ 
 #define CONFIG_SYS_NS16550_REG_SIZE    1
 #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
 
-#define CONFIG_SYS_BAUDRATE_TABLE  \
-		{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
-
 #define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_IMMR+0x4500)
 #define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_IMMR+0x4600)
 
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index ce810e5f2cbe..a64e1df238ca 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -179,9 +179,6 @@ 
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
 
-#define CONFIG_SYS_BAUDRATE_TABLE \
-		{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_IMMR+0x4500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_IMMR+0x4600)
 
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index b73a7c9ac955..cb4bb5e16b16 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -195,9 +195,6 @@ 
 #define CONFIG_SYS_NS16550_REG_SIZE    1
 #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
 
-#define CONFIG_SYS_BAUDRATE_TABLE  \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
-
 #define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x4500)
 #define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x4600)
 
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 5c54bad4964f..445f4e05513b 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -281,9 +281,6 @@  extern unsigned long get_clock_freq(void);
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		get_bus_freq(0)
 
-#define CONFIG_SYS_BAUDRATE_TABLE \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x4500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x4600)
 
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 23ac9f8e6ece..555532593eab 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -194,9 +194,6 @@ 
 #define CONFIG_CONS_ON_SCC	/* define if console on SCC */
 #undef  CONFIG_CONS_NONE	/* define if console on something else */
 
-#define CONFIG_SYS_BAUDRATE_TABLE  \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
-
 /*
  * I2C
  */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 922f0661aba2..bd6b086141d5 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -487,9 +487,6 @@  extern unsigned long get_sdram_size(void);
 #define CONFIG_NS16550_MIN_FUNCTIONS
 #endif
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x4500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x4600)
 
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 1e75066eb1c9..a4711fb3c142 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -242,9 +242,6 @@  unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x11C500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x11C600)
 #define CONFIG_SYS_NS16550_COM3	(CONFIG_SYS_CCSRBAR+0x11D500)
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index e4629946ddb1..435a0d3eb82c 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -372,9 +372,6 @@  unsigned long get_board_sys_clk(void);
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x11C500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x11C600)
 #define CONFIG_SYS_NS16550_COM3	(CONFIG_SYS_CCSRBAR+0x11D500)
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 7c48c3af71fc..6fd99e650dd1 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -357,9 +357,6 @@ 
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x11C500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x11C600)
 #define CONFIG_SYS_NS16550_COM3	(CONFIG_SYS_CCSRBAR+0x11D500)
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 57640acfc90b..9b5b0443fca5 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -340,8 +340,6 @@  unsigned long get_board_sys_clk(void);
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
 #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x11C500)
 #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x11C600)
 #define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 6f27386d2bac..8182ebeaba85 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -298,8 +298,6 @@  unsigned long get_board_sys_clk(void);
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
 #define CONFIG_SYS_NS16550_COM1 (CONFIG_SYS_CCSRBAR+0x11C500)
 #define CONFIG_SYS_NS16550_COM2 (CONFIG_SYS_CCSRBAR+0x11C600)
 #define CONFIG_SYS_NS16550_COM3 (CONFIG_SYS_CCSRBAR+0x11D500)
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index b7cbf87d3062..7f71807d7ac5 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -137,9 +137,6 @@ 
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x11C500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x11C600)
 #define CONFIG_SYS_NS16550_COM3	(CONFIG_SYS_CCSRBAR+0x11D500)
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index fceccc6d52a6..bd9e7db03c7e 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -292,9 +292,6 @@ 
 #define CONFIG_NS16550_MIN_FUNCTIONS
 #endif
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR + 0x4500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR + 0x4600)
 
diff --git a/include/configs/armadillo-800eva.h b/include/configs/armadillo-800eva.h
index 73f63c5a9f00..c79a01dba9ee 100644
--- a/include/configs/armadillo-800eva.h
+++ b/include/configs/armadillo-800eva.h
@@ -30,7 +30,6 @@ 
 #define ARMADILLO_800EVA_SDRAM_SIZE	(512 * 1024 * 1024)
 
 #define CONFIG_SYS_PBSIZE		256
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 115200 }
 
 /* SCIF */
 #define CONFIG_CONS_SCIF1
diff --git a/include/configs/astro_mcf5373l.h b/include/configs/astro_mcf5373l.h
index 077af08c2bea..501badaaf58e 100644
--- a/include/configs/astro_mcf5373l.h
+++ b/include/configs/astro_mcf5373l.h
@@ -74,13 +74,6 @@ 
 
 #define CONFIG_SYS_UNIFY_CACHE
 
-/*
- * Define baudrate for UART1 (console output, tftp, ...)
- * default value of CONFIG_BAUDRATE for Sentec board: 19200 baud
- * CONFIG_SYS_BAUDRATE_TABLE defines values that can be selected
- * in u-boot command interface
- */
-
 #define CONFIG_MCFUART
 #define CONFIG_SYS_UART_PORT		(2)
 #define CONFIG_SYS_UART2_ALT3_GPIO
diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h
index 7f1c298cdce0..95222ffb55e5 100644
--- a/include/configs/bcmstb.h
+++ b/include/configs/bcmstb.h
@@ -110,12 +110,6 @@  extern phys_addr_t prior_stage_fdt_address;
 #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
 #define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
 
-/*
- * Serial console configuration.
- */
-#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, \
-					 115200}
-
 /*
  * Informational display configuration.
  */
diff --git a/include/configs/bmips_common.h b/include/configs/bmips_common.h
index 0f63239e5a55..d336e256d687 100644
--- a/include/configs/bmips_common.h
+++ b/include/configs/bmips_common.h
@@ -12,10 +12,6 @@ 
 #define CONFIG_PHY_RESET_DELAY		20
 #define CONFIG_SYS_RX_ETH_BUFFER	6
 
-/* UART */
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, \
-					  230400, 500000, 1500000 }
-
 /* Memory usage */
 #define CONFIG_SYS_MAXARGS		24
 #define CONFIG_SYS_BOOTPARAMS_LEN	SZ_128K
diff --git a/include/configs/broadcom_bcm963158.h b/include/configs/broadcom_bcm963158.h
index 6bdca174a664..8c46a5b4a210 100644
--- a/include/configs/broadcom_bcm963158.h
+++ b/include/configs/broadcom_bcm963158.h
@@ -9,9 +9,6 @@ 
  * common
  */
 
-/* UART */
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, \
-					  230400, 500000, 1500000 }
 /* Memory usage */
 #define CONFIG_SYS_MAXARGS		24
 #define CONFIG_SYS_BOOTM_LEN		(16 * 1024 * 1024)
diff --git a/include/configs/broadcom_bcm968360bg.h b/include/configs/broadcom_bcm968360bg.h
index 66c12675e6d0..66dee094df02 100644
--- a/include/configs/broadcom_bcm968360bg.h
+++ b/include/configs/broadcom_bcm968360bg.h
@@ -9,9 +9,6 @@ 
  * common
  */
 
-/* UART */
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, \
-					  230400, 500000, 1500000 }
 /* Memory usage */
 #define CONFIG_SYS_MAXARGS		24
 
diff --git a/include/configs/broadcom_bcm968580xref.h b/include/configs/broadcom_bcm968580xref.h
index ba5c3d8bb4da..ced4360eb749 100644
--- a/include/configs/broadcom_bcm968580xref.h
+++ b/include/configs/broadcom_bcm968580xref.h
@@ -9,9 +9,6 @@ 
  * common
  */
 
-/* UART */
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, \
-					  230400, 500000, 1500000 }
 /* Memory usage */
 #define CONFIG_SYS_MAXARGS		24
 
diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h
index efc6b5bd1be0..254680398cfe 100644
--- a/include/configs/cobra5272.h
+++ b/include/configs/cobra5272.h
@@ -35,14 +35,6 @@ 
 /* Enable Dma Timer */
 #define CONFIG_MCFTMR
 
-/* ---
- * Define baudrate for UART1 (console output, tftp, ...)
- * default value of CONFIG_BAUDRATE for Sentec board: 19200 baud
- * CONFIG_SYS_BAUDRATE_TABLE defines values that can be selected in u-boot command
- * interface
- * ---
- */
-
 #define CONFIG_MCFUART
 #define CONFIG_SYS_UART_PORT		(0)
 
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index e311ced14bc1..f8d64df71690 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -242,9 +242,6 @@ 
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0)/2)
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x11C500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x11C600)
 #define CONFIG_SYS_NS16550_COM3	(CONFIG_SYS_CCSRBAR+0x11D500)
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
index fbe468010bfc..13217e2576f7 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -75,15 +75,6 @@ 
 #define CONFIG_SYS_NS16550_CLK		CONFIG_SYS_TCLK
 #define CONFIG_SYS_NS16550_COM1		ORION5X_UART0_BASE
 
-/*
- * Serial Port configuration
- * The following definitions let you select what serial you want to use
- * for your console driver.
- */
-
-#define CONFIG_SYS_BAUDRATE_TABLE \
-	{ 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 }
-
 /*
  * FLASH configuration
  */
diff --git a/include/configs/gardena-smart-gateway-mt7688.h b/include/configs/gardena-smart-gateway-mt7688.h
index d287942b4784..377000f32c64 100644
--- a/include/configs/gardena-smart-gateway-mt7688.h
+++ b/include/configs/gardena-smart-gateway-mt7688.h
@@ -33,10 +33,6 @@ 
 #define CONFIG_SYS_NS16550_COM1		0xb0000c00
 #endif
 
-/* UART */
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, \
-					  230400, 460800, 921600 }
-
 /* RAM */
 
 /* Memory usage */
diff --git a/include/configs/gazerbeam.h b/include/configs/gazerbeam.h
index 12d108d6d6d7..5f9fc66ba6fe 100644
--- a/include/configs/gazerbeam.h
+++ b/include/configs/gazerbeam.h
@@ -46,9 +46,6 @@ 
 #define CONFIG_SYS_MAX_FLASH_BANKS	1 /* number of banks */
 #define CONFIG_SYS_MAX_FLASH_SECT	135
 
-#define CONFIG_SYS_BAUDRATE_TABLE  \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 /*
  * Environment
  */
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index e759db2ff2fb..bec2044bab1a 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -193,8 +193,6 @@ 
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	1
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_IMMR + 0x4500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_IMMR + 0x4600)
 #define CONFIG_SYS_NS16550_CLK		(get_bus_freq(0))
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index d321ebdb637c..fb256d4f1107 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -22,8 +22,6 @@ 
 
 #define CONFIG_HUSH_INIT_VAR
 
-#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }
-
 #define CONFIG_LOADS_ECHO
 #define CONFIG_SYS_LOADS_BAUD_CHANGE
 
diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h
index c3f690c7d70e..6a01d692acb4 100644
--- a/include/configs/kzm9g.h
+++ b/include/configs/kzm9g.h
@@ -25,7 +25,6 @@ 
 
 /* prompt */
 #define CONFIG_SYS_PBSIZE		256
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 115200 }
 
 /* SCIF */
 #define CONFIG_CONS_SCIF4
diff --git a/include/configs/linkit-smart-7688.h b/include/configs/linkit-smart-7688.h
index aa2542fe3575..6131ccba9359 100644
--- a/include/configs/linkit-smart-7688.h
+++ b/include/configs/linkit-smart-7688.h
@@ -34,10 +34,6 @@ 
 
 #endif
 
-/* UART */
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, \
-					  230400, 460800, 921600 }
-
 /* RAM */
 
 /* Memory usage */
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index e7882fb60781..e80e5fd9cb40 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -16,11 +16,6 @@ 
 
 #define CONFIG_SYS_BOOTM_LEN	(64 * 1024 * 1024)
 
-/* uart */
-/* The following table includes the supported baudrates */
-# define CONFIG_SYS_BAUDRATE_TABLE \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
-
 /* setting reset address */
 /*#define	CONFIG_SYS_RESET_ADDRESS	CONFIG_SYS_TEXT_BASE*/
 
diff --git a/include/configs/mt7628.h b/include/configs/mt7628.h
index e53e6a0d0a0e..b0427a892137 100644
--- a/include/configs/mt7628.h
+++ b/include/configs/mt7628.h
@@ -32,10 +32,6 @@ 
 #define CONFIG_SYS_NS16550_COM1		0xb0000c00
 #endif
 
-/* Serial common */
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, \
-					  230400, 460800, 921600 }
-
 /* SPL */
 
 #define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h
index 755f59eee987..3e85db7792f8 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -17,14 +17,6 @@ 
 
 #define CONFIG_SYS_BOOTM_LEN	SZ_64M /* Increase max gunzip size */
 
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, \
-					  9600, 19200, 38400, 57600, 115200, \
-					  230400, 460800, 500000, 576000, \
-					  921600, 1000000, 1152000, 1500000, \
-					  2000000, 2500000, 3000000, 3500000, \
-					  4000000, 4500000, 5000000, 5500000, \
-					  6000000 }
-
 #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
 /*
diff --git a/include/configs/mvebu_armada-8k.h b/include/configs/mvebu_armada-8k.h
index beecf1838e47..38b85e1840e1 100644
--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -16,9 +16,6 @@ 
 
 /* auto boot */
 
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, \
-					  115200, 230400, 460800, 921600 }
-
 #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
 /*
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index b37e05406e92..596c787b66c8 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -52,8 +52,6 @@ 
  */
 #define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
 
-#define CONFIG_SYS_BAUDRATE_TABLE { 4800, 9600, 19200, 38400, 57600, 115200 }
-
 /* USB device configuration */
 #define CONFIG_USB_DEVICE
 #define CONFIG_USB_TTY
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 58336110568c..292ed82c7624 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -453,9 +453,6 @@ 
 #define CONFIG_NS16550_MIN_FUNCTIONS
 #endif
 
-#define CONFIG_SYS_BAUDRATE_TABLE	\
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
-
 #define CONFIG_SYS_NS16550_COM1	(CONFIG_SYS_CCSRBAR+0x4500)
 #define CONFIG_SYS_NS16550_COM2	(CONFIG_SYS_CCSRBAR+0x4600)
 
diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h
index 595482c22e90..893f3ff75181 100644
--- a/include/configs/rcar-gen2-common.h
+++ b/include/configs/rcar-gen2-common.h
@@ -20,7 +20,6 @@ 
 
 /* console */
 #define CONFIG_SYS_PBSIZE		256
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 38400, 115200 }
 
 #define CONFIG_SYS_SDRAM_BASE		(RCAR_GEN2_SDRAM_BASE)
 #define CONFIG_SYS_SDRAM_SIZE		(RCAR_GEN2_UBOOT_SDRAM_SIZE)
diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h
index 2b3e1bb0d1c4..06d94f22056b 100644
--- a/include/configs/rcar-gen3-common.h
+++ b/include/configs/rcar-gen3-common.h
@@ -29,7 +29,6 @@ 
 #define CONFIG_SYS_CBSIZE		2048
 #define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 #define CONFIG_SYS_MAXARGS		64
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 115200, 38400 }
 
 /* PHY needs a longer autoneg timeout */
 #define PHY_ANEG_TIMEOUT		20000
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 24c9a84fa358..59d29c4b0d8e 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -46,9 +46,6 @@ 
 		(SB_TO_UL(CONFIG_SANDBOX_RAM_SIZE_MB) << 20)
 #define CONFIG_SYS_MONITOR_BASE	0
 
-#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
-					115200}
-
 #define BOOT_TARGET_DEVICES(func) \
 	func(HOST, host, 1) \
 	func(HOST, host, 0)
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index 7c563b7b045c..360bb235382e 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -75,9 +75,6 @@ 
 #define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
 #define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
 
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 4800, 9600, 19200, 38400, 57600, \
-					  115200 }
-
 /*
  * Environment
  */
diff --git a/include/configs/socfpga_arria10_socdk.h b/include/configs/socfpga_arria10_socdk.h
index ebb3e8c5732e..0416548f78b8 100644
--- a/include/configs/socfpga_arria10_socdk.h
+++ b/include/configs/socfpga_arria10_socdk.h
@@ -19,7 +19,6 @@ 
  * Serial / UART configurations
  */
 #define CONFIG_SYS_NS16550_MEM32
-#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, 115200}
 
 /*
  * L4 OSC1 Timer 0
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 166b8397adac..6924bd207179 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -41,8 +41,6 @@ 
  */
 #define CONFIG_SYS_NS16550_COM1		OMAP34XX_UART1
 
-#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
-					115200}
 /* EHCI */
 #define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO	25
 
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 3d7cb175faa6..ee49c4f4286a 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -31,8 +31,6 @@ 
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
 #endif /* !CONFIG_DM_SERIAL */
-#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600, \
-					115200}
 
 /* Select serial console configuration */
 #ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/turris_mox.h b/include/configs/turris_mox.h
index 0bbc9847537c..01fb075c83fc 100644
--- a/include/configs/turris_mox.h
+++ b/include/configs/turris_mox.h
@@ -22,14 +22,6 @@ 
 
 /* auto boot */
 
-#define CONFIG_SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, \
-					  9600, 19200, 38400, 57600, 115200, \
-					  230400, 460800, 500000, 576000, \
-					  921600, 1000000, 1152000, 1500000, \
-					  2000000, 2500000, 3000000, 3500000, \
-					  4000000, 4500000, 5000000, 5500000, \
-					  6000000 }
-
 #define	CONFIG_SYS_CBSIZE	1024	/* Console I/O Buff Size */
 
 /*
diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index 43486457a45d..95b373b7319a 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -28,9 +28,6 @@ 
 /* Serial setup */
 #define CONFIG_CPU_ARMV8
 
-#define CONFIG_SYS_BAUDRATE_TABLE \
-	{ 4800, 9600, 19200, 38400, 57600, 115200 }
-
 /* BOOTP options */
 #define CONFIG_BOOTP_BOOTFILESIZE
 #define CONFIG_BOOTP_MAY_FAIL
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 251a6c9d8e29..8a967ec6018c 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -28,9 +28,6 @@ 
 /* Serial setup */
 #define CONFIG_CPU_ARMV8
 
-#define CONFIG_SYS_BAUDRATE_TABLE \
-	{ 4800, 9600, 19200, 38400, 57600, 115200 }
-
 /* BOOTP options */
 #define CONFIG_BOOTP_BOOTFILESIZE
 #define CONFIG_BOOTP_MAY_FAIL
diff --git a/include/configs/xilinx_zynqmp_r5.h b/include/configs/xilinx_zynqmp_r5.h
index 6d5b81e05e16..989f45eb4eb1 100644
--- a/include/configs/xilinx_zynqmp_r5.h
+++ b/include/configs/xilinx_zynqmp_r5.h
@@ -11,11 +11,6 @@ 
 /* CPU clock */
 #define CONFIG_CPU_FREQ_HZ	500000000
 
-/* Serial drivers */
-/* The following table includes the supported baudrates */
-#define CONFIG_SYS_BAUDRATE_TABLE  \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
-
 /* Boot configuration */
 
 #define CONFIG_SYS_MAXARGS		32 /* max number of command args */
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 9b4c54b5e6a0..ad6a2321eb7d 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -28,11 +28,6 @@ 
 #define CONFIG_SYS_TIMER_COUNTS_DOWN
 #define CONFIG_SYS_TIMER_COUNTER	(CONFIG_SYS_TIMERBASE + 0x4)
 
-/* Serial drivers */
-/* The following table includes the supported baudrates */
-#define CONFIG_SYS_BAUDRATE_TABLE  \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
-
 /* Ethernet driver */
 #if defined(CONFIG_ZYNQ_GEM)
 # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
diff --git a/include/serial.h b/include/serial.h
index 6d1e62c6770c..150644c4c3d4 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -3,6 +3,42 @@ 
 
 #include <post.h>
 
+#if defined(CONFIG_BAUDRATE_TABLE_300_TO_38400_115200)
+#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
+				  38400, 115200 }
+#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_115200)
+#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
+				  38400, 57600, 115200 }
+#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_230400)
+#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 2400, 4800, 9600, 19200, \
+				  38400, 57600, 115200, 230400 }
+#elif defined(CONFIG_BAUDRATE_TABLE_300_TO_6000000)
+#define SYS_BAUDRATE_TABLE	{ 300, 600, 1200, 1800, 2400, 4800, 9600, \
+				  19200, 38400, 57600, 115200, 230400, \
+				  460800, 500000, 576000, 921600, 1000000, \
+				  1152000, 1500000, 2000000, 2500000, \
+				  3000000, 3500000, 4000000, 4500000, \
+				  5000000, 5500000, 6000000 }
+#elif defined(CONFIG_BAUDRATE_TABLE_4800_TO_115200)
+#define SYS_BAUDRATE_TABLE	{ 4800, 9600, 19200, 38400, 57600, 115200 }
+#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_115200)
+#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
+#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400)
+#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 }
+#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_460800)
+#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, 460800 }
+#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_921600)
+#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
+				  460800, 921600 }
+#elif defined(CONFIG_BAUDRATE_TABLE_9600_TO_230400_500000_1500000)
+#define SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400, \
+				  500000, 1500000 }
+#elif defined(CONFIG_BAUDRATE_TABLE_38400_115200_ONLY)
+#define SYS_BAUDRATE_TABLE	{ 38400, 115200 }
+#elif defined(CONFIG_BAUDRATE_TABLE_115200_ONLY)
+#define SYS_BAUDRATE_TABLE	{ 115200 }
+#endif
+
 struct serial_device {
 	/* enough bytes to match alignment of following func pointer */
 	char	name[16];