diff mbox

[U-Boot,v6,01/17] sandbox: Add timer_read_counter() to avoid link error

Message ID 1383841933-1800-2-git-send-email-sjg@chromium.org
State Not Applicable
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Nov. 7, 2013, 4:31 p.m. UTC
The recent timer refactor caused sandbox to fail to build with an error.

lib/libgeneric.o: In function `get_ticks':
/home/sjg/c/src/third_party/u-boot/files/lib/time.c:45: undefined reference to `timer_read_counter'

Add a definition for timer_read_counter() to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v6:
- Add new patch to fix sandbox link error

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 board/sandbox/sandbox/sandbox.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/board/sandbox/sandbox/sandbox.c b/board/sandbox/sandbox/sandbox.c
index f471cb7..ee64fc4 100644
--- a/board/sandbox/sandbox/sandbox.c
+++ b/board/sandbox/sandbox/sandbox.c
@@ -23,6 +23,12 @@  ulong get_tbclk(void)
 	return CONFIG_SYS_HZ;
 }
 
+/* Provide this dummy function to avoid a link error */
+unsigned long timer_read_counter(void)
+{
+	return 0;
+}
+
 unsigned long long get_ticks(void)
 {
 	return get_timer(0);