summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2012-10-02 16:40:39 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-10-03 08:47:29 +0200
commit35729c6cb310d8bdfcf32ec0c23f226c714efda3 (patch)
tree3396a5b22d7fe4bab1fd0fdb090e0bae74944358 /arch
parent96d1e0933f5f0142d06d6efafb527f0fad7bad21 (diff)
downloadu-boot-imx-35729c6cb310d8bdfcf32ec0c23f226c714efda3.zip
u-boot-imx-35729c6cb310d8bdfcf32ec0c23f226c714efda3.tar.gz
u-boot-imx-35729c6cb310d8bdfcf32ec0c23f226c714efda3.tar.bz2
rmobile: Fix build timer driver with BUILD_DIR
Rmobile common timer driver diverts the same driver as SH architecture. When it builds at the same place with source, it is no problem, but when it builds out of source, it cannot build. This patch revises this problem. Reported-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/rmobile/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/rmobile/Makefile b/arch/arm/cpu/armv7/rmobile/Makefile
index 00610fe..c8999bb 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -35,11 +35,12 @@ COBJS-$(CONFIG_R8A7740) += cpu_info-r8a7740.o
COBJS-$(CONFIG_R8A7740) += pfc-r8a7740.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_LN-$(CONFIG_TMU_TIMER) += sh_timer.o
COBJS := $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix $(obj),$(COBJS_LN-y:.o=.c))
+OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS_LN-y))
SOBJS := $(addprefix $(obj),$(SOBJS))
START := $(addprefix $(obj),$(START))
@@ -48,6 +49,11 @@ all: $(obj).depend $(LIB)
$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))
+# from arch/sh/lib/ directory
+$(obj)sh_timer.c:
+ @rm -f $(obj)sh_timer.c
+ ln -s $(SRCTREE)/arch/sh/lib/time.c $(obj)sh_timer.c
+
#########################################################################
# defines $(obj).depend target