From 7978b8b725c421679d0f87128f1e6277c4edda4b Mon Sep 17 00:00:00 2001 From: T Michael Turney Date: Tue, 24 Apr 2018 10:21:45 -0700 Subject: sdm845: Add Timer support Frequency set to 19.2 MHz TEST=build Change-Id: I56e57156df8a74cf629f7ada86cf5a5fcd5ad3c4 Signed-off-by: T Michael Turney Reviewed-on: https://review.coreboot.org/25202 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/soc/qualcomm/sdm845/Kconfig | 1 + src/soc/qualcomm/sdm845/Makefile.inc | 8 ++++---- src/soc/qualcomm/sdm845/timer.c | 10 +++------- 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'src/soc') diff --git a/src/soc/qualcomm/sdm845/Kconfig b/src/soc/qualcomm/sdm845/Kconfig index 2abe53e7c9..6399ad173d 100644 --- a/src/soc/qualcomm/sdm845/Kconfig +++ b/src/soc/qualcomm/sdm845/Kconfig @@ -10,6 +10,7 @@ config SOC_QUALCOMM_SDM845 select GENERIC_GPIO_LIB select GENERIC_UDELAY select HAVE_MONOTONIC_TIMER + select ARM64_USE_ARCH_TIMER if SOC_QUALCOMM_SDM845 diff --git a/src/soc/qualcomm/sdm845/Makefile.inc b/src/soc/qualcomm/sdm845/Makefile.inc index bb27ef3f06..9eacbf5a88 100644 --- a/src/soc/qualcomm/sdm845/Makefile.inc +++ b/src/soc/qualcomm/sdm845/Makefile.inc @@ -3,24 +3,24 @@ ifeq ($(CONFIG_SOC_QUALCOMM_SDM845),y) ################################################################################ bootblock-y += bootblock.c -bootblock-y += timer.c bootblock-y += spi.c bootblock-y += mmu.c +bootblock-y += timer.c ################################################################################ -verstage-y += timer.c verstage-y += spi.c +verstage-y += timer.c ################################################################################ -romstage-y += timer.c romstage-y += spi.c romstage-y += cbmem.c +romstage-y += timer.c ################################################################################ ramstage-y += soc.c -ramstage-y += timer.c ramstage-y += spi.c ramstage-y += cbmem.c +ramstage-y += timer.c ################################################################################ diff --git a/src/soc/qualcomm/sdm845/timer.c b/src/soc/qualcomm/sdm845/timer.c index 8fb84c855f..5df24301c1 100644 --- a/src/soc/qualcomm/sdm845/timer.c +++ b/src/soc/qualcomm/sdm845/timer.c @@ -13,15 +13,11 @@ * GNU General Public License for more details. */ -#include #include - -void timer_monotonic_get(struct mono_time *mt) -{ - -} +#include +#include void init_timer(void) { - + raw_write_cntfrq_el0(19200*KHz); } -- cgit v1.2.3