Lines Matching +full:armv7 +full:- +full:timer
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
10 #include <timer.h>
13 #include <asm/arch-armv7/globaltimer.h>
24 struct globaltimer *global_timer = priv->global_timer; in sti_timer_get_count()
26 u64 timer; in sti_timer_get_count() local
27 u32 old = readl(&global_timer->cnt_h); in sti_timer_get_count()
30 low = readl(&global_timer->cnt_l); in sti_timer_get_count()
31 high = readl(&global_timer->cnt_h); in sti_timer_get_count()
37 timer = high; in sti_timer_get_count()
38 *count = (u64)((timer << 32) | low); in sti_timer_get_count()
49 uc_priv->clock_rate = CONFIG_SYS_HZ_CLOCK; in sti_timer_probe()
51 /* get arm global timer base address */ in sti_timer_probe()
52 addr = fdtdec_get_addr(gd->fdt_blob, dev_of_offset(dev), "reg"); in sti_timer_probe()
53 priv->global_timer = (struct globaltimer *)addr; in sti_timer_probe()
55 /* init timer */ in sti_timer_probe()
56 writel(0x01, &priv->global_timer->ctl); in sti_timer_probe()
66 { .compatible = "arm,cortex-a9-global-timer" },