public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/8] ARM: PSCI: Alow arch specific DT patching
Date: Thu, 28 Aug 2014 11:10:43 +0100	[thread overview]
Message-ID: <20140828101043.GF14650@leverpostej> (raw)
In-Reply-To: <1409171401-22616-3-git-send-email-arnab.basu@freescale.com>

Hi Arnab,

On Wed, Aug 27, 2014 at 09:29:55PM +0100, Arnab Basu wrote:
> Both ARMv7 and ARMv8 need to patch the device tree but the kind
> of patching done is different. This creates a function that can be
> defined by each architecture to handle the differences

I have no problem with the patch, but what is it that we need to do
differently for ARMv7 and ARMv8?

Mark.

> Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@freescale.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> ---
>  arch/arm/cpu/armv7/virt-dt.c |    7 ++++++-
>  arch/arm/lib/bootm-fdt.c     |   11 ++++++++---
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c
> index 0b0d6a7..3fbec39 100644
> --- a/arch/arm/cpu/armv7/virt-dt.c
> +++ b/arch/arm/cpu/armv7/virt-dt.c
> @@ -88,7 +88,7 @@ static int fdt_psci(void *fdt)
>  	return 0;
>  }
>  
> -int armv7_update_dt(void *fdt)
> +static int armv7_update_dt(void *fdt)
>  {
>  #ifndef CONFIG_ARMV7_SECURE_BASE
>  	/* secure code lives in RAM, keep it alive */
> @@ -98,3 +98,8 @@ int armv7_update_dt(void *fdt)
>  
>  	return fdt_psci(fdt);
>  }
> +
> +int cpu_update_dt(void *fdt)
> +{
> +	return armv7_update_dt(fdt);
> +}
> diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
> index d4f1578..daabc03 100644
> --- a/arch/arm/lib/bootm-fdt.c
> +++ b/arch/arm/lib/bootm-fdt.c
> @@ -21,6 +21,11 @@
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> +__weak int cpu_update_dt(void *fdt)
> +{
> +	return 0;
> +}
> +
>  int arch_fixup_fdt(void *blob)
>  {
>  	bd_t *bd = gd->bd;
> @@ -34,11 +39,11 @@ int arch_fixup_fdt(void *blob)
>  	}
>  
>  	ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
> -#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
> +
>  	if (ret)
>  		return ret;
>  
> -	ret = armv7_update_dt(blob);
> -#endif
> +	ret = cpu_update_dt(blob);
> +
>  	return ret;
>  }
> -- 
> 1.7.7.4
> 
> 

  reply	other threads:[~2014-08-28 10:10 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 20:29 [U-Boot] [PATCH 0/8] PSCI v0.2 framework for ARMv8 Arnab Basu
2014-08-27 20:29 ` [U-Boot] [PATCH 1/8] ARM: PSCI: Update psci.h for psci v0.2 Arnab Basu
2014-11-08  7:43   ` Albert ARIBAUD
2014-11-08  8:11     ` [U-Boot] [PATCH 1/8] ARM: PSCI: Update psci.h for psci v0.2 -- CORRECTION Albert ARIBAUD
2014-08-27 20:29 ` [U-Boot] [PATCH 2/8] ARM: PSCI: Alow arch specific DT patching Arnab Basu
2014-08-28 10:10   ` Mark Rutland [this message]
2014-08-28 10:51     ` Arnab Basu
2014-08-28 12:47       ` Mark Rutland
2014-08-27 20:29 ` [U-Boot] [PATCH 3/8] ARMv8/fsl-lsch3: Refactor spin-table code Arnab Basu
2014-10-26 21:06   ` Albert ARIBAUD
2014-10-27  4:51     ` arnab.basu at freescale.com
2014-08-27 20:29 ` [U-Boot] [PATCH 4/8] ARMv8: PSCI: Add linker section to hold PSCI code Arnab Basu
2014-09-18  9:12   ` Albert ARIBAUD
2014-09-18 15:28     ` Marc Zyngier
2014-09-19 16:04       ` Albert ARIBAUD
2014-10-11 11:27         ` Albert ARIBAUD
2014-10-11 16:04           ` Marc Zyngier
2014-08-27 20:29 ` [U-Boot] [PATCH 5/8] ARMv8: PCSI: Add generic ARMv8 " Arnab Basu
2014-08-28 11:37   ` Mark Rutland
2014-08-27 20:29 ` [U-Boot] [PATCH 6/8] ARMv8: PSCI: Fixup the device tree for PSCI v0.2 Arnab Basu
2014-08-28 12:44   ` Mark Rutland
2014-08-29 14:03     ` Arnab Basu
2014-09-01 18:43       ` Mark Rutland
2014-09-02 11:17         ` Mark Rutland
2014-09-02 15:21         ` Stuart Yoder
2014-09-03 15:25           ` Mark Rutland
2014-08-27 20:30 ` [U-Boot] [PATCH 7/8] ARMv8: PSCI: Setup ARMv8 PSCI Arnab Basu
2014-08-27 20:30 ` [U-Boot] [PATCH 8/8] ARMv8: PSCI: Enable SMC Arnab Basu
2014-09-18  9:18   ` Albert ARIBAUD
2014-09-18 15:50     ` arnab.basu at freescale.com
2014-08-27 20:43 ` [U-Boot] [PATCH 0/8] PSCI v0.2 framework for ARMv8 Arnab Basu
2014-11-26 12:52 ` Jan Kiszka
2014-12-03 17:25   ` Mark Rutland

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=20140828101043.GF14650@leverpostej \
    --to=mark.rutland@arm.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