summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorIain Paton <ipaton0@gmail.com>2015-03-28 10:26:38 +0000
committerHans de Goede <hdegoede@redhat.com>2015-03-29 13:36:03 +0200
commite71b422bd71b03868abfc5e2087281710a0d52ee (patch)
treee395f5f51781a177a8c5a05d6fe048eb757cfb64 /board
parent7a140117ef5081e8dfef95150c788c93dabb8124 (diff)
downloadu-boot-imx-e71b422bd71b03868abfc5e2087281710a0d52ee.zip
u-boot-imx-e71b422bd71b03868abfc5e2087281710a0d52ee.tar.gz
u-boot-imx-e71b422bd71b03868abfc5e2087281710a0d52ee.tar.bz2
sunxi: use CONFIG_SYS_CLK_FREQ to set cpu clock
make the CPU clock selectable via Kconfig this removes the sunxi specific CONFIG_CLK_FULL_SPEED defined in each soc header and replaces it's use in board/sunxi/board.c with CONFIG_SYS_CLK_FREQ from Kconfig which allows us to configure board specific frequency on boot Signed-off-by: Iain Paton <ipaton0@gmail.com> [hdegoede@redhat.com s/CONFIG_SYS_CLK_FREQ/CONFIG_TIMER_CLK_FREQ/ for the arch-timer clk speed on sun7i to fix mis-compile on sun7i] Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/Kconfig4
-rw-r--r--board/sunxi/board.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 9d0eb91..2fcab60 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -132,6 +132,10 @@ endchoice
endif
+config SYS_CLK_FREQ
+ default 912000000 if MACH_SUN7I
+ default 1008000000 if MACH_SUN4I || MACH_SUN5I || MACH_SUN6I || MACH_SUN8I
+
config SYS_CONFIG_NAME
default "sun4i" if MACH_SUN4I
default "sun5i" if MACH_SUN5I
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e1891d1..808bf82 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -215,7 +215,7 @@ void sunxi_board_init(void)
* assured it's being powered with suitable core voltage
*/
if (!power_failed)
- clock_set_pll1(CONFIG_CLK_FULL_SPEED);
+ clock_set_pll1(CONFIG_SYS_CLK_FREQ);
else
printf("Failed to set core voltage! Can't set CPU frequency\n");
}