Browse Source

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.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Tom Rini <trini@ti.com>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Hans de Goede <hdegoede@redhat.com>
cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
tags/2020-06-01
Alexey Brodkin 6 years ago
committed by Tom Rini
parent
commit
33d8818350
9 changed files with 10 additions and 4 deletions
  1. +6
    -0
      Kconfig
  2. +1
    -0
      configs/arcangel4-be_defconfig
  3. +1
    -0
      configs/arcangel4_defconfig
  4. +1
    -0
      configs/axs101_defconfig
  5. +1
    -0
      configs/tb100_defconfig
  6. +0
    -1
      include/configs/arcangel4-be.h
  7. +0
    -1
      include/configs/arcangel4.h
  8. +0
    -1
      include/configs/axs101.h
  9. +0
    -1
      include/configs/tb100.h

+ 6
- 0
Kconfig View File

@@ -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"


+ 1
- 0
configs/arcangel4-be_defconfig View File

@@ -1,2 +1,3 @@
CONFIG_ARC=y
CONFIG_TARGET_ARCANGEL4_BE=y
CONFIG_SYS_CLK_FREQ=70000000

+ 1
- 0
configs/arcangel4_defconfig View File

@@ -1,2 +1,3 @@
CONFIG_ARC=y
CONFIG_TARGET_ARCANGEL4=y
CONFIG_SYS_CLK_FREQ=70000000

+ 1
- 0
configs/axs101_defconfig View File

@@ -1,2 +1,3 @@
CONFIG_ARC=y
CONFIG_TARGET_AXS101=y
CONFIG_SYS_CLK_FREQ=750000000

+ 1
- 0
configs/tb100_defconfig View File

@@ -1,2 +1,3 @@
CONFIG_ARC=y
CONFIG_TARGET_TB100=y
CONFIG_SYS_CLK_FREQ=500000000

+ 0
- 1
include/configs/arcangel4-be.h View File

@@ -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

/*


+ 0
- 1
include/configs/arcangel4.h View File

@@ -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

/*


+ 0
- 1
include/configs/axs101.h View File

@@ -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 */


+ 0
- 1
include/configs/tb100.h View File

@@ -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

/*