All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tan, Ley Foon <ley.foon.tan@intel.com>
To: u-boot@lists.denx.de
Subject: [v1 5/5] arm: socfpga: Restructure Stratix10 and Agilex handoff code
Date: Wed, 24 Mar 2021 04:00:34 +0000	[thread overview]
Message-ID: <BY5PR11MB3893474F3EFED9366A5B68B5CC639@BY5PR11MB3893.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CO1PR11MB509278D4023FDBE4158CA67691639@CO1PR11MB5092.namprd11.prod.outlook.com>



> -----Original Message-----
> From: Lim, Elly Siew Chin <elly.siew.chin.lim@intel.com>
> Sent: Wednesday, March 24, 2021 11:02 AM
> To: Tan, Ley Foon <ley.foon.tan@intel.com>; u-boot at lists.denx.de
> Cc: Marek Vasut <marex@denx.de>; See, Chin Liang
> <chin.liang.see@intel.com>; Simon Goldschmidt
> <simon.k.r.goldschmidt@gmail.com>; Chee, Tien Fong
> <tien.fong.chee@intel.com>; Westergreen, Dalon
> <dalon.westergreen@intel.com>; Simon Glass <sjg@chromium.org>; Gan,
> Yau Wai <yau.wai.gan@intel.com>
> Subject: RE: [v1 5/5] arm: socfpga: Restructure Stratix10 and Agilex handoff
> code
> 
> Hi Ley Foon,
> 
> > > +
> > > +int socfpga_handoff_read(void *handoff_address, void *table, u32
> > > table_len,
> > > +			 enum endianness big_endian)
> > > +{
> > > +	u32 temp, i;
> > > +	u32 *table_x32 = table;
> > > +
> > > +	debug("%s: handoff addr = 0x%p ", __func__, (u32
> > > *)handoff_address);
> > > +
> > > +	if (big_endian) {
> > > +		if (swab32(readl(SOC64_HANDOFF_BASE)) ==
> > > SOC64_HANDOFF_MAGIC_BOOT) {
> > > +			debug("Handoff table address = 0x%p ", table_x32);
> > > +			debug("table length = 0x%x\n", table_len);
> > > +			debug("%s: handoff data =\n{\n", __func__);
> > > +
> > > +			for (i = 0; i < table_len; i++) {
> > > +				temp = readl(handoff_address +
> > > +					     SOC64_HANDOFF_OFFSET_DATA +
> > > +					     (i * sizeof(u32)));
> > > +				*table_x32 = swab32(temp);
> > > +
> > > +				if (!(i % 2))
> > > +					debug(" No.%d Addr 0x%08x: ", i,
> > > +					      *table_x32);
> > > +				else
> > > +					debug(" 0x%08x\n", *table_x32);
> > > +
> > > +				table_x32++;
> > > +			}
> > > +			debug("\n}\n");
> > > +		} else {
> > > +			debug("%s: Cannot find
> > > SOC64_HANDOFF_MAGIC_BOOT ", __func__);
> > > +			debug("at addr  0x%p\n", (u32 *)handoff_address);
> > > +			return -EPERM;
> > > +		}
> > > +	}
> > How about if it is little endian, why don't need to fill up table_x32?
> >
> The little endian only needed in new Intel SOC N5X (Diamond Mesa) , we will
> upstream this part together with N5X patches later.

Then can return error if doesn't support little endian as now.

      reply	other threads:[~2021-03-24  4:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  9:43 [v1 0/5] Restructure Stratix10 and Agilex handoff code Siew Chin Lim
2021-03-15  9:43 ` [v1 1/5] arm: socfpga: Rename Stratix10 and Agilex handoff common macros Siew Chin Lim
2021-03-23  8:33   ` Tan, Ley Foon
2021-03-15  9:43 ` [v1 2/5] arm: socfpga: Changed wrap_pll_config_s10.c to wrap_pll_config_soc64.c Siew Chin Lim
2021-03-23  9:11   ` Tan, Ley Foon
2021-03-15  9:43 ` [v1 3/5] arm: socfpga: Changed system_manager_s10.c to system_manager_soc64.c Siew Chin Lim
2021-03-23  9:21   ` Tan, Ley Foon
2021-03-15  9:43 ` [v1 4/5] arm: socfpga: Rearrange sequence of macros in handoff_soc64.h Siew Chin Lim
2021-03-23  9:22   ` Tan, Ley Foon
2021-03-15  9:43 ` [v1 5/5] arm: socfpga: Restructure Stratix10 and Agilex handoff code Siew Chin Lim
2021-03-23 10:03   ` Tan, Ley Foon
2021-03-24  3:02     ` Lim, Elly Siew Chin
2021-03-24  4:00       ` Tan, Ley Foon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BY5PR11MB3893474F3EFED9366A5B68B5CC639@BY5PR11MB3893.namprd11.prod.outlook.com \
    --to=ley.foon.tan@intel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.