From 5d14c336b21da34d07e93b5689ccffd52b8cc658 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 30 Mar 2022 18:07:22 -0400 Subject: [PATCH] Convert CONFIG_SH_SCIF_CLK_FREQ to Kconfig This converts the following to Kconfig: CONFIG_SH_SCIF_CLK_FREQ Signed-off-by: Tom Rini --- configs/stout_defconfig | 1 + drivers/serial/Kconfig | 5 +++++ include/configs/alt.h | 3 --- include/configs/armadillo-800eva.h | 3 --- include/configs/gose.h | 3 --- include/configs/koelsch.h | 3 --- include/configs/kzm9g.h | 1 - include/configs/lager.h | 3 --- include/configs/porter.h | 3 --- include/configs/rcar-gen3-common.h | 3 --- include/configs/silk.h | 3 --- include/configs/stout.h | 3 --- 12 files changed, 6 insertions(+), 28 deletions(-) diff --git a/configs/stout_defconfig b/configs/stout_defconfig index 0502ae5..ea07ceb 100644 --- a/configs/stout_defconfig +++ b/configs/stout_defconfig @@ -88,6 +88,7 @@ CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_SCIF_CONSOLE=y +CONFIG_SH_SCIF_CLK_FREQ=52000000 CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_SH_QSPI=y diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index af01e50..286c998 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -825,6 +825,11 @@ config CONS_SCIFA0 endchoice +config SH_SCIF_CLK_FREQ + int "SCIF console clock frequency" + depends on SCIF_CONSOLE && (!DM_SERIAL || (SPL && !SPL_DM_SERIAL)) + default 65000000 + config SEMIHOSTING_SERIAL bool "Semihosting UART support" depends on SEMIHOSTING && !SERIAL_RX_BUFFER diff --git a/include/configs/alt.h b/include/configs/alt.h index 1656072..090bee7 100644 --- a/include/configs/alt.h +++ b/include/configs/alt.h @@ -41,8 +41,5 @@ /* SPL support */ #define CONFIG_SPL_STACK 0xe6340000 #define CONFIG_SPL_MAX_SIZE 0x4000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 65000000 -#endif #endif /* __ALT_H */ diff --git a/include/configs/armadillo-800eva.h b/include/configs/armadillo-800eva.h index f144302..acd140e 100644 --- a/include/configs/armadillo-800eva.h +++ b/include/configs/armadillo-800eva.h @@ -67,7 +67,4 @@ #define CONFIG_SH_ETHER_SH7734_MII (0x01) #define CONFIG_SH_ETHER_PHY_MODE PHY_INTERFACE_MODE_MII -/* Board Clock */ -#define CONFIG_SH_SCIF_CLK_FREQ get_board_sys_clk() - #endif /* __ARMADILLO_800EVA_H */ diff --git a/include/configs/gose.h b/include/configs/gose.h index 9015cab..4ffa5be 100644 --- a/include/configs/gose.h +++ b/include/configs/gose.h @@ -36,8 +36,5 @@ /* SPL support */ #define CONFIG_SPL_STACK 0xe6340000 #define CONFIG_SPL_MAX_SIZE 0x4000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 65000000 -#endif #endif /* __GOSE_H */ diff --git a/include/configs/koelsch.h b/include/configs/koelsch.h index 3fef415..c0997aa 100644 --- a/include/configs/koelsch.h +++ b/include/configs/koelsch.h @@ -36,8 +36,5 @@ /* SPL support */ #define CONFIG_SPL_STACK 0xe6340000 #define CONFIG_SPL_MAX_SIZE 0x4000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 65000000 -#endif #endif /* __KOELSCH_H */ diff --git a/include/configs/kzm9g.h b/include/configs/kzm9g.h index f35549d..7e99490 100644 --- a/include/configs/kzm9g.h +++ b/include/configs/kzm9g.h @@ -66,7 +66,6 @@ /* Clock */ #define CONFIG_GLOBAL_TIMER #define CONFIG_SYS_CPU_CLK (1196000000) -#define CONFIG_SH_SCIF_CLK_FREQ get_board_sys_clk() #define TMU_CLK_DIVIDER (4) /* 4 (default), 16, 64, 256 or 1024 */ #endif /* __KZM9G_H */ diff --git a/include/configs/lager.h b/include/configs/lager.h index df3b4bb..a5abbaa 100644 --- a/include/configs/lager.h +++ b/include/configs/lager.h @@ -37,8 +37,5 @@ /* SPL support */ #define CONFIG_SPL_STACK 0xe6340000 #define CONFIG_SPL_MAX_SIZE 0x4000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 65000000 -#endif #endif /* __LAGER_H */ diff --git a/include/configs/porter.h b/include/configs/porter.h index 964ce7d..bf380dd 100644 --- a/include/configs/porter.h +++ b/include/configs/porter.h @@ -41,8 +41,5 @@ /* SPL support */ #define CONFIG_SPL_STACK 0xe6340000 #define CONFIG_SPL_MAX_SIZE 0x4000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 65000000 -#endif #endif /* __PORTER_H */ diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h index 5bb6bf3..6474338 100644 --- a/include/configs/rcar-gen3-common.h +++ b/include/configs/rcar-gen3-common.h @@ -59,8 +59,5 @@ #endif #define CONFIG_SPL_STACK 0xe6304000 #define CONFIG_SPL_MAX_SIZE 0x7000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 65000000 -#endif #endif /* __RCAR_GEN3_COMMON_H */ diff --git a/include/configs/silk.h b/include/configs/silk.h index ec8740b..574ba22 100644 --- a/include/configs/silk.h +++ b/include/configs/silk.h @@ -41,8 +41,5 @@ /* SPL support */ #define CONFIG_SPL_STACK 0xe6340000 #define CONFIG_SPL_MAX_SIZE 0x4000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 65000000 -#endif #endif /* __SILK_H */ diff --git a/include/configs/stout.h b/include/configs/stout.h index 4ddbea5..bcc6fcd 100644 --- a/include/configs/stout.h +++ b/include/configs/stout.h @@ -45,8 +45,5 @@ /* SPL support */ #define CONFIG_SPL_STACK 0xe6340000 #define CONFIG_SPL_MAX_SIZE 0x4000 -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SH_SCIF_CLK_FREQ 52000000 -#endif #endif /* __STOUT_H */ -- 2.7.4