> -----Original Message----- > From: Lim, Elly Siew Chin <elly.siew.chin....@intel.com> > Sent: Tuesday, November 10, 2020 2:44 PM > To: u-boot@lists.denx.de > Cc: Marek Vasut <ma...@denx.de>; Tan, Ley Foon > <ley.foon....@intel.com>; See, Chin Liang <chin.liang....@intel.com>; > Simon Goldschmidt <simon.k.r.goldschm...@gmail.com>; Chee, Tien Fong > <tien.fong.c...@intel.com>; Westergreen, Dalon > <dalon.westergr...@intel.com>; Simon Glass <s...@chromium.org>; Gan, > Yau Wai <yau.wai....@intel.com>; Lim, Elly Siew Chin > <elly.siew.chin....@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....@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