diff options
author | Oskar Schirmer <oskar@linutronix.de> | 2011-02-17 16:42:58 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-11 10:06:05 +0100 |
commit | 85922e54a3a14a6aee6c0b1fc67d81ef0c60fc9c (patch) | |
tree | 7ad5d37246e948424769c0456cd7d09f95f0192e /arch/arm/mach-tcc8k | |
parent | 30d913556b25db11f2537f4412487c6e81dc0374 (diff) | |
download | op-kernel-dev-85922e54a3a14a6aee6c0b1fc67d81ef0c60fc9c.zip op-kernel-dev-85922e54a3a14a6aee6c0b1fc67d81ef0c60fc9c.tar.gz |
arm: tcc8k: Choose PLL settings conforming to board layout
The evaluation board is driven with 1.2V core voltage, so system clock
must not exceed 192 MHz, bus clock must not exceed 110 MHz. Choose
appropriate values and set DTCMWAIT accordingly. Adapt UART setting to
avoid console log interruption and wait for the specified locking time
of 300us to pass.
Signed-off-by: Oskar Schirmer <oskar@linutronix.de>
Cc: bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/arm/mach-tcc8k')
-rw-r--r-- | arch/arm/mach-tcc8k/board-tcc8000-sdk.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c index a3b66d4..c25cf3f 100644 --- a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c +++ b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c @@ -6,6 +6,7 @@ * published by the Free Software Foundation. */ +#include <linux/delay.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/platform_device.h> @@ -18,6 +19,7 @@ #include <mach/clock.h> #include <mach/tcc-nand.h> +#include <mach/tcc8k-regs.h> #include "common.h" @@ -52,6 +54,22 @@ static struct sys_timer tcc8k_timer = { static void __init tcc8k_map_io(void) { tcc8k_map_common_io(); + + /* set PLL0 clock to 96MHz, adapt UART0 divisor */ + __raw_writel(0x00026003, CKC_BASE + PLL0CFG_OFFS); + __raw_writel(0x10000001, CKC_BASE + ACLKUART0_OFFS); + + /* set PLL1 clock to 192MHz */ + __raw_writel(0x00016003, CKC_BASE + PLL1CFG_OFFS); + + /* set PLL2 clock to 48MHz */ + __raw_writel(0x00036003, CKC_BASE + PLL2CFG_OFFS); + + /* with CPU freq higher than 150 MHz, need extra DTCM wait */ + __raw_writel(0x00000001, SCFG_BASE + DTCMWAIT_OFFS); + + /* PLL locking time as specified */ + udelay(300); } MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board") |