[PATCH 12/25] Convert CONFIG_SH_SCIF_CLK_FREQ to Kconfig
Tom Rini
trini at konsulko.com
Thu Mar 31 00:07:22 CEST 2022
This converts the following to Kconfig:
CONFIG_SH_SCIF_CLK_FREQ
Signed-off-by: Tom Rini <trini at konsulko.com>
---
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 0502ae5d3067..ea07ceb8f373 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 f52422504b03..b8d1fb849376 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -803,6 +803,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 UNIPHIER_SERIAL
bool "Support for UniPhier on-chip UART"
depends on ARCH_UNIPHIER
diff --git a/include/configs/alt.h b/include/configs/alt.h
index 1656072ebb4d..090bee7d2d66 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 f144302a71d2..acd140ee35ee 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 9015cabc2d17..4ffa5bea8f83 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 3fef4150b25c..c0997aa3ddd5 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 f35549d95acb..7e99490e5271 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 df3b4bbce072..a5abbaaeab1f 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 964ce7def64b..bf380ddf05b0 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 5bb6bf3d7822..64743382eda1 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 ec8740b3826d..574ba228d8a1 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 4ddbea5b1d06..bcc6fcd36b30 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.25.1
More information about the U-Boot
mailing list