Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/27434
to look at the new patch set (#3).
Change subject: uart/sifive: provide a monotonic timer using CLINT timer register
......................................................................
uart/sifive: provide a monotonic timer using CLINT timer register
Makes it possible to use the generic udelay.
Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Signed-off-by: Philipp Hug <philipp(a)hug.cx>
---
M src/arch/riscv/misc.c
M src/soc/sifive/fu540/Kconfig
M src/soc/sifive/fu540/Makefile.inc
A src/soc/sifive/fu540/timer.c
4 files changed, 29 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/27434/3
--
To view, visit https://review.coreboot.org/27434
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Gerrit-Change-Number: 27434
Gerrit-PatchSet: 3
Gerrit-Owner: Philipp Hug <philipp(a)hug.cx>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/27434 )
Change subject: uart/sifive: provide a monotonic timer using CLINT timer register
......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/27434/2/src/soc/sifive/fu540/timer.c
File src/soc/sifive/fu540/timer.c:
https://review.coreboot.org/#/c/27434/2/src/soc/sifive/fu540/timer.c@20
PS2, Line 20: #define CLINT_MTIME CLINT_BASE + 0xbff8
Macros with complex values should be enclosed in parentheses
--
To view, visit https://review.coreboot.org/27434
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Gerrit-Change-Number: 27434
Gerrit-PatchSet: 2
Gerrit-Owner: Philipp Hug <philipp(a)hug.cx>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 11 Jul 2018 12:04:16 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Philipp Hug has uploaded a new patch set (#2). ( https://review.coreboot.org/27434 )
Change subject: uart/sifive: provide a monotonic timer using CLINT timer register
......................................................................
uart/sifive: provide a monotonic timer using CLINT timer register
Makes it possible to use the generic udelay.
Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Signed-off-by: Philipp Hug <philipp(a)hug.cx>
---
M src/arch/riscv/misc.c
M src/soc/sifive/fu540/Kconfig
M src/soc/sifive/fu540/Makefile.inc
A src/soc/sifive/fu540/timer.c
4 files changed, 29 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/27434/2
--
To view, visit https://review.coreboot.org/27434
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Gerrit-Change-Number: 27434
Gerrit-PatchSet: 2
Gerrit-Owner: Philipp Hug <philipp(a)hug.cx>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/27434 )
Change subject: uart/sifive: provide a monotonic timer using CLINT timer register
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/27434/1/src/soc/sifive/fu540/timer.c
File src/soc/sifive/fu540/timer.c:
https://review.coreboot.org/#/c/27434/1/src/soc/sifive/fu540/timer.c@20
PS1, Line 20: #define CLINT_MTIME CLINT_BASE + 0xbff8
Macros with complex values should be enclosed in parentheses
--
To view, visit https://review.coreboot.org/27434
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Gerrit-Change-Number: 27434
Gerrit-PatchSet: 1
Gerrit-Owner: Philipp Hug <philipp(a)hug.cx>
Gerrit-CC: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 11 Jul 2018 12:00:46 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Philipp Hug has uploaded this change for review. ( https://review.coreboot.org/27434
Change subject: uart/sifive: provide a monotonic timer using CLINT timer register
......................................................................
uart/sifive: provide a monotonic timer using CLINT timer register
Makes it possible to use the generic udelay.
Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Signed-off-by: Philipp Hug <philipp(a)hug.cx>
---
M src/arch/riscv/misc.c
M src/soc/sifive/fu540/Kconfig
M src/soc/sifive/fu540/Makefile.inc
A src/soc/sifive/fu540/timer.c
4 files changed, 29 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/27434/1
diff --git a/src/arch/riscv/misc.c b/src/arch/riscv/misc.c
index 65b8ecf..1909dbc 100644
--- a/src/arch/riscv/misc.c
+++ b/src/arch/riscv/misc.c
@@ -16,7 +16,3 @@
void init_timer(void)
{
}
-
-void udelay(unsigned int n)
-{
-}
diff --git a/src/soc/sifive/fu540/Kconfig b/src/soc/sifive/fu540/Kconfig
index d247c28..4db34f7 100644
--- a/src/soc/sifive/fu540/Kconfig
+++ b/src/soc/sifive/fu540/Kconfig
@@ -20,6 +20,8 @@
select ARCH_RAMSTAGE_RISCV
select BOOTBLOCK_CONSOLE
select DRIVERS_UART_SIFIVE
+ select HAVE_MONOTONIC_TIMER
+ select GENERIC_UDELAY
if SOC_SIFIVE_FU540
diff --git a/src/soc/sifive/fu540/Makefile.inc b/src/soc/sifive/fu540/Makefile.inc
index 8a2f3a6..4ac080b 100644
--- a/src/soc/sifive/fu540/Makefile.inc
+++ b/src/soc/sifive/fu540/Makefile.inc
@@ -19,10 +19,12 @@
romstage-y += uart.c
romstage-y += media.c
+romstage-y += timer.c
ramstage-y += uart.c
ramstage-y += media.c
ramstage-y += cbmem.c
+ramstage-y += timer.c
CPPFLAGS_common += -Isrc/soc/sifive/fu540/include
diff --git a/src/soc/sifive/fu540/timer.c b/src/soc/sifive/fu540/timer.c
new file mode 100644
index 0000000..57afc88
--- /dev/null
+++ b/src/soc/sifive/fu540/timer.c
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Philipp Hug <philipp(a)hug.cx>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/io.h>
+#include <arch/encoding.h>
+#include <timer.h>
+
+#define CLINT_MTIME CLINT_BASE + 0xbff8
+
+void timer_monotonic_get(struct mono_time *mt)
+{
+ mono_time_set_usecs(mt, read32((void *)(CLINT_MTIME)));
+}
--
To view, visit https://review.coreboot.org/27434
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5139601226e6f89da69e302a10f2fb56b4b24f38
Gerrit-Change-Number: 27434
Gerrit-PatchSet: 1
Gerrit-Owner: Philipp Hug <philipp(a)hug.cx>