public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 6/6] PPC 85xx: Add qemu-ppce500 machine
Date: Mon, 28 Apr 2014 11:40:15 -0700	[thread overview]
Message-ID: <535EA08F.50709@freescale.com> (raw)
In-Reply-To: <1392900768-33843-7-git-send-email-agraf@suse.de>

On 02/20/2014 04:52 AM, Alexander Graf wrote:
> For KVM we have a special PV machine type called "ppce500". This machine
> is inspired by the MPC8544DS board, but implements a lot less features
> than that one.
> 
> It also provides more PCI slots and is supposed to be enumerated by
> device tree only.
> 
> This patch adds support for the generic ppce500 machine and tries to
> rely solely on device tree for device enumeration.
> 
> Signed-off-by: Alexander Graf <agraf@suse.de>
> 
> ---
> 
> v3 -> v4:
> 
>   - use new tlb map syntax
>   - check that tlb map mapped everything
>   - always save/restore r3 for cpu_init_early_f
>   - remove CONFIG_DYNAMIC_CCSRBAR
>   - make init_tlbs weak and remove all init_tlbs_dynamic() cruft
>   - always map fdt to fixed virtual address
>   - fold together AS=1 fdt map functions
>   - use tlb_map_range for CCSR map
>   - search for PCI based on device type rather than compatible
>   - remove unnecessary cast
>   - call get_linear_ram_size directly
>   - override get_tbclk with timebase-frequency fetching code
> ---

<snip>

> diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> index 993b8b8..998781b 100644
> --- a/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> +++ b/arch/powerpc/cpu/mpc85xx/cpu_init_early.c
> @@ -79,7 +79,7 @@ void setup_ifc(void)
>  #endif
>  
>  /* We run cpu_init_early_f in AS = 1 */
> -void cpu_init_early_f(void)
> +void cpu_init_early_f(void *fdt)
>  {
>  	u32 mas0, mas1, mas2, mas3, mas7;
>  	int i;
> @@ -102,6 +102,12 @@ void cpu_init_early_f(void)
>  	for (i = 0; i < sizeof(gd_t); i++)
>  		((char *)gd)[i] = 0;
>  
> +	/*
> +	 * CONFIG_SYS_CCSRBAR_PHYS below may use gd->fdt_blob on ePAPR systems,
> +	 * so we need to populate it before it accesses it.
> +	 */
> +	gd->fdt_blob = fdt;
> +

Alex,

I am thinking to add back "#ifdef CONFIG_QEMU_E500" you had for your v3 and
earlier version for the above change. Do you have any concerns?

The reason I am proposing this is to use generic board architecture.
gd->fdt_blob is used by some other functions to detect if device tree exists.
Your change takes r3 from entry and treat it as device tree. It is not the case
for a normal metal SoC. I need to clear this variable.

York

  parent reply	other threads:[~2014-04-28 18:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 12:52 [U-Boot] [PATCH v4 0/6] PPC 85xx: Add support for QEMU's ppce500 PV machine Alexander Graf
2014-02-20 12:52 ` [U-Boot] [PATCH v4 1/6] fdt_support: split fdt_getprop_u32_default Alexander Graf
2014-02-20 12:52 ` [U-Boot] [PATCH v4 2/6] fdt_support: Add helper function to read "ranges" property Alexander Graf
2014-02-20 12:52 ` [U-Boot] [PATCH v4 3/6] PPC: 85xx: Remove IVOR reset Alexander Graf
2014-02-20 12:52 ` [U-Boot] [PATCH v4 4/6] PPC: 85xx: Generalize DDR TLB mapping function Alexander Graf
2014-02-20 12:52 ` [U-Boot] [PATCH v4 5/6] PPC 85xx: Add ELF entry point Alexander Graf
2014-02-20 12:52 ` [U-Boot] [PATCH v4 6/6] PPC 85xx: Add qemu-ppce500 machine Alexander Graf
2014-02-20 15:59   ` Scott Wood
2014-03-19 18:49     ` York Sun
2014-04-11 14:38       ` Alexander Graf
2014-04-28 18:40   ` York Sun [this message]
2014-04-28 21:27     ` Alexander Graf
2014-04-28 21:31       ` York Sun

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=535EA08F.50709@freescale.com \
    --to=yorksun@freescale.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