public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv4 4/7] ARMv8/Layerscape: switch SMP method to spin-table when the PSCI isn't available
Date: Fri, 27 May 2016 11:06:20 -0700	[thread overview]
Message-ID: <57488C9C.7040601@nxp.com> (raw)
In-Reply-To: <1464003511-19262-4-git-send-email-Zhiqiang.Hou@nxp.com>

On 05/23/2016 04:49 AM, Zhiqiang Hou wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> 
> If the PSCI and PPA is ready, skip the fixup for spin-table and
> waking secondary cores. If not, change SMP method to spin-table,
> and the device node of PSCI will be removed.

I don't see how you change the boot method to spin-table. It has been spin-table
all the way. Actually you change the boot method to psci when the image is valid.

> 
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> ---
> V4:
>  - Reordered this patch.

<snip>

>  int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc)
>  {
> @@ -36,7 +39,35 @@ void ft_fixup_cpu(void *blob)
>  	int addr_cells;
>  	u64 val, core_id;
>  	size_t *boot_code_size = &(__secondary_boot_code_size);
> +#if defined(CONFIG_FSL_LS_PPA) && defined(CONFIG_ARMV8_PSCI)
> +	int node;
> +#endif
> +
> +#if defined(CONFIG_FSL_LS_PPA) && defined(CONFIG_ARMV8_PSCI)
> +	if (sec_firmware_validate()) {

This function name is confusing. It returns non-zero when the image is not
valid. Please consider to change the name.

Does the existence of such image guarantee it has been loaded successfully?
Would it be possible to detect the psci feature is up and running?

> +		/* remove psci DT node */
> +		node = fdt_path_offset(blob, "/psci");
> +		if (node >= 0)
> +			goto remove_psci_node;
> +
> +		node = fdt_node_offset_by_compatible(blob, -1, "arm,psci");
> +		if (node >= 0)
> +			goto remove_psci_node;
>  
> +		node = fdt_node_offset_by_compatible(blob, -1, "arm,psci-0.2");
> +		if (node >= 0)
> +			goto remove_psci_node;
> +
> +		node = fdt_node_offset_by_compatible(blob, -1, "arm,psci-1.0");
> +		if (node >= 0)
> +			goto remove_psci_node;
> +
> +remove_psci_node:
> +		if (node >= 0)
> +			fdt_del_node(blob, node);
> +	} else
> +		return;
> +#endif
>  	off = fdt_path_offset(blob, "/cpus");
>  	if (off < 0) {
>  		puts("couldn't find /cpus node\n");
> 

I see you are removing the psci nodes. Do you need to update the cpus nodes with
enable-method here? You have it done in next patch cpu_update_dt_psci().

York

  reply	other threads:[~2016-05-27 18:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 11:38 [U-Boot] [PATCHv4 1/7] armv8: fsl-layerscape: add i/d-cache enable function to enable_caches Zhiqiang Hou
2016-05-23 11:38 ` [U-Boot] [PATCHv4 2/7] ARMv8: add the sec_firmware header file Zhiqiang Hou
2016-05-23 11:38 ` [U-Boot] [PATCHv4 3/7] ARMv8/layerscape: Add FSL PPA support Zhiqiang Hou
2016-05-27 18:06   ` York Sun
2016-05-30  2:56     ` Zhiqiang Hou
2016-05-27 19:58   ` York Sun
2016-05-30  2:58     ` Zhiqiang Hou
2016-05-23 11:38 ` [U-Boot] [PATCHv4 4/7] ARMv8/Layerscape: switch SMP method to spin-table when the PSCI isn't available Zhiqiang Hou
2016-05-27 18:06   ` York Sun [this message]
2016-05-30  2:53     ` Zhiqiang Hou
2016-05-23 11:38 ` [U-Boot] [PATCHv4 5/7] ARMv8/PSCI: Fixup the device tree for PSCI Zhiqiang Hou
2016-05-23 11:38 ` [U-Boot] [PATCHv4 6/7] ARMv8/ls1043ardb: Integrate FSL PPA Zhiqiang Hou
2016-05-23 11:38 ` [U-Boot] [PATCHv4 7/7] ARMv8/ls1043ardb: add the CONFIG_ARMV8_PSCI when PPA is enabled Zhiqiang Hou

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=57488C9C.7040601@nxp.com \
    --to=york.sun@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox