summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-rockchip
diff options
context:
space:
mode:
authorhuang lin <hl@rock-chips.com>2015-11-17 14:20:09 +0800
committerSimon Glass <sjg@chromium.org>2015-12-01 08:07:22 -0700
commitcc2244b8fa85b4a8af228617ed7566785dfb1728 (patch)
treea688f3f3f8b7301053262f64270bfc76f98df769 /arch/arm/include/asm/arch-rockchip
parentabe919ec5487bda93245369eb103b20e182fd8b5 (diff)
downloadtalos-obmc-uboot-cc2244b8fa85b4a8af228617ed7566785dfb1728.tar.gz
talos-obmc-uboot-cc2244b8fa85b4a8af228617ed7566785dfb1728.zip
rockchip: add timer driver
some rockchip soc will not include lib/timer.c in SPL stage, so implement timer driver for some soc can use us delay function in SPL. Signed-off-by: Lin Huang <hl@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/include/asm/arch-rockchip')
-rw-r--r--arch/arm/include/asm/arch-rockchip/timer.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-rockchip/timer.h b/arch/arm/include/asm/arch-rockchip/timer.h
new file mode 100644
index 0000000000..1d044bbda5
--- /dev/null
+++ b/arch/arm/include/asm/arch-rockchip/timer.h
@@ -0,0 +1,22 @@
+/*
+ * (C) Copyright 2015 Rockchip Electronics Co., Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __ASM_ARCH_TIMER_H
+#define __ASM_ARCH_TIMER_H
+
+struct rk_timer {
+ unsigned int timer_load_count0;
+ unsigned int timer_load_count1;
+ unsigned int timer_curr_value0;
+ unsigned int timer_curr_value1;
+ unsigned int timer_ctrl_reg;
+ unsigned int timer_int_status;
+};
+
+void rockchip_timer_init(void);
+void rockchip_udelay(unsigned int usec);
+
+#endif
OpenPOWER on IntegriCloud