diff options
author | Tom Rini <trini@konsulko.com> | 2015-11-30 15:18:30 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-11-30 15:18:30 -0500 |
commit | 1670c8c219f6e47de624b4ed557b5a995265cd40 (patch) | |
tree | 9b9daf857ab9b16642d79e28f7094c26eb162e67 /arch/arm/cpu/armv7 | |
parent | 2a8696dfc2c6547c41836ceda573ad4548cba357 (diff) | |
parent | 3785f57015dbd7582f85fd1c34dcaa26638bf976 (diff) | |
download | u-boot-imx-1670c8c219f6e47de624b4ed557b5a995265cd40.zip u-boot-imx-1670c8c219f6e47de624b4ed557b5a995265cd40.tar.gz u-boot-imx-1670c8c219f6e47de624b4ed557b5a995265cd40.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r-- | arch/arm/cpu/armv7/ls102xa/cpu.c | 10 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/ls102xa/timer.c | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c index df2e1b7..2215fe9 100644 --- a/arch/arm/cpu/armv7/ls102xa/cpu.c +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c @@ -372,3 +372,13 @@ void reset_cpu(ulong addr) */ } } + +void arch_preboot_os(void) +{ + unsigned long ctrl; + + /* Disable PL1 Physical Timer */ + asm("mrc p15, 0, %0, c14, c2, 1" : "=r" (ctrl)); + ctrl &= ~ARCH_TIMER_CTRL_ENABLE; + asm("mcr p15, 0, %0, c14, c2, 1" : : "r" (ctrl)); +} diff --git a/arch/arm/cpu/armv7/ls102xa/timer.c b/arch/arm/cpu/armv7/ls102xa/timer.c index 11b17b2..e6a32ca 100644 --- a/arch/arm/cpu/armv7/ls102xa/timer.c +++ b/arch/arm/cpu/armv7/ls102xa/timer.c @@ -56,7 +56,8 @@ static inline unsigned long long us_to_tick(unsigned long long usec) int timer_init(void) { struct sctr_regs *sctr = (struct sctr_regs *)SCTR_BASE_ADDR; - unsigned long ctrl, val, freq; + unsigned long ctrl, freq; + unsigned long long val; /* Enable System Counter */ writel(SYS_COUNTER_CTRL_ENABLE, &sctr->cntcr); |