This patch adds timer support for AM33xx platform.

Signed-off-by: Chandan Nath <chandan.n...@ti.com>
---
 Makefile                                |    3 +++
 arch/arm/cpu/armv7/omap-common/Makefile |    2 ++
 arch/arm/cpu/armv7/omap-common/timer.c  |    1 +
 arch/arm/include/asm/arch-am33xx/cpu.h  |   27 +++++++++++++++++++++++++++
 4 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 77140eb..60b285c 100644
--- a/Makefile
+++ b/Makefile
@@ -279,6 +279,9 @@ LIBS += lib/libfdt/libfdt.o
 LIBS += api/libapi.o
 LIBS += post/libpost.o
 
+ifeq ($(SOC),am33xx)
+LIBS += $(CPUDIR)/omap-common/libomap-common.o
+endif
 ifeq ($(SOC),omap3)
 LIBS += $(CPUDIR)/omap-common/libomap-common.o
 endif
diff --git a/arch/arm/cpu/armv7/omap-common/Makefile 
b/arch/arm/cpu/armv7/omap-common/Makefile
index ea9f8ec..7311591 100644
--- a/arch/arm/cpu/armv7/omap-common/Makefile
+++ b/arch/arm/cpu/armv7/omap-common/Makefile
@@ -29,7 +29,9 @@ SOBJS := reset.o
 
 COBJS  := timer.o
 COBJS  += utils.o
+ifdef CONFIG_OMAP
 COBJS  += gpio.o
+endif
 
 ifdef CONFIG_SPL_BUILD
 COBJS  += spl.o
diff --git a/arch/arm/cpu/armv7/omap-common/timer.c 
b/arch/arm/cpu/armv7/omap-common/timer.c
index 9f8bc93..a00c242 100644
--- a/arch/arm/cpu/armv7/omap-common/timer.c
+++ b/arch/arm/cpu/armv7/omap-common/timer.c
@@ -34,6 +34,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <asm/arch/cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h 
b/arch/arm/include/asm/arch-am33xx/cpu.h
index cc937ac..3b9b1ca 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -163,6 +163,33 @@ struct timer_reg {
        unsigned int tsicrreg;          /* offset 0x54 */
 };
 
+/* Timer 32 bit registers */
+#ifndef __KERNEL_STRICT_NAMES
+#ifndef __ASSEMBLY__
+struct gptimer {
+       unsigned int tidr;              /* offset 0x00 */
+       unsigned int res1[0xc];
+       unsigned int tiocp_cfg;         /* offset 0x10 */
+       unsigned int res2[0xc];
+       unsigned int tier;              /* offset 0x20 */
+       unsigned int tistatr;           /* offset 0x24 */
+       unsigned int tistat;            /* offset 0x28 */
+       unsigned int tisr;              /* offset 0x2c */
+       unsigned int tcicr;             /* offset 0x30 */
+       unsigned int twer;              /* offset 0x34 */
+       unsigned int tclr;              /* offset 0x38 */
+       unsigned int tcrr;              /* offset 0x3c */
+       unsigned int tldr;              /* offset 0x40 */
+       unsigned int ttgr;              /* offset 0x44 */
+       unsigned int twpc;              /* offset 0x48 */
+       unsigned int tmar;              /* offset 0x4c */
+       unsigned int tcar1;             /* offset 0x50 */
+       unsigned int tscir;             /* offset 0x54 */
+       unsigned int tcar2;             /* offset 0x58 */
+};
+#endif /* __ASSEMBLY__ */
+#endif /* __KERNEL_STRICT_NAMES */
+
 /* UART Registers */
 struct uart_sys {
        unsigned int resv1[21];
-- 
1.7.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to