Skip to contentSkip to conversation

Kconfig: move CONFIG_SYS_CLK_FREQ to Kconfig

PATCH In review Alexey Brodkin 2 participants 3 messages Jan 13, 2015 – Jan 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Kconfig: move CONFIG_SYS_CLK_FREQ to Kconfig

It makes sense to specify CONFIG_SYS_CLK_FREQ in "configs/xx_defconfig" instead of "include/configs/xxx.h" because then header will be reusable across boards with different CPU clocks.

Also this nice to have an ability for end user to tune this value himself via "menuconfig".

For now I'm only applying this change to all ARC configs because otherwise scope of change will be huge.

Cc Tom Rini <[email protected]>
Cc Masahiro Yamada <[email protected]>
Cc Hans de Goede <[email protected]>
cc Simon Glass <[email protected]>
---
 Kconfig                        | 6 ++++++
 configs/arcangel4-be_defconfig | 1 +
 configs/arcangel4_defconfig    | 1 +
 configs/axs101_defconfig       | 1 +
 configs/tb100_defconfig        | 1 +
 include/configs/arcangel4-be.h | 1 -
 include/configs/arcangel4.h    | 1 -
 include/configs/axs101.h       | 1 -
 include/configs/tb100.h        | 1 -
 9 files changed, 10 insertions(+), 4 deletions(-)
Kconfig +6 -0
index 60cf1dd..4157da3 100644
@@ -143,6 +143,12 @@ config SYS_TEXT_BASE
 	help
 	  TODO: Move CONFIG_SYS_TEXT_BASE for all the architecture
 
+config SYS_CLK_FREQ
+	depends on ARC
+	int "CPU clock frequency"
+	help
+	  TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
+
 endmenu		# Boot images
 
 source "arch/Kconfig"
configs/arcangel4-be_defconfig +1 -0
index 867fb1f..0c3ab4e 100644
@@ -1,2 +1,3 @@
 CONFIG_ARC=y
 CONFIG_TARGET_ARCANGEL4_BE=y
+CONFIG_SYS_CLK_FREQ=70000000
configs/arcangel4_defconfig +1 -0
index 82b583e..a63ef21 100644
@@ -1,2 +1,3 @@
 CONFIG_ARC=y
 CONFIG_TARGET_ARCANGEL4=y
+CONFIG_SYS_CLK_FREQ=70000000
configs/axs101_defconfig +1 -0
index bfa314e..5c0ca11 100644
@@ -1,2 +1,3 @@
 CONFIG_ARC=y
 CONFIG_TARGET_AXS101=y
+CONFIG_SYS_CLK_FREQ=750000000
\ No newline at end of file
configs/tb100_defconfig +1 -0
index 9669dc0..d2de03b 100644
@@ -1,2 +1,3 @@
 CONFIG_ARC=y
 CONFIG_TARGET_TB100=y
+CONFIG_SYS_CLK_FREQ=500000000
\ No newline at end of file
include/configs/arcangel4-be.h +0 -1
index 88d27db..76163ab 100644
@@ -14,7 +14,6 @@
 #define CONFIG_ARC700
 #define CONFIG_ARC_MMU_VER		3
 #define CONFIG_SYS_CACHELINE_SIZE	64
-#define CONFIG_SYS_CLK_FREQ		70000000
 #define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_CLK_FREQ
 
 /*
include/configs/arcangel4.h +0 -1
index 4579eb9..81934a4 100644
@@ -13,7 +13,6 @@
 #define CONFIG_ARC700
 #define CONFIG_ARC_MMU_VER		3
 #define CONFIG_SYS_CACHELINE_SIZE	64
-#define CONFIG_SYS_CLK_FREQ		70000000
 #define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_CLK_FREQ
 
 /*
include/configs/axs101.h +0 -1
index 6e8c56c..c61ddd6 100644
@@ -13,7 +13,6 @@
 #define CONFIG_ARC700
 #define CONFIG_ARC_MMU_VER		3
 #define CONFIG_SYS_CACHELINE_SIZE	32
-#define CONFIG_SYS_CLK_FREQ		750000000
 #define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_CLK_FREQ
 
 /* NAND controller DMA doesn't work correctly with D$ enabled */
include/configs/tb100.h +0 -1
index 8a861a8..e9218f7 100644
@@ -15,7 +15,6 @@
 #define CONFIG_ARC700
 #define CONFIG_ARC_MMU_VER		3
 #define CONFIG_SYS_CACHELINE_SIZE	32
-#define CONFIG_SYS_CLK_FREQ		500000000
 #define CONFIG_SYS_TIMER_RATE		CONFIG_SYS_CLK_FREQ
 
 /*
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 Kconfig: move CONFIG_SYS_CLK_FREQ to Kconfig

Quoted 7 lines · Alexey Brodkin

It makes sense to specify CONFIG_SYS_CLK_FREQ in "configs/xx_defconfig" instead of "include/configs/xxx.h" because then header will be reusable across boards with different CPU clocks.

Also this nice to have an ability for end user to tune this value himself via "menuconfig".

Quoted 8 lines

For now I'm only applying this change to all ARC configs because otherwise scope of change will be huge.

Cc Tom Rini <[email protected]>
Cc Masahiro Yamada <[email protected]>
Cc Hans de Goede <[email protected]>
cc Simon Glass <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150113/6371121f/attachment.pgp>
#2 lore raw
In reply to Alexey Brodkin
Quoted 10 lines · Alexey Brodkin

It makes sense to specify CONFIG_SYS_CLK_FREQ in "configs/xx_defconfig" instead of "include/configs/xxx.h" because then header will be reusable across boards with different CPU clocks.

Also this nice to have an ability for end user to tune this value himself via "menuconfig".

For now I'm only applying this change to all ARC configs because otherwise scope of change will be huge.

Quoted 6 lines
Cc Tom Rini <[email protected]>
Cc Masahiro Yamada <[email protected]>
Cc Hans de Goede <[email protected]>
cc Simon Glass <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150115/21519ec0/attachment.pgp>