Patchwork [U-Boot,07/12] x86: Add a dummy implementation for timer_get_us

login
register
mail settings
Submitter Simon Glass
Date Oct. 20, 2012, 10:33 p.m.
Message ID <1350772396-28946-8-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/192962/
State Accepted, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - Oct. 20, 2012, 10:33 p.m.
From: Gabe Black <gabeblack@chromium.org>

The microsecond timer is not currently implemented, but add a dummy
implementation for now.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/x86/cpu/Makefile |    2 +-
 arch/x86/cpu/timer.c  |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 arch/x86/cpu/timer.c

Patch

diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile
index 1eb70a7..cc68098 100644
--- a/arch/x86/cpu/Makefile
+++ b/arch/x86/cpu/Makefile
@@ -32,7 +32,7 @@  START	= start.o
 ifneq ($(CONFIG_NO_RESET_CODE),y)
 START	+= resetvec.o start16.o
 endif
-COBJS	= interrupts.o cpu.o
+COBJS	= interrupts.o cpu.o timer.o
 
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/arch/x86/cpu/timer.c b/arch/x86/cpu/timer.c
new file mode 100644
index 0000000..149109d
--- /dev/null
+++ b/arch/x86/cpu/timer.c
@@ -0,0 +1,17 @@ 
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ */
+
+#include <common.h>
+
+unsigned long timer_get_us(void)
+{
+	printf("timer_get_us used but not implemented.\n");
+	return 0;
+}