[Skiboot] [PATCH v3 3/3] platform/mambo: Add a heartbeat time
Chris Smart
chris at distroguy.com
Thu Jul 21 17:12:06 AEST 2016
The console is very slow when using Skiboot with Mambo.
This adds a heartbeat timer as a platform quirk so that the console is
refresh more quickly. This results in Skiboot doing the right thing
without requiring custom settings in skiboot.tcl files.
Signed-off-by: Chris Smart <chris at distroguy.com>
---
Changes since v2:
- address concerns raised by Mr Neuling
- timer replaced with time
- fix formatting
- fix subect line
- comment need for mambo heartbeat
core/timer.c | 2 +-
platforms/mambo/mambo.c | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/core/timer.c b/core/timer.c
index 6e141de5028e..210e2a0c6afb 100644
--- a/core/timer.c
+++ b/core/timer.c
@@ -261,7 +261,7 @@ void late_init_timers(void)
*/
if (platform.heartbeat_time) {
heartbeat = platform.heartbeat_time();
- }else if (slw_timer_ok() || fsp_present()) {
+ } else if (slw_timer_ok() || fsp_present()) {
heartbeat = HEARTBEAT_DEFAULT_MS * 10;
}
diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c
index 69e0796791a8..3c1d546a5b41 100644
--- a/platforms/mambo/mambo.c
+++ b/platforms/mambo/mambo.c
@@ -259,6 +259,15 @@ static int mambo_nvram_start_read(void *dst, uint32_t src, uint32_t len)
return OPAL_SUCCESS;
}
+static int mambo_heartbeat_time(void)
+{
+ /*
+ * Mambo is slow and has no console input interrupt, so faster
+ * polling is needed to ensure its responsiveness.
+ */
+ return 100;
+}
+
DECLARE_PLATFORM(mambo) = {
.name = "Mambo",
.probe = mambo_probe,
@@ -269,4 +278,5 @@ DECLARE_PLATFORM(mambo) = {
.nvram_start_read = mambo_nvram_start_read,
.start_preload_resource = flash_start_preload_resource,
.resource_loaded = flash_resource_loaded,
+ .heartbeat_time = mambo_heartbeat_time,
};
--
2.7.4
More information about the Skiboot
mailing list