Patchwork [U-Boot,v3] arm: rmobile: Add support TMU base timer function

login
register
mail settings
Submitter Nobuhiro Iwamatsu
Date Aug. 22, 2012, 1:33 a.m.
Message ID <1345599184-27247-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
Download mbox | patch
Permalink /patch/179191/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Nobuhiro Iwamatsu - Aug. 22, 2012, 1:33 a.m.
Some rmobile SoC has TMU base timer function. This supports TMU.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
 V3: Merged arch/sh/lib/time.c
     Need patches 
       * sh: tmu: Removed arch/sh/include/asm/clk.h
       * sh: tmu: Changed switch statement to shift operation
       * sh: tmu: Changed TMU driver using array of structures
 V2: Set COBJS one object per line, and sort the list.

 arch/arm/cpu/armv7/rmobile/Makefile |    3 ++-
 include/sh_tmu.h                    |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile b/arch/arm/cpu/armv7/rmobile/Makefile
index a522872..dd0aede 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -27,11 +27,12 @@  LIB	= $(obj)lib$(SOC).o
 
 SOBJS = lowlevel_init.o
 COBJS-y += cpu_info.o
-COBJS-y += timer.o
 
 COBJS-$(CONFIG_DISPLAY_BOARDINFO) += board.o
+COBJS-$(CONFIG_GLOBAL_TIMER) += timer.o
 COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o
 COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o
+COBJS-$(CONFIG_TMU_TIMER) += $(TOPDIR)/arch/sh/lib/time.o
 
 COBJS	:= $(COBJS-y)
 SRCS    := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/include/sh_tmu.h b/include/sh_tmu.h
index a55d141..96c589d 100644
--- a/include/sh_tmu.h
+++ b/include/sh_tmu.h
@@ -47,7 +47,7 @@  struct tmu_regs {
 };
 #endif /* CONFIG_SH3 */
 
-#if defined(CONFIG_SH4) || defined(CONFIG_SH4A)
+#if defined(CONFIG_SH4) || defined(CONFIG_SH4A) || defined(CONFIG_RMOBILE)
 struct tmu_regs {
 	u32 reserved;
 	u8  tstr;