[U-Boot] [PATCHv5 3/4] ARM: tegra124: Add an option to disable CoreSight

Stephen Warren swarren at wwwdotorg.org
Tue Sep 6 18:54:24 CEST 2016


On 09/05/2016 07:29 AM, Julian Scheel wrote:
> From: Alban Bedel <alban.bedel at avionic-design.de>
>
> When running on a SoC with a secure bootloader CoreSight isn't
> allowed, so add an option to disable the CoreSight init.

> diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig

> +config ENABLE_CORESIGHT
> +	bool "Enable CoreSight"
> +	default y

Why "default y"? This changes behaviour on all our open development 
boards. "default y" should be dropped, and the option should be added to 
the defconfig for your board, or selected by the board's Kconfig option.

> diff --git a/arch/arm/mach-tegra/cpu.c b/arch/arm/mach-tegra/cpu.c

>  void clock_enable_coresight(int enable)
>  {
> +#if defined(CONFIG_ENABLE_CORESIGHT)
>  	u32 rst, src = 2;
>
>  	debug("%s entry\n", __func__);
> @@ -402,6 +403,7 @@ void clock_enable_coresight(int enable)
>  			writel(rst, CSITE_CPU_DBG3_LAR);
>  		}
>  	}
> +#endif
>  }

It might be better to ifdef out the call-site. Otherwise, someone 
reading that code won't have any idea that the function actually does 
nothing.


More information about the U-Boot mailing list