summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorT Michael Turney <mturney@codeaurora.org>2018-04-24 10:21:45 -0700
committerJulius Werner <jwerner@chromium.org>2018-05-01 23:33:45 +0000
commit7978b8b725c421679d0f87128f1e6277c4edda4b (patch)
tree515378066ccb6032782d378d944ff2e2038a7c37 /src
parentd9105846bc550b5240ad5bcc56f12202412d6cfe (diff)
sdm845: Add Timer support
Frequency set to 19.2 MHz TEST=build Change-Id: I56e57156df8a74cf629f7ada86cf5a5fcd5ad3c4 Signed-off-by: T Michael Turney <mturney@codeaurora.org> Reviewed-on: https://review.coreboot.org/25202 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/qualcomm/sdm845/Kconfig1
-rw-r--r--src/soc/qualcomm/sdm845/Makefile.inc8
-rw-r--r--src/soc/qualcomm/sdm845/timer.c10
3 files changed, 8 insertions, 11 deletions
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 <timer.h>
#include <delay.h>
-
-void timer_monotonic_get(struct mono_time *mt)
-{
-
-}
+#include <arch/lib_helpers.h>
+#include <commonlib/helpers.h>
void init_timer(void)
{
-
+ raw_write_cntfrq_el0(19200*KHz);
}