[Skiboot] [PATCH v3 3/3] platform/mambo: Add a heartbeat time

Michael Neuling mikey at neuling.org
Fri Jul 22 10:49:26 AEST 2016


On Thu, 2016-07-21 at 17:12 +1000, Chris Smart wrote:
> 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>

The else whitespace fix should have been done in 2/3 but whatever...

Acked-by: Michael Neuling <mikey at neuling.org>

> ---
> 
> 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()) {

This one.

>  		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,
>  };


More information about the Skiboot mailing list