[RESEND v2 09/22] arm: socfpga: Add handoff data support for Diamond Mesa

Tan, Ley Foon ley.foon.tan at intel.com
Thu Nov 19 11:39:56 CET 2020



> -----Original Message-----
> From: Lim, Elly Siew Chin <elly.siew.chin.lim at intel.com>
> Sent: Tuesday, November 10, 2020 2:44 PM
> To: u-boot at lists.denx.de
> Cc: Marek Vasut <marex at denx.de>; Tan, Ley Foon
> <ley.foon.tan at intel.com>; See, Chin Liang <chin.liang.see at intel.com>;
> Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>; Chee, Tien Fong
> <tien.fong.chee at intel.com>; Westergreen, Dalon
> <dalon.westergreen at intel.com>; Simon Glass <sjg at chromium.org>; Gan,
> Yau Wai <yau.wai.gan at intel.com>; Lim, Elly Siew Chin
> <elly.siew.chin.lim at intel.com>
> Subject: [RESEND v2 09/22] arm: socfpga: Add handoff data support for
> Diamond Mesa
> 
> Diamond Mesa support both HPS handoff data and DDR handoff data.
> HPS handoff data support re-use Straix10 and Agilex code. DDR handoff data
> is newly introduced in Diamond Mesa.
> 
> Signed-off-by: Siew Chin Lim <elly.siew.chin.lim at intel.com>
> ---
>  arch/arm/mach-socfpga/include/mach/handoff_soc64.h | 19 ++++++++++
>  arch/arm/mach-socfpga/wrap_handoff_soc64.c         | 40
> ++++++++++++++++++++++
>  2 files changed, 59 insertions(+)
> 
> diff --git a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
> b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
> index 68e0278384..c38b232065 100644
> --- a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
> +++ b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h

[...]

> +	} else {
> +#ifdef CONFIG_TARGET_SOCFPGA_DM
> +		temp = readl(handoff_address);
> +		if (temp == SOC64_HANDOFF_DDR_UMCTL2_MAGIC) {
> +			debug("%s: umctl2 handoff data =\n{\n",
> +			      __func__);
> +		} else if (temp == SOC64_HANDOFF_DDR_PHY_MAGIC) {
> +			debug("%s: PHY handoff data =\n{\n",
> +			      __func__);
> +		} else if (temp ==
> SOC64_HANDOFF_DDR_PHY_INIT_ENGINE_MAGIC) {
> +			debug("%s: PHY engine handoff data =\n{\n",
> +			      __func__);
> +		}
> +
> +		debug("handoff table address = 0x%p table length = 0x%x\n",
> +		      table_x32, table_len);
> +
> +		if (temp == SOC64_HANDOFF_DDR_UMCTL2_MAGIC ||
> +		    temp == SOC64_HANDOFF_DDR_PHY_MAGIC ||
> +		    temp ==
> SOC64_HANDOFF_DDR_PHY_INIT_ENGINE_MAGIC) {
> +			/* Using handoff from Quartus tools if exists */
> +			for (i = 0; i < table_len; i++) {
> +				*table_x32 = readl(handoff_address +
> +
> 	SOC64_HANDOFF_OFFSET_DATA + (i * 4));

Change 4 to sizeof().


Regards
Ley Foon


More information about the U-Boot mailing list